IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 18, 2009, 10:42:06 AM (17 years ago)
Author:
eugene
Message:

adding noise map to variance generation; adding options to supply the noiseMap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageParseCamera.c

    r23411 r24485  
    2525    // otherwise they revert to the config information
    2626    // not all input or output images are used in a given recipe
     27    if (options->doNoiseMap) {
     28        if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.NOISEMAP", "NOISEMAP",
     29                               PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_BIAS /* NOISEMAP */)) {
     30            psError(PS_ERR_IO, false, "Can't find a noise map image source");
     31            psFree(options);
     32            return NULL;
     33        }
     34    }
    2735    if (options->doBias) {
    2836        if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.BIAS", "BIAS",
     
    4856            return NULL;
    4957        }
    50 
    51 #if 0
    52         // I think this is now done automatically in the pmFPAfileDefine and pmFPAfileIOChecks -- PAP.
    53 
    54         // XXX have ppImageDefineFile return the pmFPAfile?
    55         pmFPAfile *mask = psMetadataLookupPtr(&status, config->files, "PPIMAGE.MASK");
    56         psAssert(mask, "Just defined the mask!");
    57 
    58         // Need to read the names of bit masks from the mask header and set them in the
    59         // recipe.  If we are loading this from the detrend db, this action will happen
    60         // when the file is resolved.
    61         if (!mask->detrend) {
    62             // XXX need to load the mask bit names from one of the headers
    63             // this grabs the first available hdu : no guarantee that it will be valid, though
    64             pmHDU *hdu = pmHDUGetFirst(mask->fpa);
    65             if (!hdu) {
    66                 psError(PS_ERR_IO, true, "no valid HDU for PPIMAGE.INPUT.MASK");
    67                 return NULL;
    68             }
    69             // XXX is this consistent with the pmConfigMaskReadHeader call above?
    70             if (!pmConfigMaskReadHeader(config, hdu->header)) {
    71                 psError(PS_ERR_IO, false, "error in mask bits");
    72                 return NULL;
    73             }
    74         }
    75 #endif
    7658    }
    7759    if (options->doShutter) {
Note: See TracChangeset for help on using the changeset viewer.