Changeset 9342 for trunk/ppImage/src/ppImageOptions.c
- Timestamp:
- Oct 5, 2006, 5:36:46 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageOptions.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageOptions.c
r8751 r9342 23 23 24 24 // default flags for various activities 25 options->doMask = false;// Mask bad pixels25 options->doMask = false; // Mask bad pixels 26 26 options->maskValue = 0xff; // Default mask value 27 27 28 options->doNonLin = false;// Non-linearity correction29 options->doBias = false;// Bias subtraction30 options->doDark = false; // Dark subtraction28 options->doNonLin = false; // Non-linearity correction 29 options->doBias = false; // Bias subtraction 30 options->doDark = false; // Dark subtraction 31 31 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) 47 48 48 49 // Overscan defaults 49 options->overscan = NULL; // Overscan options50 options->overscan = NULL; // Overscan options 50 51 51 52 // Non-linearity default options 52 53 options->nonLinearType = 0; // Type of non-linearity data (vector, string or metadata) 53 options->nonLinearData = NULL; // The non-linearity data54 options->nonLinearData = NULL; // The non-linearity data 54 55 options->nonLinearSource = NULL; // If the non-linearity data is a menu, this provides the key 55 56 … … 119 120 120 121 // How do we fit it? 121 pmFit overscanFit = PM_FIT_NONE; // Fit type for overscan122 int overscanOrder = 0;// Order for overscan fit122 pmFit overscanFit = PM_FIT_NONE; // Fit type for overscan 123 int overscanOrder = 0; // Order for overscan fit 123 124 psString fit = psMetadataLookupStr(NULL, recipe, "OVERSCAN.FIT"); 124 125 if (! strcasecmp(fit, "POLYNOMIAL")) { … … 132 133 } else if (strcasecmp(fit, "NONE")) { 133 134 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 overscan135 exit(EXIT_FAILURE); 136 } 137 138 // What method do we use to measure the overscan statistics? 139 psStats *overscanStats = NULL; // Statistics for overscan 139 140 psString stat = psMetadataLookupStr(NULL, recipe, "OVERSCAN.STAT"); 140 141 if (! strcasecmp(stat, "MEAN")) { … … 144 145 } else { 145 146 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); 147 148 } 148 149 … … 156 157 psMaskType maskValue = psMetadataLookupU8(&status, recipe, "MASK.VALUE"); 157 158 if (status) { 158 options->maskValue = maskValue;159 options->maskValue = maskValue; 159 160 } 160 161 … … 162 163 options->doDark = psMetadataLookupBool(NULL, recipe, "DARK"); 163 164 options->doFlat = psMetadataLookupBool(NULL, recipe, "FLAT"); 165 options->doShutter = psMetadataLookupBool(NULL, recipe, "SHUTTER"); 164 166 165 167 // binned image options 166 options->xBin1 = psMetadataLookupS32(&status, recipe, "BIN1.XBIN"); 168 options->xBin1 = psMetadataLookupS32(&status, recipe, "BIN1.XBIN"); 167 169 if (!status) options->xBin1 = 16; 168 options->yBin1 = psMetadataLookupS32(&status, recipe, "BIN1.YBIN"); 170 options->yBin1 = psMetadataLookupS32(&status, recipe, "BIN1.YBIN"); 169 171 if (!status) options->yBin1 = 16; 170 172 171 options->xBin2 = psMetadataLookupS32(&status, recipe, "BIN2.XBIN"); 173 options->xBin2 = psMetadataLookupS32(&status, recipe, "BIN2.XBIN"); 172 174 if (!status) options->xBin1 = 16; 173 options->yBin2 = psMetadataLookupS32(&status, recipe, "BIN2.YBIN"); 175 options->yBin2 = psMetadataLookupS32(&status, recipe, "BIN2.YBIN"); 174 176 if (!status) options->yBin1 = 16; 175 177 … … 183 185 options->Bin2FITS = psMetadataLookupBool(NULL, recipe, "BIN2.FITS"); 184 186 options->Bin2JPEG = psMetadataLookupBool(NULL, recipe, "BIN2.JPEG"); 185 187 186 188 options->doPhotom = psMetadataLookupBool(NULL, recipe, "PHOTOM"); 187 189 options->doAstromChip = psMetadataLookupBool(NULL, recipe, "ASTROM.CHIP"); 188 190 options->doAstromMosaic = psMetadataLookupBool(NULL, recipe, "ASTROM.MOSAIC"); 189 191 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); 192 194 } 193 195 194 196 options->doAddstar = psMetadataLookupBool(NULL, recipe, "ADDSTAR"); 195 197 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); 198 200 } 199 201
Note:
See TracChangeset
for help on using the changeset viewer.
