IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 27, 2007, 12:14:08 PM (19 years ago)
Author:
magnier
Message:

converting the PSF model fits to the polariation terms (replacing Sx,Sy,Sxy)

File:
1 edited

Legend:

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

    r13034 r13064  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-04-26 01:20:29 $
     5 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-04-27 22:14:08 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5353    int i;
    5454    psF32 *PAR, *dPAR;
    55     psEllipseShape shape;
    5655    psEllipseAxes axes;
    5756    psF32 xPos, yPos;
     
    7574            yErr = dPAR[PM_PAR_YPOS];
    7675
    77             shape.sx  = PAR[PM_PAR_SXX];
    78             shape.sy  = PAR[PM_PAR_SYY];
    79             shape.sxy = PAR[PM_PAR_SXY];
    80             if ((shape.sx == 0) || (shape.sy == 0)) {
    81                 axes.major = 0.0;
    82                 axes.minor = 0.0;
    83                 axes.theta = 0.0;
    84             } else {
    85                 axes = psEllipseShapeToAxes (shape, 20.0);
    86             }
     76            axes = pmPSF_ModelToAxes (PAR, 20.0);
    8777        } else {
    8878            xPos = source->peak->xf;
     
    159149    bool status;
    160150    psF32 *PAR, *dPAR;
    161     psEllipseShape shape;
    162151    psEllipseAxes axes;
    163152
     
    203192        source->errMag    = psMetadataLookupF32 (&status, row, "PSF_INST_MAG_ERR");
    204193
    205         bool skip = false;
    206         skip |= (axes.major <= 0);
    207         skip |= (axes.minor <= 0);
    208         if (!skip) {
    209             shape = psEllipseAxesToShape (axes);
    210             PAR[PM_PAR_SXX] = shape.sx;
    211             PAR[PM_PAR_SYY] = shape.sy;
    212             PAR[PM_PAR_SXY] = shape.sxy;
    213         } else {
    214             PAR[PM_PAR_SXX] = 0.0;
    215             PAR[PM_PAR_SYY] = 0.0;
    216             PAR[PM_PAR_SXY] = 0.0;
    217         }
     194        pmPSF_AxesToModel (PAR, axes);
    218195
    219196        float lflux = psMetadataLookupF32 (&status, row, "PEAK_FLUX_AS_MAG");
Note: See TracChangeset for help on using the changeset viewer.