IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 20, 2010, 12:59:49 PM (17 years ago)
Author:
eugene
Message:

updating code so more functions can handle the multi-input concept

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/psphot.stack.20100120/src/psphotSourceSize.c

    r26508 r26643  
    2828// deviation from the psf model at the r = FWHM/2 position
    2929
     30// for now, let's store the detections on the readout->analysis for each readout
     31bool psphotSourceSize (pmConfig *config, const pmFPAview *view)
     32{
     33    bool status = true;
     34
     35    int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM");
     36    psAssert (status, "programming error: must define PSPHOT.INPUT.NUM");
     37
     38    // loop over the available readouts
     39    for (int i = 0; i < num; i++) {
     40        if (!psphotSourceSizeReadout (config, view, "PSPHOT.INPUT", i)) {
     41            psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for PSPHOT.INPUT entry %d", i);
     42            return false;
     43        }
     44    }
     45    return true;
     46}
     47
    3048// XXX use an internal flag to mark sources which have already been measured
    31 bool psphotSourceSize(pmConfig *config, pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, long first)
     49// how to track the sources already measured?
     50bool psphotSourceSize(pmConfig *config, const pmFPAview *view, const char *filename, int index)
    3251{
    3352    bool status;
     
    3554
    3655    psTimerStart ("psphot.size");
     56
     57    // find the currently selected readout
     58    pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest
     59    psAssert (readout, "missing file?");
     60
     61    pmReadout *readout = pmFPAviewThisReadout(view, file->fpa);
     62    psAssert (readout, "missing readout?");
     63
     64    psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES");
     65    psAssert (sources, "missing sources?");
     66
     67    pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF");
     68    psAssert (psf, "missing psf?");
     69
     70    // select the appropriate recipe information
     71    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);
     72    psAssert (recipe, "missing recipe?");
    3773
    3874    // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
Note: See TracChangeset for help on using the changeset viewer.