IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21451


Ignore:
Timestamp:
Feb 11, 2009, 6:44:19 PM (17 years ago)
Author:
eugene
Message:

adjust scaling of the peak centroid errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20090208/psphot/src/psphotFindPeaks.c

    r21408 r21451  
    2121    }
    2222
    23     // correct the peak values to S/N = sqrt(significance)
    24     // get the peak flux from the unsmoothed image
    25     // the peak pixel coords are guaranteed to be on the image
     23    // Convert the peak values to S/N = sqrt(significance).
     24    // Get the peak flux from the unsmoothed image.
     25    // Rescale the peak position errors using the peak variance
     26    // The peak pixel coords are guaranteed to be on the image
    2627    int row0 = readout->image->row0;
    2728    int col0 = readout->image->col0;
     
    3031        peak->SN = sqrt(peak->value);
    3132        peak->flux = readout->image->data.F32[peak->y-row0][peak->x-col0];
     33        if (readout->variance && isfinite (peak->dx)) {
     34            peak->dx *= sqrt(readout->variance->data.F32[peak->y-row0][peak->x-col0]);
     35        }
     36        if (readout->variance && isfinite (peak->dy)) {
     37            peak->dy *= sqrt(readout->variance->data.F32[peak->y-row0][peak->x-col0]);
     38        }
    3239    }
    3340
Note: See TracChangeset for help on using the changeset viewer.