Changeset 28717
- Timestamp:
- Jul 27, 2010, 10:26:06 AM (16 years ago)
- Location:
- trunk/Ohana/src/uniphot
- Files:
-
- 4 edited
-
include/uniphot.h (modified) (1 diff)
-
src/load_zpt_table.c (modified) (2 diffs)
-
src/match_zpts_to_images.c (modified) (1 diff)
-
src/update_catalog_setphot.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/uniphot/include/uniphot.h
r27790 r28717 41 41 typedef struct { 42 42 float zpt; 43 float zpt_err; 43 44 e_time time; 44 45 int found; -
trunk/Ohana/src/uniphot/src/load_zpt_table.c
r27790 r28717 5 5 int Nzpts, NZPTS; 6 6 ZptTable *zpts; 7 double zpt, mjd ;7 double zpt, mjd, zpt_err; 8 8 9 9 FILE *f; … … 19 19 ALLOCATE (zpts, ZptTable, NZPTS); 20 20 21 // format is fixed: (time) (zpt) 21 // format is fixed: (time) (zpt) (zpt_err) 22 22 int status; 23 while ((status = fscanf (f, "%lf %lf ", &mjd, &zpt)) == 2) {23 while ((status = fscanf (f, "%lf %lf %lf", &mjd, &zpt, &zpt_err)) == 3) { 24 24 zpts[Nzpts].zpt = zpt; 25 zpts[Nzpts].zpt_err = zpt_err; 25 26 zpts[Nzpts].time = ohana_mjd_to_sec (mjd); 26 27 zpts[Nzpts].found = FALSE; -
trunk/Ohana/src/uniphot/src/match_zpts_to_images.c
r27790 r28717 70 70 // we have a match: set zpt and record the match 71 71 image[Ni].Mcal = SCALE*code[0].C - zpts[Nz].zpt; 72 image[Ni].dMcal = zpts[Nz].zpt_err; 72 73 image[Ni].flags &= ~ID_IMAGE_NOCAL; // clear the NOCAL flag 73 74 zpts[Nz].found = TRUE; -
trunk/Ohana/src/uniphot/src/update_catalog_setphot.c
r28241 r28717 74 74 75 75 off_t i, j, m, id, idx, found; 76 float Mcal ;76 float Mcal, dMcal; 77 77 78 78 found = 0; … … 86 86 id = index[idx]; 87 87 Mcal = image[id].Mcal; 88 dMcal = image[id].dMcal; 88 89 89 catalog[0].measure[m].Mcal = image[id].Mcal; 90 catalog[0].measure[m].Mcal = Mcal; 91 catalog[0].measure[m].dMcal = dMcal; 90 92 found ++; 91 93 }
Note:
See TracChangeset
for help on using the changeset viewer.
