Changeset 14209
- Timestamp:
- Jul 13, 2007, 5:41:04 PM (19 years ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 2 edited
-
ppImage.h (modified) (2 diffs)
-
ppImageOptions.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImage.h
r14000 r14209 21 21 // Options for ppImage processing 22 22 typedef struct { 23 // actions which ppImage should perform 23 24 bool doMask; // Mask bad pixels 24 psMaskType maskValue; // apply this bit-mask to choose masked bits 25 psMaskType satMask; // Mask value to give saturated pixels 26 psMaskType badMask; // Mask value to give bad pixels 27 psMaskType flatMask; // Mask value to give bad flat pixels 28 psMaskType blankMask; // Mask value to give blank pixels 29 25 bool doNonLin; // Non-linearity correction 26 bool doOverscan; // Overscan subtraction 30 27 bool doBias; // Bias subtraction 31 28 bool doDark; // Dark subtraction … … 36 33 bool doAstromChip; // per-chip Astrometry 37 34 bool doAstromMosaic; // full-mosaic Astrometry 38 bool do Addstar; // add results to object database?35 bool doStats; // call ppStats on the image 39 36 40 bool doOverscan; // Overscan subtraction 41 pmOverscanOptions *overscan; // Overscan options 37 // output files requested 38 bool BaseFITS; 39 bool BaseMaskFITS; 40 bool BaseWeightFITS; 42 41 43 bool doNonLin; // Non-linearity correction 42 bool ChipFITS; 43 bool ChipMaskFITS; 44 bool ChipWeightFITS; 45 46 bool FPA1FITS; 47 bool FPA2FITS; 48 bool Bin1FITS; 49 bool Bin1JPEG; 50 bool Bin2FITS; 51 bool Bin2JPEG; 52 53 // make values for abstract concepts of masking 54 psMaskType maskValue; // apply this bit-mask to choose masked bits 55 psMaskType satMask; // Mask value to give saturated pixels 56 psMaskType badMask; // Mask value to give bad pixels 57 psMaskType flatMask; // Mask value to give bad flat pixels 58 psMaskType blankMask; // Mask value to give blank pixels 59 60 // non-linear correction parameters 44 61 psDataType nonLinearType; 45 62 psMetadataItem *nonLinearData; 46 63 void *nonLinearSource; 47 64 48 bool doStats; 65 // options for the analysis 66 pmOverscanOptions *overscan; // Overscan options 49 67 50 bool BaseFITS; 51 bool ChipFITS; 52 bool FPA1FITS; 53 bool FPA2FITS; 68 // binning parameters 69 int xBin1; // x-binning, scale 1 70 int yBin1; // y-binning, scale 1 71 int xBin2; // x-binning, scale 2 72 int yBin2; // y-binning, scale 2 54 73 55 bool Bin1FITS; 56 bool Bin1JPEG; 57 int xBin1, yBin1; 58 59 bool Bin2FITS; 60 bool Bin2JPEG; 61 int xBin2, yBin2; 62 74 // parameters used by the fringe analysis 63 75 float fringeRej; // Fringe rejection limit 64 76 int fringeIter; // Fringe iterations 65 77 float fringeKeep; // Fringe keep fraction 78 66 79 } ppImageOptions; 67 80 -
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.
