Changeset 13562
- Timestamp:
- May 30, 2007, 3:24:59 PM (19 years ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 4 edited
-
ppFocusParseCamera.c (modified) (4 diffs)
-
ppImage.h (modified) (1 diff)
-
ppImageDefineFile.c (modified) (4 diffs)
-
ppImageParseCamera.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppFocusParseCamera.c
r13528 r13562 25 25 // not all input or output images are used in a given recipe 26 26 if (options->doBias) { 27 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE )) {27 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_BIAS)) { 28 28 psError (PS_ERR_IO, false, "Can't find a bias image source"); 29 29 return NULL; … … 31 31 } 32 32 if (options->doDark) { 33 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE )) {33 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_DARK)) { 34 34 psError (PS_ERR_IO, false, "Can't find a dark image source"); 35 35 return NULL; … … 37 37 } 38 38 if (options->doMask) { 39 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK )) {39 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK, PM_DETREND_TYPE_MASK)) { 40 40 psError (PS_ERR_IO, false, "Can't find a mask image source"); 41 41 return NULL; … … 43 43 } 44 44 if (options->doFlat) { 45 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE )) {45 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_FLAT)) { 46 46 psError (PS_ERR_IO, false, "Can't find a shutter image source"); 47 47 return NULL; -
trunk/ppImage/src/ppImage.h
r13528 r13562 61 61 void ppFocusDropCamera (pmConfig *config); 62 62 63 bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType type);63 bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType fileType, pmDetrendType detrendType); 64 64 65 65 #endif -
trunk/ppImage/src/ppImageDefineFile.c
r13531 r13562 5 5 # include "ppImage.h" 6 6 7 bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType type) {7 bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType fileType, pmDetrendType detrendType) { 8 8 9 9 bool status; … … 17 17 } 18 18 if (file) { 19 if (file->type != type) {20 psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType ( type));19 if (file->type != fileType) { 20 psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType)); 21 21 return false; 22 22 } … … 31 31 } 32 32 if (file) { 33 if (file->type != type) {34 psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType ( type));33 if (file->type != fileType) { 34 psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType)); 35 35 return false; 36 36 } … … 39 39 40 40 // look for the file to be loaded from the detrend database 41 pmFPAfileDefineFromDetDB (&status, config, filerule, input, type);41 file = pmFPAfileDefineFromDetDB (&status, config, filerule, input, detrendType); 42 42 if (!status) { 43 psError (PS_ERR_UNKNOWN, false, "failed to load fi nddefinition");43 psError (PS_ERR_UNKNOWN, false, "failed to load file definition"); 44 44 return false; 45 45 } 46 46 if (file) { 47 if (file->type != type) {48 psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType ( type));47 if (file->type != fileType) { 48 psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType)); 49 49 return false; 50 50 } -
trunk/ppImage/src/ppImageParseCamera.c
r13528 r13562 52 52 // not all input or output images are used in a given recipe 53 53 if (options->doBias) { 54 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE )) {54 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_BIAS)) { 55 55 psError (PS_ERR_IO, false, "Can't find a bias image source"); 56 56 psFree (options); … … 59 59 } 60 60 if (options->doDark) { 61 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE )) {61 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_DARK)) { 62 62 psError (PS_ERR_IO, false, "Can't find a dark image source"); 63 63 psFree (options); … … 66 66 } 67 67 if (options->doMask) { 68 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK )) {68 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK, PM_DETREND_TYPE_MASK)) { 69 69 psError (PS_ERR_IO, false, "Can't find a mask image source"); 70 70 psFree (options); … … 73 73 } 74 74 if (options->doShutter) { 75 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.SHUTTER", "SHUTTER", PM_FPA_FILE_IMAGE )) {75 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.SHUTTER", "SHUTTER", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_SHUTTER)) { 76 76 psError (PS_ERR_IO, false, "Can't find a flat image source"); 77 77 psFree (options); … … 81 81 82 82 if (options->doFlat) { 83 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE )) {83 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_FLAT)) { 84 84 psError (PS_ERR_IO, false, "Can't find a shutter image source"); 85 85 psFree (options); … … 136 136 skip_fringe: 137 137 if (options->doFringe) { 138 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FRINGE", "FRINGE", PM_FPA_FILE_FRINGE )) {138 if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FRINGE", "FRINGE", PM_FPA_FILE_FRINGE, PM_DETREND_TYPE_FRINGE_IMAGE)) { 139 139 psError (PS_ERR_IO, false, "Can't find a fringe image source"); 140 140 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
