Changeset 25908
- Timestamp:
- Oct 21, 2009, 12:43:41 PM (17 years ago)
- Location:
- trunk/Ohana/src/addstar/src
- Files:
-
- 2 edited
-
GetZeroPointExposure.c (modified) (4 diffs)
-
ReadImageHeader.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/src/GetZeroPointExposure.c
r24973 r25908 1 1 # include "addstar.h" 2 2 3 // XXX this needs to handle the nominal zero point for the photcode(s) and the airmass term 3 // this function evaluates the collection of image headers for keywords of the form ZPT_OBS. 4 // Downstream, we will set the zero point offset for the image (image[0].Mcal) based on the 5 // value calculated here and the nominal zero point for the chip photcode. Four possible modes 6 // are defined: 7 8 // NOMINAL: in this case, the database value for the nominal zero point is used and 9 // image[0].Mcal is set to zero. 10 11 // CHIP_HEADER: in this case, the zero point offset measured for each chip is applied 12 // independently to image[0].Mcal 13 14 // CHIP_AVERAGE: in this case, the per-chip measured zero points are converted to offsets from 15 // the nominal zero points, and the median zero point offset is calculate, and later applied to 16 // image[0].Mcal 17 18 // PHU_HEADER: in this case, the zero point measured for the entire exposure and reported in 19 // the PHU header is used to set the zero point offset for each chip. Note that in this case, 20 // ZERO_POINT_OFFSET in this funciton is actually set to the zero point, and adjusted to an 21 // offset in ReadImageHeader based on the per-chip zero points in the photcode database 22 4 23 int GetZeroPointExposure (Header **headers, HeaderSet *headerSets, int Nimages) { 5 24 25 // the zero point correction is not applied 6 26 if (!strcasecmp(ZERO_POINT_OPTION, "NOMINAL")) { 7 27 ZERO_POINT_OFFSET = 0.0; … … 9 29 } 10 30 31 // the zero point correction is applied in ReadImageHeader 11 32 if (!strcasecmp(ZERO_POINT_OPTION, "CHIP_HEADER")) { 12 33 ZERO_POINT_OFFSET = 0.0; … … 14 35 } 15 36 37 // the zero point correction is measured here and applied in ReadImageHeader 16 38 if (!strcasecmp(ZERO_POINT_OPTION, "CHIP_AVERAGE")) { 17 39 int i, Nzpt, Nmid, Nhead; … … 66 88 } 67 89 68 // th is option is not consistent with the options for photcodes90 // the zero point (NOT the correction) is measured here and applied in ReadImageHeader 69 91 if (!strcasecmp(ZERO_POINT_OPTION, "PHU_HEADER")) { 70 92 int i, Nhead; -
trunk/Ohana/src/addstar/src/ReadImageHeader.c
r24988 r25908 203 203 } 204 204 205 // i f it exists, find the205 // in this case, lookup and apply the zero point measured for this chip 206 206 if (!strcasecmp(ZERO_POINT_OPTION, "CHIP_HEADER")) { 207 207 float ZPT_OBS; … … 214 214 } 215 215 216 // in this case, lookup and apply the zero point measured for the exposure 217 if (!strcasecmp(ZERO_POINT_OPTION, "PHU_HEADER")) { 218 if (!photcodeData) { 219 fprintf (stderr, "photcode data not supplied for this chip\n"); 220 ZERO_POINT_OFFSET = 0.0; 221 } else { 222 ZERO_POINT_OFFSET = 0.001*photcodeData[0].C - ZERO_POINT_OFFSET; 223 } 224 } 225 216 226 /* secz is in units milli-airmass */ 217 227 image[0].Mcal = ZERO_POINT_OFFSET;
Note:
See TracChangeset
for help on using the changeset viewer.
