Changeset 33230
- Timestamp:
- Feb 10, 2012, 7:34:05 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src
- Files:
-
- 1 added
- 1 edited
- 1 moved
-
setphot_client.c (modified) (1 diff)
-
update_catalog_setphot_client.c (added)
-
update_dvo_setphot_client.c (moved) (moved from branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_setphot_client.c ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/setphot_client.c
r33227 r33230 24 24 FlatCorrectionTable *flatcorrTable = FlatCorrectionLoad (flatcorrFile); 25 25 26 update_ setphot(image, Nimage, flatcorrTable);26 update_dvo_setphot_client (image, Nimage, flatcorrTable); 27 27 28 28 exit (0); -
branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_dvo_setphot_client.c
r33227 r33230 4 4 // we want to load a subset of image data for this operation. we only need: 5 5 // imageID, photom_map_id, Mcal, dMcal, flags. 6 int update_ setphot (Image *image, off_t Nimage, FlatCorrectionTable *flatcorr) {6 int update_dvo_setphot_client (Image *image, off_t Nimage, FlatCorrectionTable *flatcorr) { 7 7 8 8 SkyRegion UserPatch; … … 81 81 return (TRUE); 82 82 } 83 84 void update_catalog_setphot_client (Catalog *catalog, Image *image, off_t *index, off_t Nimage, FlatCorrectionTable *flatcorr) {85 86 off_t i, j, found;87 88 found = 0;89 for (i = 0; i < catalog[0].Naverage; i++) {90 91 off_t m = catalog[0].average[i].measureOffset;92 for (j = 0; j < catalog[0].average[i].Nmeasure; j++, m++) {93 off_t idx = catalog[0].measure[m].imageID;94 if (idx <= 0) continue; // detections with imageID == 0 do not have a valid image (eg, ref photcode)95 96 off_t id = index[idx];97 float Mcal = image[id].Mcal;98 float dMcal = image[id].dMcal;99 float Mcal_offset = 0.0;100 101 // if we know about a flat-field correction, then we need to apply the sub-chip correction102 int flat_id = image[id].photom_map_id;103 if (flat_id > 0) {104 Mcal_offset = FlatCorrectionOffset (flatcorr, flat_id, catalog[0].measure[m].Xccd, catalog[0].measure[m].Yccd);105 }106 107 catalog[0].measure[m].Mcal = Mcal - Mcal_offset;108 catalog[0].measure[m].dMcal = dMcal;109 110 // if we are setting the zero points from an UBERCAL database, and this detection is from one of those images,111 // then tag the measurement as well112 if (UBERCAL && (image[id].flags & ID_IMAGE_PHOTOM_UBERCAL)) {113 catalog[0].measure[m].dbFlags |= ID_MEAS_PHOTOM_UBERCAL;114 }115 116 found ++;117 }118 }119 120 if (found) {121 fprintf (stderr, "found "OFF_T_FMT" matches\n", found);122 }123 }
Note:
See TracChangeset
for help on using the changeset viewer.
