Changeset 17705 for branches/eam_branch_20080511/ppSim/src/ppSimCreate.c
- Timestamp:
- May 15, 2008, 4:44:46 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080511/ppSim/src/ppSimCreate.c
r17702 r17705 53 53 config->formatName = psStringCopy (output->formatName); 54 54 55 // the recipe is now fully realized for the desired camera 55 56 psMetadata *recipe = psMetadataLookupMetadata(&status, config->recipes, PPSIM_RECIPE); // Recipe 57 58 char *typeStr = psMetadataLookupStr(NULL, recipe, "IMAGE.TYPE"); // Type of image to simulate 59 ppSimType type = ppSimTypeFromString (typeStr); // Type of image to simulate 60 61 if (type == PPSIM_TYPE_OBJECT) { 62 // adjust the seeing by the scale 63 float seeing = psMetadataLookupF32(&status, recipe, "SEEING"); 64 if (isnan(seeing)) { 65 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "seeing is not defined"); 66 psFree(fpa); 67 return NULL; 68 } 69 float scale = psMetadataLookupF32(&status, recipe, "PIXEL.SCALE"); 70 if (isnan(scale)) { 71 psError(PS_ERR_BAD_PARAMETER_TYPE, true, "pixel scale is not defined"); 72 psFree(fpa); 73 return NULL; 74 } 75 psMetadataAddF32(recipe, PS_LIST_TAIL, "SEEING", PS_META_REPLACE, "Seeing SIGMA (pixels)", seeing / 2.0 / sqrt(2.0 * log(2.0)) / scale); 76 } 77 78 if ((type == PPSIM_TYPE_OBJECT) || (type == PPSIM_TYPE_FLAT)) { 79 // determine the zeropoint from the filter 80 float zp = psMetadataLookupF32(&status, recipe, "ZEROPOINT"); 81 if (isnan(zp)) { 82 char *filter = psMetadataLookupStr(&status, recipe, "FILTER"); 83 float zp = ppSimGetZeroPoint (recipe, filter); 84 psMetadataAddF32(recipe, PS_LIST_TAIL, "ZEROPOINT", PS_META_REPLACE, "Photometric zeropoint", zp); 85 } 86 } 56 87 57 88 // For photometry, we operate on the chip-mosaicked image. we create a copy of the mosaicked … … 115 146 psMetadata *recipe = psMetadataLookupMetadata(&status, config->recipes, PPSIM_RECIPE); // Recipe 116 147 117 ppSimArgToRecipeF32(&status, recipe, "EXPTIME", fpa->concepts, "FPA.EXPOSURE");118 char *filter = ppSimArgToRecipeStr(&status, recipe, "FILTER", fpa->concepts, "FPA.FILTER");148 ppSimArgToRecipeF32(&status, recipe, "EXPTIME", input->fpa->concepts, "FPA.EXPOSURE"); 149 char *filter = ppSimArgToRecipeStr(&status, recipe, "FILTER", input->fpa->concepts, "FPA.FILTER"); 119 150 120 151 float zp = ppSimGetZeroPoint (recipe, filter);
Note:
See TracChangeset
for help on using the changeset viewer.
