IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2012, 5:46:39 PM (14 years ago)
Author:
bills
Message:

In psphot and psphotStack accept exposure number images (EXPNUM) as inputs.
If supplied set the N_FRAMES value for each source based on the
value in the EXPNUM image.

Location:
trunk/psModules/src/objects
Files:
7 edited

Legend:

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

    r32695 r33690  
    160160    source->parent = NULL;
    161161    source->imageID = -1;
     162    source->nFrames = 0;
    162163
    163164    psMemSetDeallocator(source, (psFreeFunc) sourceFree);
  • trunk/psModules/src/objects/pmSource.h

    r32695 r33690  
    118118    pmSource *parent;                   ///< reference to the master source from which this is derived
    119119    int imageID;
     120    psU16 nFrames;
    120121};
    121122
  • trunk/psModules/src/objects/pmSourceIO_CMF_PS1_DV1.c

    r32347 r33690  
    8181    }
    8282
    83     short nImageOverlap;
    8483    float magOffset;
    8584    float zeroptErr;
    8685    float fwhmMajor;
    8786    float fwhmMinor;
    88     pmSourceOutputsCommonValues (&nImageOverlap, &magOffset, &zeroptErr, &fwhmMajor, &fwhmMinor, readout, imageHeader);
     87    pmSourceOutputsCommonValues (&magOffset, &zeroptErr, &fwhmMajor, &fwhmMinor, readout, imageHeader);
    8988
    9089    table = psArrayAllocEmpty (sources->n);
     
    161160        psMetadataAdd (row, PS_LIST_TAIL, "FLAGS",            PS_DATA_U32, "psphot analysis flags",                      source->mode);
    162161
    163         // XXX not sure how to get this : need to load Nimages with weight?
    164         psMetadataAdd (row, PS_LIST_TAIL, "N_FRAMES",         PS_DATA_U16, "Number of frames overlapping source center", nImageOverlap);
     162        psMetadataAdd (row, PS_LIST_TAIL, "N_FRAMES",         PS_DATA_U16, "Number of frames overlapping source center", source->nFrames);
    165163        psMetadataAdd (row, PS_LIST_TAIL, "PADDING",          PS_DATA_S16, "padding", 0);
    166164
  • trunk/psModules/src/objects/pmSourceIO_CMF_PS1_DV2.c

    r32347 r33690  
    8282    table = psArrayAllocEmpty (sources->n);
    8383
    84     short nImageOverlap;
    8584    float magOffset;
    8685    float zeroptErr;
    8786    float fwhmMajor;
    8887    float fwhmMinor;
    89     pmSourceOutputsCommonValues (&nImageOverlap, &magOffset, &zeroptErr, &fwhmMajor, &fwhmMinor, readout, imageHeader);
     88    pmSourceOutputsCommonValues (&magOffset, &zeroptErr, &fwhmMajor, &fwhmMinor, readout, imageHeader);
    9089
    9190    // we write out PSF-fits for all sources, regardless of quality.  the source flags tell us the state
     
    180179
    181180        // XXX not sure how to get this : need to load Nimages with weight?
    182         psMetadataAdd (row, PS_LIST_TAIL, "N_FRAMES",         PS_DATA_U16, "Number of frames overlapping source center", nImageOverlap);
     181        psMetadataAdd (row, PS_LIST_TAIL, "N_FRAMES",         PS_DATA_U16, "Number of frames overlapping source center", source->nFrames);
    183182        psMetadataAdd (row, PS_LIST_TAIL, "PADDING",          PS_DATA_S16, "padding", 0);
    184183
  • trunk/psModules/src/objects/pmSourceIO_CMF_PS1_SV1.c

    r32977 r33690  
    8484    table = psArrayAllocEmpty (sources->n);
    8585
    86     short nImageOverlap;
    8786    float magOffset;
    8887    float zeroptErr;
    8988    float fwhmMajor;
    9089    float fwhmMinor;
    91     pmSourceOutputsCommonValues (&nImageOverlap, &magOffset, &zeroptErr, &fwhmMajor, &fwhmMinor, readout, imageHeader);
     90    pmSourceOutputsCommonValues (&magOffset, &zeroptErr, &fwhmMajor, &fwhmMinor, readout, imageHeader);
    9291
    9392    // we write out PSF-fits for all sources, regardless of quality.  the source flags tell us the state
     
    170169        psMetadataAdd (row, PS_LIST_TAIL, "FLAGS2",           PS_DATA_U32, "psphot analysis flags",                     source->mode2);
    171170
    172         // XXX not sure how to get this : need to load Nimages with weight?
    173         psMetadataAdd (row, PS_LIST_TAIL, "N_FRAMES",         PS_DATA_U16, "Number of frames overlapping source center", nImageOverlap);
     171        psMetadataAdd (row, PS_LIST_TAIL, "N_FRAMES",         PS_DATA_U16, "Number of frames overlapping source center", source->nFrames);
    174172        psMetadataAdd (row, PS_LIST_TAIL, "PADDING",          PS_DATA_S16, "padding", 0);
    175173
  • trunk/psModules/src/objects/pmSourceOutputs.c

    r32347 r33690  
    4040#include "pmSourceOutputs.h"
    4141
    42 bool pmSourceOutputsCommonValues (short *nImageOverlap, float *magOffset, float *zeroptErr, float *fwhmMajor, float *fwhmMinor, pmReadout *readout, psMetadata *header) {
     42bool pmSourceOutputsCommonValues (float *magOffset, float *zeroptErr, float *fwhmMajor, float *fwhmMinor, pmReadout *readout, psMetadata *header) {
    4343
    4444    pmFPA  *fpa  = readout->parent->parent->parent;
     
    7272    }
    7373
    74     *nImageOverlap = psMetadataLookupS32 (&status2, header, "NINPUTS");
    7574    return true;
    7675
  • trunk/psModules/src/objects/pmSourceOutputs.h

    r32347 r33690  
    5656} pmSourceOutputsMoments;
    5757
    58 bool pmSourceOutputsCommonValues (short *nImageOverlap, float *magOffset, float *zeroptErr, float *fwhmMajor, float *fwhmMinor, pmReadout *readout, psMetadata *header);
     58bool pmSourceOutputsCommonValues (float *magOffset, float *zeroptErr, float *fwhmMajor, float *fwhmMinor, pmReadout *readout, psMetadata *header);
    5959
    6060bool pmSourceOutputsSetValues (pmSourceOutputs *outputs, pmSource *source, pmChip *chip, float fwhmMajor, float fwhmMinor, float magOffset);
Note: See TracChangeset for help on using the changeset viewer.