IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14223


Ignore:
Timestamp:
Jul 16, 2007, 10:20:28 AM (19 years ago)
Author:
eugene
Message:

added explicit option to request internal mask and weight image

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippconfig/recipes/ppImage.config

    r14215 r14223  
    1212MASK             BOOL    FALSE           # Mask bad pixels
    1313MASK.VALUE       STR     SAT,BAD         # Mask pixels with these attributes
     14MASK.BUILD       BOOL    FALSE           # Build internal mask image
     15WEIGHT.BUILD     BOOL    FALSE           # Build internal weight image
    1416FRINGE           BOOL    FALSE           # Fringe subtraction
    1517PHOTOM           BOOL    FALSE           # Source identification and photometry
  • trunk/ppImage/src/ppImage.h

    r14209 r14223  
    2222typedef struct {
    2323    // actions which ppImage should perform
     24    bool doMaskBuild;                   // Build internal mask
     25    bool doWeightBuild;                   // Build internal mask
    2426    bool doMask;                        // Mask bad pixels
    2527    bool doNonLin;                      // Non-linearity correction
  • trunk/ppImage/src/ppImageDetrendReadout.c

    r14000 r14223  
    1616
    1717    // Masking on the basis of pixel value needs to be done before anything else, so the values are pristine.
    18     if (options->doMask || options->doShutter || options->doFlat || options->doPhotom) {
     18    if (options->doMaskBuild) {
    1919        pmReadoutGenerateMask(input, options->satMask, options->badMask);
    2020    }
     
    5151
    5252    // Weight on the basis of pixel value needs to be done after the overscan has been subtracted
    53     if (options->doMask || options->doShutter || options->doFlat || options->doPhotom) {
     53    if (options->doWeightBuild) {
    5454        // create the target mask and weight images
    5555        pmReadoutGenerateWeight(input, true);
  • trunk/ppImage/src/ppImageOptions.c

    r14209 r14223  
    1818
    1919    // actions which ppImage should perform
     20    options->doMaskBuild     = false;   // Build internal mask
     21    options->doWeightBuild   = false;   // Build internal weight
    2022    options->doMask          = false;   // Mask bad pixels
    2123    options->doNonLin        = false;   // Non-linearity correction
     
    180182    }
    181183
     184    // for these images, even if not required otherwise
     185    options->doMaskBuild = psMetadataLookupBool(NULL, recipe, "MASK.BUILD");
     186    options->doWeightBuild = psMetadataLookupBool(NULL, recipe, "WEIGHT.BUILD");
     187
    182188    // Mask recipe options
    183189    options->doMask = psMetadataLookupBool(NULL, recipe, "MASK");
     
    190196    options->flatMask = pmConfigMask("FLAT", config);
    191197    options->blankMask = pmConfigMask("BLANK", config);
     198    // XXX should it be an error for these to not exist?
    192199
    193200    options->doBias = psMetadataLookupBool(NULL, recipe, "BIAS");
     
    225232    }
    226233
     234    // even if not requested explicitly, if any of these are set, build an internal mask and weight:
     235    if (options->doMask || options->doShutter || options->doFlat || options->doPhotom) {
     236        options->doMaskBuild = true;
     237        options->doWeightBuild = true;
     238    }
     239
    227240    options->BaseFITS       = psMetadataLookupBool(NULL, recipe, "BASE.FITS");
    228241    options->BaseMaskFITS   = psMetadataLookupBool(NULL, recipe, "BASE.MASK.FITS");
  • trunk/ppImage/src/ppImageParseCamera.c

    r14211 r14223  
    385385
    386386    // Turn off mask and weight output if we're not doing anything interesting
    387     bool noMask = (!options->doMask && !options->doShutter && !options->doFlat && !options->doPhotom);
    388     if (noMask && outMask->save) {
     387    if (!options->doMaskBuild && outMask->save) {
    389388        psWarning("output mask image (BASE.MASK.FITS) requested, but not generated: skipping.\n");
    390389        outMask->save = false;
    391390    }
    392     if (noMask && outWeight->save) {
     391    if (!options->doWeightBuild && outWeight->save) {
    393392        psWarning("output weight image (BASE.WEIGHT.FITS) requested, but not generated: skipping.\n");
    394393        outWeight->save = false;
    395394    }
    396     if (noMask && chipMask->save) {
     395    if (!options->doMaskBuild && chipMask->save) {
    397396        psWarning("output mask image (CHIP.MASK.FITS) requested, but not generated: skipping.\n");
    398397        chipMask->save = false;
    399398    }
    400     if (noMask && chipWeight->save) {
     399    if (!options->doWeightBuild && chipWeight->save) {
    401400        psWarning("output weight image (CHIP.WEIGHT.FITS) requested, but not generated: skipping.\n");
    402401        chipWeight->save = false;
Note: See TracChangeset for help on using the changeset viewer.