Changeset 25027 for branches/pap/ppSub/src/ppSubCamera.c
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/ppSub
- Property svn:mergeinfo deleted
-
branches/pap/ppSub/src/ppSubCamera.c
r23753 r25027 163 163 164 164 165 // Now that the camera has been determined, we can read the recipe 166 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim 167 if (!recipe) { 168 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE); 169 return false; 170 } 171 if (psMetadataLookupBool(NULL, config->arguments, "-photometry")) { 172 psMetadataAddBool(recipe, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, 173 "Perform photometry?", true); 174 } 175 if (psMetadataLookupBool(NULL, config->arguments, "-inverse")) { 176 psMetadataAddBool(recipe, PS_LIST_TAIL, "INVERSE", PS_META_REPLACE, 177 "Generate inverse subtractions?", true); 178 } 179 180 data->inverse = psMetadataLookupBool(NULL, recipe, "INVERSE"); 181 data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY"); 182 183 bool mdok; // Status of MD lookup 184 bool saveConv = psMetadataLookupBool(&mdok, recipe, "SAVE.CONVOLVED"); // Save convolved images? 185 165 186 // Convolved input image 166 187 pmFPAfile *inConvImage = defineOutputFile(config, input, true, "PPSUB.INPUT.CONV", PM_FPA_FILE_IMAGE); … … 171 192 return false; 172 193 } 194 if (saveConv) { 195 inConvImage->save = true; 196 inConvMask->save = true; 197 } 173 198 if (inVar) { 174 199 pmFPAfile *inConvVar = defineOutputFile(config, inConvImage, false, "PPSUB.INPUT.CONV.VARIANCE", … … 177 202 psError(PS_ERR_UNKNOWN, false, "Unable to define output files"); 178 203 return false; 204 } 205 if (saveConv) { 206 inConvVar->save = true; 179 207 } 180 208 } … … 188 216 return false; 189 217 } 218 if (saveConv) { 219 refConvImage->save = true; 220 refConvMask->save = true; 221 } 190 222 if (refVar) { 191 223 pmFPAfile *refConvVar = defineOutputFile(config, refConvImage, false, "PPSUB.REF.CONV.VARIANCE", … … 195 227 return false; 196 228 } 197 } 198 199 200 // Now that the camera has been determined, we can read the recipe 201 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim 202 if (!recipe) { 203 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE); 204 return false; 205 } 206 if (psMetadataLookupBool(NULL, config->arguments, "-photometry")) { 207 psMetadataAddBool(recipe, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, 208 "Perform photometry?", true); 209 } 210 if (psMetadataLookupBool(NULL, config->arguments, "-inverse")) { 211 psMetadataAddBool(recipe, PS_LIST_TAIL, "INVERSE", PS_META_REPLACE, 212 "Generate inverse subtractions?", true); 213 } 214 215 data->inverse = psMetadataLookupBool(NULL, recipe, "INVERSE"); 216 data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY"); 217 229 if (saveConv) { 230 refConvVar->save = true; 231 } 232 } 218 233 219 234 // Output image
Note:
See TracChangeset
for help on using the changeset viewer.
