Changeset 9342
- Timestamp:
- Oct 5, 2006, 5:36:46 PM (20 years ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 6 edited
-
ppImageArguments.c (modified) (1 diff)
-
ppImageDetrendReadout.c (modified) (1 diff)
-
ppImageOptions.c (modified) (7 diffs)
-
ppImageOptions.h (modified) (2 diffs)
-
ppImageParseCamera.c (modified) (1 diff)
-
ppImageParseDetrend.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageArguments.c
r9058 r9342 57 57 pmConfigFileSetsMD (config->arguments, config, "BIAS", "-bias", "-biaslist"); 58 58 pmConfigFileSetsMD (config->arguments, config, "DARK", "-dark", "-darklist"); 59 pmConfigFileSetsMD (config->arguments, config, "SHUTTER", "-shutter", "-shutterlist"); 59 60 pmConfigFileSetsMD (config->arguments, config, "FLAT", "-flat", "-flatlist"); 60 61 pmConfigFileSetsMD (config->arguments, config, "MASK", "-mask", "-masklist"); -
trunk/ppImage/src/ppImageDetrendReadout.c
r9142 r9342 49 49 } 50 50 51 // Shutter correction 52 if (options->doShutter) { 53 pmReadout *shutter = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.SHUTTER"); 54 if (!pmShutterCorrectionApply(input, shutter)) { 55 return false; 56 } 57 } 58 51 59 // Flat-field correction (no options used?) 52 60 if (options->doFlat) { -
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 -
trunk/ppImage/src/ppImageOptions.h
r7771 r9342 9 9 bool doBias; // Bias subtraction 10 10 bool doDark; // Dark subtraction 11 bool doShutter; // Shutter correction 11 12 bool doFlat; // Flat-field normalisation 12 13 bool doFringe; // Fringe subtraction … … 14 15 bool doAstromChip; // per-chip Astrometry 15 16 bool doAstromMosaic; // full-mosaic Astrometry 16 bool doAddstar; // add results to object database?17 bool doAddstar; // add results to object database? 17 18 18 19 bool doOverscan; // Overscan subtraction -
trunk/ppImage/src/ppImageParseCamera.c
r8934 r9342 48 48 pmFPAfileDefineFromDetDB (&status, config, "PPIMAGE.MASK", input->fpa, PM_DETREND_TYPE_MASK); 49 49 if (!status) psAbort ("ppImageParseDetrend", "can't find a mask image source"); 50 } 51 if (options->doShutter) { 52 bool status = false; 53 pmFPAfileDefineFromArgs (&status, config, "PPIMAGE.SHUTTER", "SHUTTER"); 54 pmFPAfileDefineFromConf (&status, config, "PPIMAGE.SHUTTER"); 55 pmFPAfileDefineFromDetDB (&status, config, "PPIMAGE.SHUTTER", input->fpa, PM_DETREND_TYPE_FLAT); 56 if (!status) psAbort ("ppImageParseDetrend", "can't find a shutter image source"); 50 57 } 51 58 if (options->doFlat) { -
trunk/ppImage/src/ppImageParseDetrend.c
r8751 r9342 6 6 7 7 // identify all needed detrend and other I/O files 8 // create the pmFPAfiles for the active I/O files 8 // create the pmFPAfiles for the active I/O files 9 9 10 10 bool ppImageParseDetrend(ppImageOptions *options, pmConfig *config) … … 16 16 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PPIMAGE.INPUT"); 17 17 18 // the following are defined from the argument list, if given, 18 // the following are defined from the argument list, if given, 19 19 // otherwise they revert to the config information 20 20 21 21 if (options->doBias) { 22 bool status = false;23 pmFPAfileFromArgs (&status, config, "PPIMAGE.BIAS", "BIAS");24 pmFPAfileFromConf (&status, config, "PPIMAGE.BIAS", input->fpa);25 if (!status) psAbort ("ppImageParseDetrend", "can't find a bias image source");22 bool status = false; 23 pmFPAfileFromArgs (&status, config, "PPIMAGE.BIAS", "BIAS"); 24 pmFPAfileFromConf (&status, config, "PPIMAGE.BIAS", input->fpa); 25 if (!status) psAbort ("ppImageParseDetrend", "can't find a bias image source"); 26 26 } 27 27 28 28 if (options->doDark) { 29 bool status = false;30 pmFPAfileFromArgs (&status, config, "PPIMAGE.DARK", "DARK");31 pmFPAfileFromConf (&status, config, "PPIMAGE.DARK", input->fpa);32 if (!status) psAbort ("ppImageParseDetrend", "can't find a dark image source");29 bool status = false; 30 pmFPAfileFromArgs (&status, config, "PPIMAGE.DARK", "DARK"); 31 pmFPAfileFromConf (&status, config, "PPIMAGE.DARK", input->fpa); 32 if (!status) psAbort ("ppImageParseDetrend", "can't find a dark image source"); 33 33 } 34 34 35 35 if (options->doMask) { 36 bool status = false; 37 pmFPAfileFromArgs (&status, config, "PPIMAGE.MASK", "MASK"); 38 pmFPAfileFromConf (&status, config, "PPIMAGE.MASK", input->fpa); 39 if (!status) psAbort ("ppImageParseDetrend", "can't find a mask image source"); 36 bool status = false; 37 pmFPAfileFromArgs (&status, config, "PPIMAGE.MASK", "MASK"); 38 pmFPAfileFromConf (&status, config, "PPIMAGE.MASK", input->fpa); 39 if (!status) psAbort ("ppImageParseDetrend", "can't find a mask image source"); 40 } 41 42 if (options->doShutter) { 43 bool status = false; 44 pmFPAfileFromArgs (&status, config, "PPIMAGE.SHUTTER", "SHUTTER"); 45 pmFPAfileFromConf (&status, config, "PPIMAGE.SHUTTER", input->fpa); 46 if (!status) psAbort ("ppImageParseDetrend", "can't find a shutter image source"); 40 47 } 41 48 42 49 if (options->doFlat) { 43 bool status = false;44 pmFPAfileFromArgs (&status, config, "PPIMAGE.FLAT", "FLAT");45 pmFPAfileFromConf (&status, config, "PPIMAGE.FLAT", input->fpa);46 if (!status) psAbort ("ppImageParseDetrend", "can't find a flat image source");50 bool status = false; 51 pmFPAfileFromArgs (&status, config, "PPIMAGE.FLAT", "FLAT"); 52 pmFPAfileFromConf (&status, config, "PPIMAGE.FLAT", input->fpa); 53 if (!status) psAbort ("ppImageParseDetrend", "can't find a flat image source"); 47 54 } 48 55 … … 53 60 // XXX do these need to construct a new fpa? 54 61 if (options->doBin1) { 55 pmFPAfile *file = pmFPAfileFromFPA (config, input->fpa, options->xBin1, options->yBin1, "PPIMAGE.BIN1");56 pmFPAfileDefine (config->files, config->camera, file->fpa, "PPIMAGE.JPEG1");62 pmFPAfile *file = pmFPAfileFromFPA (config, input->fpa, options->xBin1, options->yBin1, "PPIMAGE.BIN1"); 63 pmFPAfileDefine (config->files, config->camera, file->fpa, "PPIMAGE.JPEG1"); 57 64 } 58 65 if (options->doBin2) { 59 pmFPAfile *file = pmFPAfileFromFPA (config, input->fpa, options->xBin2, options->yBin2, "PPIMAGE.BIN2");60 pmFPAfileDefine (config->files, config->camera, file->fpa, "PPIMAGE.JPEG2");66 pmFPAfile *file = pmFPAfileFromFPA (config, input->fpa, options->xBin2, options->yBin2, "PPIMAGE.BIN2"); 67 pmFPAfileDefine (config->files, config->camera, file->fpa, "PPIMAGE.JPEG2"); 61 68 } 62 69
Note:
See TracChangeset
for help on using the changeset viewer.
