Changeset 33070
- Timestamp:
- Jan 9, 2012, 8:36:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/psphot/src/psphotFitSourcesLinear.c
r32924 r33070 99 99 if (psRegionIsNaN (AnalysisRegion)) psAbort("analysis region mis-defined"); 100 100 101 bool CONSTANT_PHOTOMETRIC_WEIGHTS =102 psMetadataLookupBool(&status, recipe, "CONSTANT_PHOTOMETRIC_WEIGHTS");101 pmSourceFitVarMode fitVarMode = PM_SOURCE_PHOTFIT_CONST; 102 char *fitVarModeString = psMetadataLookupStr(&status, recipe, "LINEAR_FIT_VARIANCE_MODE"); 103 103 if (!status) { 104 psAbort("You must provide a value for the BOOL recipe CONSTANT_PHOTOMETRIC_WEIGHTS"); 105 } 104 bool CONSTANT_PHOTOMETRIC_WEIGHTS = psMetadataLookupBool(&status, recipe, "CONSTANT_PHOTOMETRIC_WEIGHTS"); 105 if (!status) { 106 psAbort("You must provide a value for LINEAR_FIT_VARIANCE_MODE or CONSTANT_PHOTOMETRIC_WEIGHTS"); 107 } 108 fitVarMode = CONSTANT_PHOTOMETRIC_WEIGHTS ? PM_SOURCE_PHOTFIT_CONST : PM_SOURCE_PHOTFIT_IMAGE_VAR; 109 } else { 110 if (!strcasecmp(fitVarModeString, "CONSTANT") || !strcasecmp(fitVarModeString, "CONST")) { 111 fitVarMode = PM_SOURCE_PHOTFIT_CONST; 112 goto gotit; 113 } 114 if (!strcasecmp(fitVarModeString, "IMAGE") || !strcasecmp(fitVarModeString, "IMAGE_VAR")) { 115 fitVarMode = PM_SOURCE_PHOTFIT_IMAGE_VAR; 116 goto gotit; 117 } 118 if (!strcasecmp(fitVarModeString, "MODEL") || !strcasecmp(fitVarModeString, "MODEL_VAR")) { 119 fitVarMode = PM_SOURCE_PHOTFIT_MODEL_VAR; 120 goto gotit; 121 } 122 psError (PSPHOT_ERR_CONFIG, false, "Invalid value for LINEAR_FIT_VARIANCE_MODE (%s)", fitVarModeString); 123 return false; 124 } 125 126 gotit: 106 127 int SKY_FIT_ORDER = psMetadataLookupS32(&status, recipe, "SKY_FIT_ORDER"); 107 128 if (!status) {
Note:
See TracChangeset
for help on using the changeset viewer.
