Changeset 38169
- Timestamp:
- Apr 23, 2015, 3:37:52 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150419/Ohana/src/addstar/src
- Files:
-
- 3 edited
-
LoadDataUKIRT.c (modified) (5 diffs)
-
MatchHeaders.c (modified) (3 diffs)
-
ReadStarsUKIRT.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/LoadDataUKIRT.c
r38167 r38169 4 4 // there should only be a single data set (phu + table) in this file 5 5 // each SDSS data set corresponds to 5 images (ugriz) 6 int LoadData SDSS (FILE *f, char *file, Image **images, off_t *nvalid, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t Nimages) {6 int LoadDataUKIRT (FILE *f, char *file, Image **images, off_t *nimages, Stars **stars, unsigned int *Nstars, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t NheaderSets) { 7 7 8 8 off_t Nskip, Nvalid, NVALID; … … 12 12 Stars *inStars; 13 13 14 // create or update image table 14 15 if (images[0] == NULL) { 15 16 Nvalid = 0; … … 17 18 ALLOCATE (images[0], Image, NVALID); 18 19 } else { 19 Nvalid = *n valid;20 Nvalid = *nimages; 20 21 NVALID = Nvalid + 4; 21 22 REALLOCATE (images[0], Image, NVALID); … … 26 27 27 28 // validate the number of headers sets == 4 28 for (i = 0; i < 4; i++) {29 for (i = 0; i < NheaderSets; i++) { 29 30 if (VERBOSE) fprintf (stderr, "reading header for %s (%s)\n", headerSets[i].exthead, headerSets[i].extdata); 30 31 … … 42 43 43 44 free (name); 44 *n valid= Nvalid;45 *nimages = Nvalid; 45 46 } 46 47 return (TRUE); -
branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/MatchHeaders.c
r38167 r38169 18 18 mode = GetFileMode (headers[0]); 19 19 20 // mosaic mef can be identified from the PHU 20 21 if (mode == MOSAIC_MEF) { 21 22 headerSets[Nimage].exthead = strcreate ("PHU"); … … 26 27 } 27 28 29 // sdss obj can be identified from the PHU 28 30 if (mode == SDSS_OBJ) { 29 31 // XXX these should have two headers (phu + table) … … 40 42 41 43 // check for ukirt mode 42 if (Nheaders == 5) { 44 // check if headers[1] is UKIRT_OBJ (and all others) 45 if (Nheaders > 1) { 43 46 int myMode = GetFileMode (headers[1]); 44 47 if (myMode != UKIRT_OBJ) goto other_modes; 45 for (i = 2; i < 5; i++) {48 for (i = 2; i < Nheaders; i++) { 46 49 myMode = GetFileMode (headers[i]); 47 50 if (myMode != UKIRT_OBJ) { -
branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/ReadStarsUKIRT.c
r38167 r38169 28 28 CODE = code[0].code; \ 29 29 ZP = 0.001*code[0].C; } 30 31 // XXX NOTE : as of 2008.02.27, the zero point is still carried internally in millimags32 30 33 31 // given a file with the pointer at the start of the table block and the
Note:
See TracChangeset
for help on using the changeset viewer.
