IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 7, 2010, 5:07:54 PM (17 years ago)
Author:
eugene
Message:

upgrade psphot functions to work in the stack context (see doc/stack.txt)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psphot/src/psphotMaskReadout.c

    r26523 r26542  
    22
    33// generate mask and variance if not defined, additional mask for restricted subregion
    4 bool psphotSetMaskAndVariance (pmConfig *config, pmReadout *readout, psMetadata *recipe) {
     4bool psphotSetMaskAndVarianceReadout (pmConfig *config, pmReadout *readout, psMetadata *recipe) {
    55
    66    bool status;
     
    7676}
    7777
    78 bool psphotStackSetMaskAndVariance (pmConfig *config, const pmFPAview *view, psMetadata *recipe) {
     78bool psphotSetMaskAndVariance (pmConfig *config, const pmFPAview *view, psMetadata *recipe) {
    7979
    80     int num = psMetadataAddS32 (&status, config->arguments, "INPUTS.NUM");
    81     psAbort (!status, "programming error: must define INPUTS.NUM");
     80    bool status = false;
     81
     82    int num = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.INPUT.NUM");
     83    psAssert (status, "programming error: must define PSPHOT.INPUT.NUM");
    8284
    8385    // loop over the available readouts
     
    8587
    8688        pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PSPHOT.INPUT", i); // File of interest
     89        PS_ASSERT_PTR_NON_NULL (file, false);
    8790
    8891        // find the currently selected readout
     
    9194
    9295        // Generate the mask and weight images, including the user-defined analysis region of interest
    93         psphotSetMaskAndVariance (config, readout, recipe);
     96        if (!psphotSetMaskAndVarianceReadout (config, readout, recipe)) {
     97            psError (PSPHOT_ERR_CONFIG, false, "failed to generate mask for PSPHOT.INPUT entry %d", i);
     98            return false;
     99        }
    94100
    95101        // display the image, weight, mask (ch 1,2,3)
    96102        psphotVisualShowImage (readout);
    97103    }
    98 
     104    return true;
    99105}
Note: See TracChangeset for help on using the changeset viewer.