Changeset 14209 for trunk/ppImage/src/ppImageOptions.c
- Timestamp:
- Jul 13, 2007, 5:41:04 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageOptions.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageOptions.c
r13970 r14209 17 17 psMemSetDeallocator(options, (psFreeFunc)imageOptionsFree); 18 18 19 // Initialise options 20 options->nonLinearData = NULL; 21 options->nonLinearSource = NULL; 19 // actions which ppImage should perform 20 options->doMask = false; // Mask bad pixels 21 options->doNonLin = false; // Non-linearity correction 22 options->doOverscan = false; // Overscan subtraction 23 options->doBias = false; // Bias subtraction 24 options->doDark = false; // Dark subtraction 25 options->doShutter = false; // Shutter correction 26 options->doFlat = false; // Flat-field normalisation 27 options->doFringe = false; // Fringe subtraction 28 options->doPhotom = false; // Source identification and photometry 29 options->doAstromChip = false; // Astrometry (per-chip) 30 options->doAstromMosaic = false; // Astrometry (full-mosaic) 31 options->doStats = false; // Measure and save image statistics 32 33 // output files requested 34 options->BaseFITS = false; // create output image 35 options->BaseMaskFITS = false; // create output mask image 36 options->BaseWeightFITS = false; // create output weight image 37 38 options->ChipFITS = false; // create output chip-mosaic image 39 options->ChipMaskFITS = false; // create output chip-mosaic mask image 40 options->ChipWeightFITS = false; // create output chip-mosaic weight image 41 42 options->FPA1FITS = false; // create fpa-mosaic binned image (scale 1) 43 options->FPA2FITS = false; // create fpa-mosaic binned image (scale 2) 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) 22 48 23 49 // default flags for various activities 24 options->doMask = false; // Mask bad pixels 25 options->maskValue = 0x00; // Default mask value 26 options->satMask = 0x00; // Saturated pixels 27 options->badMask = 0x00; // Bad pixels 28 options->flatMask = 0x00; // Bad flat pixels 29 options->blankMask = 0x00; // Blank (no data, cell gap) pixels 30 31 options->doNonLin = false; // Non-linearity correction 32 options->doBias = false; // Bias subtraction 33 options->doDark = false; // Dark subtraction 34 options->doOverscan = false; // Overscan subtraction 35 options->doShutter = false; // Shutter correction 36 options->doFlat = false; // Flat-field normalisation 37 options->doFringe = false; // Fringe subtraction 38 options->doPhotom = false; // Source identification and photometry 39 options->doAstromChip = false; // Astrometry 40 options->doAstromMosaic = false; // Astrometry 41 42 options->doStats = false; // Measure and save image statistics 43 44 options->BaseFITS = false; // create binned image (scale 1) 45 options->ChipFITS = false; // create binned image (scale 1) 46 options->FPA1FITS = false; // create binned image (scale 1) 47 options->FPA2FITS = false; // create binned image (scale 1) 48 49 options->Bin1FITS = false; // create binned image (scale 1) 50 options->Bin2FITS = false; // create binned image (scale 2) 51 options->Bin1JPEG = false; // create jpeg of binned image (scale 1) 52 options->Bin2JPEG = false; // create jpeg of binned image (scale 2) 53 54 // Overscan defaults 55 options->overscan = NULL; // Overscan options 56 57 // Fringe defaults 58 options->fringeRej = NAN; 59 options->fringeIter = 0; 60 options->fringeKeep = 1.0; 50 options->maskValue = 0x00; // Default mask value 51 options->satMask = 0x00; // Saturated pixels 52 options->badMask = 0x00; // Bad pixels 53 options->flatMask = 0x00; // Bad flat pixels 54 options->blankMask = 0x00; // Blank (no data, cell gap) pixels 61 55 62 56 // Non-linearity default options … … 64 58 options->nonLinearData = NULL; // The non-linearity data 65 59 options->nonLinearSource = NULL; // If the non-linearity data is a menu, this provides the key 60 61 // Overscan defaults 62 options->overscan = NULL; // Overscan options 63 64 // binning parameters 65 options->xBin1 = 16; // x-binning, scale 1 66 options->yBin1 = 16; // y-binning, scale 1 67 options->xBin2 = 16; // x-binning, scale 2 68 options->yBin2 = 16; // y-binning, scale 2 69 70 // Fringe defaults 71 options->fringeRej = NAN; // Fringe rejection limit 72 options->fringeIter = 0; // Fringe iterations 73 options->fringeKeep = 1.0; // Fringe keep fraction 66 74 67 75 return options; … … 199 207 if (!status) { 200 208 psWarning("BIN1.XBIN not found in recipe: setting to default value.\n"); 201 options->xBin1 = 16;202 209 } 203 210 options->yBin1 = psMetadataLookupS32(&status, recipe, "BIN1.YBIN"); … … 218 225 } 219 226 220 options->BaseFITS = psMetadataLookupBool(NULL, recipe, "BASE.FITS"); 221 options->ChipFITS = psMetadataLookupBool(NULL, recipe, "CHIP.FITS"); 222 options->FPA1FITS = psMetadataLookupBool(NULL, recipe, "FPA1.FITS"); 223 options->FPA2FITS = psMetadataLookupBool(NULL, recipe, "FPA2.FITS"); 224 225 options->Bin1FITS = psMetadataLookupBool(NULL, recipe, "BIN1.FITS"); 226 options->Bin1JPEG = psMetadataLookupBool(NULL, recipe, "BIN1.JPEG"); 227 options->Bin2FITS = psMetadataLookupBool(NULL, recipe, "BIN2.FITS"); 228 options->Bin2JPEG = psMetadataLookupBool(NULL, recipe, "BIN2.JPEG"); 229 230 options->doPhotom = psMetadataLookupBool(NULL, recipe, "PHOTOM"); 231 options->doAstromChip = psMetadataLookupBool(NULL, recipe, "ASTROM.CHIP"); 227 options->BaseFITS = psMetadataLookupBool(NULL, recipe, "BASE.FITS"); 228 options->BaseMaskFITS = psMetadataLookupBool(NULL, recipe, "BASE.MASK.FITS"); 229 options->BaseWeightFITS = psMetadataLookupBool(NULL, recipe, "BASE.WEIGHT.FITS"); 230 231 options->ChipFITS = psMetadataLookupBool(NULL, recipe, "CHIP.FITS"); 232 options->ChipMaskFITS = psMetadataLookupBool(NULL, recipe, "CHIP.MASK.FITS"); 233 options->ChipWeightFITS = psMetadataLookupBool(NULL, recipe, "CHIP.WEIGHT.FITS"); 234 235 options->FPA1FITS = psMetadataLookupBool(NULL, recipe, "FPA1.FITS"); 236 options->FPA2FITS = psMetadataLookupBool(NULL, recipe, "FPA2.FITS"); 237 238 options->Bin1FITS = psMetadataLookupBool(NULL, recipe, "BIN1.FITS"); 239 options->Bin1JPEG = psMetadataLookupBool(NULL, recipe, "BIN1.JPEG"); 240 options->Bin2FITS = psMetadataLookupBool(NULL, recipe, "BIN2.FITS"); 241 options->Bin2JPEG = psMetadataLookupBool(NULL, recipe, "BIN2.JPEG"); 242 243 options->doPhotom = psMetadataLookupBool(NULL, recipe, "PHOTOM"); 244 options->doAstromChip = psMetadataLookupBool(NULL, recipe, "ASTROM.CHIP"); 232 245 options->doAstromMosaic = psMetadataLookupBool(NULL, recipe, "ASTROM.MOSAIC"); 246 233 247 if ((options->doAstromChip || options->doAstromMosaic) && !options->doPhotom) { 234 248 psLogMsg(__func__, PS_LOG_ERROR, "Invalid PPIMAGE options: cannot do ASTROMetry without PHOTOMetry"); 235 exit(EXIT_FAILURE);236 }237 238 options->doAddstar = psMetadataLookupBool(NULL, recipe, "ADDSTAR");239 if (options->doAddstar && !(options->doAstromChip || options->doAstromMosaic)) {240 psLogMsg(__func__, PS_LOG_ERROR, "Invalid PPIMAGE options: cannot Addstar without Astrometry");241 249 exit(EXIT_FAILURE); 242 250 }
Note:
See TracChangeset
for help on using the changeset viewer.
