IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 15, 2007, 10:44:25 AM (19 years ago)
Author:
magnier
Message:

update to conform with ICD

File:
1 edited

Legend:

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

    r12402 r12445  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-03-11 18:56:38 $
     5 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-03-15 20:44:25 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4545    psArray *table;
    4646    psMetadata *row;
    47     int i, type;
     47    int i;
    4848    psF32 *PAR, *dPAR;
    49     float lsky;
    50     bool status;
    5149    psEllipseShape shape;
    5250    psEllipseAxes axes;
    53 
    54     // find config information for output header
    55     float ZERO_POINT = psMetadataLookupF32 (&status, header, "ZERO_PT");
    5651
    5752    table = psArrayAllocEmpty (sources->n);
     
    6661        dPAR = model->dparams->data.F32;
    6762
    68         type = pmSourceDophotType (source);
    69         lsky = (source->sky < 1.0) ? 0.0 : log10(source->sky);
    70 
    7163        shape.sx  = PAR[PM_PAR_SXX];
    7264        shape.sy  = PAR[PM_PAR_SYY];
     
    7466        axes = psEllipseShapeToAxes (shape, 20.0);
    7567
    76         peakMag = (source->peak->flux > 0) ? -2.5*log(source->peak->flux) : NAN;
    77         nImageOverlap = 1;
    78         ID = 0; // XXX need to figure out how to generate this
     68        float peakMag = (source->peak->flux > 0) ? -2.5*log(source->peak->flux) : NAN;
     69        psS16 nImageOverlap = 1;
     70        psS32 ID = 0; // XXX need to figure out how to generate this
    7971
    8072        row = psMetadataAlloc ();
    81         psMetadataAdd (row, PS_LIST_TAIL, "IPP_IDET",         PS_DATA_S64, "IPP detection identifier index",             ID);
     73        psMetadataAdd (row, PS_LIST_TAIL, "IPP_IDET",         PS_DATA_U32, "IPP detection identifier index",             ID);
    8274        psMetadataAdd (row, PS_LIST_TAIL, "X_PSF",            PS_DATA_F32, "PSF x coordinate",                           PAR[PM_PAR_XPOS]);
    8375        psMetadataAdd (row, PS_LIST_TAIL, "Y_PSF",            PS_DATA_F32, "PSF y coordinate",                           PAR[PM_PAR_YPOS]);
     
    9991        psMetadataAdd (row, PS_LIST_TAIL, "PSF_QF",           PS_DATA_F32, "PSF coverage/quality factor",                source->pixWeight);
    10092        // XXX not sure how to get this : need to load Nimages with weight
    101         psMetadataAdd (row, PS_LIST_TAIL, "N_FRAMES",         PS_DATA_S32, "Number of frames overlapping source center", nImageOverlap);
     93        psMetadataAdd (row, PS_LIST_TAIL, "N_FRAMES",         PS_DATA_U16, "Number of frames overlapping source center", nImageOverlap);
     94        psMetadataAdd (row, PS_LIST_TAIL, "DUMMY",            PS_DATA_U16, "padding", 0);
    10295
    10396        // XXX these calibrated values are not supplied by psphot analysis
     
    138131    psEllipseShape shape;
    139132    psEllipseAxes axes;
    140     float lsky;
    141133
    142134    // define PSF model type
     
    147139        modelType = pmModelSetType (PSF_NAME);
    148140    }
    149 
    150     // find config information for output header
    151     float ZERO_POINT = psMetadataLookupF32 (&status, header, "ZERO_PT");
    152     if (!status)
    153         ZERO_POINT = 25.0;
    154141
    155142    psArray *table = psFitsReadTable (fits);
Note: See TracChangeset for help on using the changeset viewer.