IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2006, 5:36:46 PM (20 years ago)
Author:
Paul Price
Message:

Adding shutter correction.

File:
1 edited

Legend:

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

    r8751 r9342  
    2323
    2424    // default flags for various activities
    25     options->doMask     = false;        // Mask bad pixels
     25    options->doMask     = false;        // Mask bad pixels
    2626    options->maskValue  = 0xff;         // Default mask value
    2727
    28     options->doNonLin   = false;        // Non-linearity correction
    29     options->doBias     = false;        // Bias subtraction
    30     options->doDark     = false;        // Dark subtraction
     28    options->doNonLin   = false;        // Non-linearity correction
     29    options->doBias     = false;        // Bias subtraction
     30    options->doDark     = false;        // Dark subtraction
    3131    options->doOverscan = false;        // Overscan subtraction
    32     options->doFlat     = false;        // Flat-field normalisation
    33     options->doFringe   = false;        // Fringe subtraction
    34     options->doPhotom   = false;        // Source identification and photometry
    35     options->doAstromChip = false;      // Astrometry
    36     options->doAstromMosaic = false;    // Astrometry
    37 
    38     options->BaseFITS   = false;        // create binned image (scale 1)
    39     options->ChipFITS   = false;        // create binned image (scale 1)
    40     options->FPA1FITS   = false;        // create binned image (scale 1)
    41     options->FPA2FITS   = false;        // create binned image (scale 1)
    42 
    43     options->Bin1FITS   = false;        // create binned image (scale 1)
    44     options->Bin2FITS   = false;        // create binned image (scale 2)
    45     options->Bin1JPEG   = false;        // create jpeg of binned image (scale 1)
    46     options->Bin2JPEG   = false;        // create jpeg of binned image (scale 2)
     32    options->doShutter  = false;        // Shutter correction
     33    options->doFlat     = false;        // Flat-field normalisation
     34    options->doFringe   = false;        // Fringe subtraction
     35    options->doPhotom   = false;        // Source identification and photometry
     36    options->doAstromChip = false;      // Astrometry
     37    options->doAstromMosaic = false;    // Astrometry
     38
     39    options->BaseFITS   = false;        // create binned image (scale 1)
     40    options->ChipFITS   = false;        // create binned image (scale 1)
     41    options->FPA1FITS   = false;        // create binned image (scale 1)
     42    options->FPA2FITS   = false;        // create binned image (scale 1)
     43
     44    options->Bin1FITS   = false;        // create binned image (scale 1)
     45    options->Bin2FITS   = false;        // create binned image (scale 2)
     46    options->Bin1JPEG   = false;        // create jpeg of binned image (scale 1)
     47    options->Bin2JPEG   = false;        // create jpeg of binned image (scale 2)
    4748
    4849    // Overscan defaults
    49     options->overscan      = NULL;      // Overscan options
     50    options->overscan      = NULL;      // Overscan options
    5051
    5152    // Non-linearity default options
    5253    options->nonLinearType   = 0;       // Type of non-linearity data (vector, string or metadata)
    53     options->nonLinearData   = NULL;    // The non-linearity data
     54    options->nonLinearData   = NULL;    // The non-linearity data
    5455    options->nonLinearSource = NULL;    // If the non-linearity data is a menu, this provides the key
    5556
     
    119120
    120121        // How do we fit it?
    121         pmFit overscanFit = PM_FIT_NONE; // Fit type for overscan
    122         int overscanOrder = 0;          // Order for overscan fit
     122        pmFit overscanFit = PM_FIT_NONE; // Fit type for overscan
     123        int overscanOrder = 0;          // Order for overscan fit
    123124        psString fit = psMetadataLookupStr(NULL, recipe, "OVERSCAN.FIT");
    124125        if (! strcasecmp(fit, "POLYNOMIAL")) {
     
    132133        } else if (strcasecmp(fit, "NONE")) {
    133134            psLogMsg(__func__, PS_LOG_WARN, "OVERSCAN.FIT (%s) in recipe %s is not one of NONE, POLYNOMIAL, or SPLINE", fit, RECIPE_NAME);
    134             exit(EXIT_FAILURE);
    135         }
    136 
    137         // What method do we use to measure the overscan statistics?
    138         psStats *overscanStats = NULL;  // Statistics for overscan
     135            exit(EXIT_FAILURE);
     136        }
     137
     138        // What method do we use to measure the overscan statistics?
     139        psStats *overscanStats = NULL;  // Statistics for overscan
    139140        psString stat = psMetadataLookupStr(NULL, recipe, "OVERSCAN.STAT");
    140141        if (! strcasecmp(stat, "MEAN")) {
     
    144145        } else {
    145146            psErrorStackPrint(stderr, "OVERSCAN.STAT (%s) in recipe %s is not one of MEAN or MEDIAN", stat, RECIPE_NAME);
    146             exit(EXIT_FAILURE);
     147            exit(EXIT_FAILURE);
    147148        }
    148149
     
    156157    psMaskType maskValue = psMetadataLookupU8(&status, recipe, "MASK.VALUE");
    157158    if (status) {
    158         options->maskValue = maskValue;
     159        options->maskValue = maskValue;
    159160    }
    160161
     
    162163    options->doDark = psMetadataLookupBool(NULL, recipe, "DARK");
    163164    options->doFlat = psMetadataLookupBool(NULL, recipe, "FLAT");
     165    options->doShutter = psMetadataLookupBool(NULL, recipe, "SHUTTER");
    164166
    165167    // binned image options
    166     options->xBin1 = psMetadataLookupS32(&status, recipe, "BIN1.XBIN"); 
     168    options->xBin1 = psMetadataLookupS32(&status, recipe, "BIN1.XBIN");
    167169    if (!status) options->xBin1 = 16;
    168     options->yBin1 = psMetadataLookupS32(&status, recipe, "BIN1.YBIN"); 
     170    options->yBin1 = psMetadataLookupS32(&status, recipe, "BIN1.YBIN");
    169171    if (!status) options->yBin1 = 16;
    170172
    171     options->xBin2 = psMetadataLookupS32(&status, recipe, "BIN2.XBIN"); 
     173    options->xBin2 = psMetadataLookupS32(&status, recipe, "BIN2.XBIN");
    172174    if (!status) options->xBin1 = 16;
    173     options->yBin2 = psMetadataLookupS32(&status, recipe, "BIN2.YBIN"); 
     175    options->yBin2 = psMetadataLookupS32(&status, recipe, "BIN2.YBIN");
    174176    if (!status) options->yBin1 = 16;
    175177
     
    183185    options->Bin2FITS = psMetadataLookupBool(NULL, recipe, "BIN2.FITS");
    184186    options->Bin2JPEG = psMetadataLookupBool(NULL, recipe, "BIN2.JPEG");
    185    
     187
    186188    options->doPhotom = psMetadataLookupBool(NULL, recipe, "PHOTOM");
    187189    options->doAstromChip = psMetadataLookupBool(NULL, recipe, "ASTROM.CHIP");
    188190    options->doAstromMosaic = psMetadataLookupBool(NULL, recipe, "ASTROM.MOSAIC");
    189191    if ((options->doAstromChip || options->doAstromMosaic) && !options->doPhotom) {
    190         psLogMsg(__func__, PS_LOG_ERROR, "Invalid Phase2 Options: cannot do ASTROMetry without PHOTOMetry");
    191         exit(EXIT_FAILURE);
     192        psLogMsg(__func__, PS_LOG_ERROR, "Invalid Phase2 Options: cannot do ASTROMetry without PHOTOMetry");
     193        exit(EXIT_FAILURE);
    192194    }
    193195
    194196    options->doAddstar = psMetadataLookupBool(NULL, recipe, "ADDSTAR");
    195197    if (options->doAddstar && !(options->doAstromChip || options->doAstromMosaic)) {
    196         psLogMsg(__func__, PS_LOG_ERROR, "Invalid Phase2 Options: cannot Addstar without Astrometry");
    197         exit(EXIT_FAILURE);
     198        psLogMsg(__func__, PS_LOG_ERROR, "Invalid Phase2 Options: cannot Addstar without Astrometry");
     199        exit(EXIT_FAILURE);
    198200    }
    199201
Note: See TracChangeset for help on using the changeset viewer.