IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15701


Ignore:
Timestamp:
Nov 27, 2007, 12:45:55 PM (18 years ago)
Author:
Paul Price
Message:

Also needed to adjust the centre for later interpolation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmModel.c

    r15700 r15701  
    66 *  @author EAM, IfA
    77 *
    8  *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-11-27 22:23:16 $
     8 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-11-27 22:45:55 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    231231        psImage *inRx = model->residuals->Rx;
    232232        psImage *inRy = model->residuals->Ry;
     233        xBin = model->residuals->xBin;
     234        yBin = model->residuals->yBin;
     235        xResidCenter = model->residuals->xCenter;
     236        yResidCenter = model->residuals->yCenter;
    233237        if ((image->numCols != inRo->numCols) ||
    234238            (image->numRows != inRo->numRows)) {
     
    237241            myRy = psImageAlloc (image->numCols, image->numRows, PS_TYPE_F32);
    238242            // Difference between input and desired centres
    239             int xDiff = (int)(inRx->numCols / 2) - (xPos - image->col0);
    240             int yDiff = (int)(inRy->numRows / 2) - (yPos - image->row0);
     243            int xDiff = (int)(inRo->numCols / 2) - (xPos - image->col0);
     244            int yDiff = (int)(inRo->numRows / 2) - (yPos - image->row0);
     245            xResidCenter -= xDiff;
     246            yResidCenter -= yDiff;
    241247            for (int iy = 0; iy < myRo->numRows; iy++) {
    242248                int jy = iy + yDiff;
     
    256262                        myRy->data.F32[iy][ix] = 0.0;
    257263                    } else {
    258                         myRo->data.F32[iy][ix] = inRo->data.F32[jy][jx];
    259                         myRx->data.F32[iy][ix] = inRx->data.F32[jy][jx];
    260                         myRy->data.F32[iy][ix] = inRy->data.F32[jy][jx];
     264                        myRo->data.F32[iy][ix] = 1e10 * inRo->data.F32[jy][jx];
     265                        myRx->data.F32[iy][ix] = 1e10 * inRx->data.F32[jy][jx];
     266                        myRy->data.F32[iy][ix] = 1e10 * inRy->data.F32[jy][jx];
    261267                    }
    262268                }
     
    272278        Ry = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, myRy, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0);
    273279
    274         xBin = model->residuals->xBin;
    275         yBin = model->residuals->yBin;
    276         xResidCenter = model->residuals->xCenter;
    277         yResidCenter = model->residuals->yCenter;
    278280    }
    279281
Note: See TracChangeset for help on using the changeset viewer.