Changeset 17702 for branches/eam_branch_20080511/ppSim/src/ppSimCreate.c
- Timestamp:
- May 15, 2008, 12:01:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080511/ppSim/src/ppSimCreate.c
r17672 r17702 17 17 return NULL; 18 18 } 19 20 simImage = true;21 fpa = pmFPAConstruct(config->camera); // FPA to contain the observation22 if (!fpa) {23 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration.");24 return NULL;25 }26 19 } else { 20 // If an image is supplied, we still generate a fake image and merge them together downstream 21 // (otherwise, we get the variance wrong). 27 22 simImage = false; 28 23 if (input->type != PM_FPA_FILE_IMAGE) { … … 30 25 return NULL; 31 26 } 32 fpa = psMemIncrRefCounter (input->fpa); 27 } 28 29 // generate the fpa structure used by the output camera (determined from INPUT or specified) 30 assert (config->camera); 31 fpa = pmFPAConstruct(config->camera); // FPA to contain the observation 32 if (!fpa) { 33 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration."); 34 return NULL; 33 35 } 34 36 … … 98 100 99 101 // PPSIM.SOURCES carries the constructed, fake sources with their true parameters 100 // XXX only invoke this code for OBJECT types of images 102 // XXX only invoke this code for OBJECT types of images? 101 103 pmFPAfile *simSources = pmFPAfileDefineOutput (config, output->fpa, "PPSIM.SOURCES"); 102 104 if (!simSources) { … … 106 108 simSources->save = true; 107 109 108 // if we have loaded an input image, we d o not need to populate the fpa109 if ( !simImage) {110 // if we have loaded an input image, we derive certain values from the image, if possible 111 if (input) { 110 112 // we need to extract certain metadata from the image and populate the recipe. 111 113 // or else we need to set the fpa concepts based on the recipe options... … … 118 120 float zp = ppSimGetZeroPoint (recipe, filter); 119 121 psMetadataAddF32(recipe, PS_LIST_TAIL, "ZEROPOINT", PS_META_REPLACE, "Photometric zeropoint", zp); 120 121 return output;122 122 } 123 123
Note:
See TracChangeset
for help on using the changeset viewer.
