Changeset 14667 for trunk/ppSim/src/ppSimCreate.c
- Timestamp:
- Aug 25, 2007, 11:57:36 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimCreate.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimCreate.c
r14657 r14667 9 9 pmFPAfile *ppSimCreate(pmConfig *config) 10 10 { 11 bool status; 12 bool simImage = false; 11 13 PS_ASSERT_PTR_NON_NULL(config, NULL); 14 pmFPA *fpa = NULL; 12 15 13 pmFPA *fpa = pmFPAConstruct(config->camera); // FPA to contain the observation 14 if (!fpa) { 15 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration."); 16 return NULL; 16 // the input image defines the camera. if it is not supplied, the user must have 17 // supplied a camera and other metadata on the command line 18 pmFPAfile *input = pmFPAfileDefineFromArgs (&status, config, "PPIMAGE.INPUT", "INPUT"); 19 if (!input) { 20 simImage = true; 21 fpa = pmFPAConstruct(config->camera); // FPA to contain the observation 22 if (!fpa) { 23 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration."); 24 return NULL; 25 } 26 } else { 27 simImage = false; 28 if (input->type != PM_FPA_FILE_IMAGE) { 29 psError(PS_ERR_IO, true, "PPIMAGE.INPUT is not of type IMAGE"); 30 return NULL; 31 } 32 fpa = input->fpa; 17 33 } 18 34 … … 56 72 } 57 73 simSources->save = true; 74 75 // if we have loaded an input image, we do not need to populate the fpa 76 if (!simImage) { 77 return file; 78 } 58 79 59 80 pmFPALevel phuLevel = pmFPAPHULevel(file->format); // Level at which PHU goes
Note:
See TracChangeset
for help on using the changeset viewer.
