IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 22, 2007, 12:36:21 PM (19 years ago)
Author:
Paul Price
Message:

Generated kernel should be relative to the LAST data point (for OTA
images, this is the point at which it is read out).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageConvolve.c

    r11999 r12000  
    77/// @author Eugene Magnier, IfA
    88///
    9 /// @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    10 /// @date $Date: 2007-02-22 22:12:36 $
     9/// @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     10/// @date $Date: 2007-02-22 22:36:21 $
    1111///
    1212/// Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    125125    int xMin, xMax, yMin, yMax;         // Range of values for kernel
    126126    int xLast, yLast;                   // Last location, for relative shifts
     127    int x0, y0;                         // Final location; everything is relative to this
    127128    xLast = xMin = xMax = xShifts->data.S32[0];
    128129    yLast = yMin = yMax = yShifts->data.S32[0];
    129     float tSum = tShifts->data.F32[0];   // Sum of the times
     130    x0 = xShifts->data.S32[num - 1];
     131    y0 = yShifts->data.S32[num - 1];
     132    float tSum = tShifts->data.F32[num];   // Sum of the times
    130133    for (long i = 1; i < num; i++) {
    131         int x = xShifts->data.S32[i];    // x position in kernel
    132         int y = yShifts->data.S32[i];    // y position in kernel
     134        int x = xShifts->data.S32[i] - x0; // x position in kernel
     135        int y = yShifts->data.S32[i] - y0; // y position in kernel
    133136        if (xyRelative) {
    134137            x += xLast;
     
    169172    float tLast = 0.0;                  // Last value for t
    170173    for (int i = 0; i < num; i++) {
    171         int x = xShifts->data.S32[i];    // x position in kernel
    172         int y = yShifts->data.S32[i];    // y position in kernel
     174        int x = xShifts->data.S32[i] - x0; // x position in kernel
     175        int y = yShifts->data.S32[i] - y0; // y position in kernel
    173176        if (xyRelative) {
    174177            x += xLast;
Note: See TracChangeset for help on using the changeset viewer.