Changeset 38167
- Timestamp:
- Apr 23, 2015, 2:41:17 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150419/Ohana/src/addstar
- Files:
-
- 2 added
- 5 edited
-
include/addstar.h (modified) (1 diff)
-
src/GetFileMode.c (modified) (1 diff)
-
src/LoadDataUKIRT.c (added)
-
src/LoadHeaders.c (modified) (1 diff)
-
src/LoadStars.c (modified) (1 diff)
-
src/MatchHeaders.c (modified) (2 diffs)
-
src/ReadStarsUKIRT.c (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150419/Ohana/src/addstar/include/addstar.h
r37807 r38167 77 77 78 78 enum {ADDSTAR_MODE_NONE, ADDSTAR_MODE_IMAGE, ADDSTAR_MODE_REFLIST, ADDSTAR_MODE_REFCAT, ADDSTAR_MODE_FAKEIMAGE, ADDSTAR_MODE_RESORT, ADDSTAR_MODE_CREATE_ID}; 79 enum {NONE, SIMPLE_CMP, SIMPLE_CMF, SIMPLE_MEF, MOSAIC_CMP, MOSAIC_CMF, MOSAIC_MEF, MOSAIC_PHU, SDSS_OBJ };79 enum {NONE, SIMPLE_CMP, SIMPLE_CMF, SIMPLE_MEF, MOSAIC_CMP, MOSAIC_CMF, MOSAIC_MEF, MOSAIC_PHU, SDSS_OBJ, UKIRT_OBJ}; 80 80 /* note: MEF implies CMF */ 81 81 -
branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/GetFileMode.c
r37054 r38167 24 24 if (VERBOSE) fprintf (stderr, "found SDSS objects\n"); 25 25 return SDSS_OBJ; 26 } 27 28 29 // UKIRT files have TELESCOP = UKIRT and INSTRUME = WFCAM: 30 char telescope[81], instrument[81]; 31 int have_TELESCOPE = gfits_scan (header, "TELESCOP", "%s", 1, telescope); 32 int have_INSTRUMENT = gfits_scan (header, "INSTRUME", "%s", 1, instrument); 33 if (haveTELESCOPE && have_INSTRUMENT && !strcmp(telescope, "UKIRT"), && !strcmp(instrument, "WFCAM")) { 34 if (VERBOSE) fprintf (stderr, "found UKIRT data\n"); 35 return UKIRT_OBJ; 26 36 } 27 37 -
branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/LoadHeaders.c
r27435 r38167 24 24 if (i == 0) { 25 25 *mode = GetFileMode (headers[0]); 26 // CMP mode has no binary table, just image header and text blocks 26 27 if ((*mode == SIMPLE_CMP) || (*mode == MOSAIC_CMP)) { 27 28 *Nheaders = i; -
branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/LoadStars.c
r37807 r38167 100 100 } 101 101 102 // if these are SDSS data, load with SDSS-specific wrapper 103 if (headerSets[0].exttype && !strcmp (headerSets[0].exttype, "UKIRT_OBJ")) { 104 LoadDataUKIRT (f, file[i], images, Nimages, &stars, Nstars, headers, extsize, headerSets, NheaderSets); 105 continue; 106 } 107 102 108 LoadData (f, file[i], images, Nimages, &stars, Nstars, headers, extsize, headerSets, NheaderSets, options); 103 109 -
branches/eam_branches/ipp-20150419/Ohana/src/addstar/src/MatchHeaders.c
r37967 r38167 39 39 } 40 40 41 // check for ukirt mode 42 if (Nheaders == 5) { 43 int myMode = GetFileMode (headers[1]); 44 if (myMode != UKIRT_OBJ) goto other_modes; 45 for (i = 2; i < 5; i++) { 46 myMode = GetFileMode (headers[i]); 47 if (myMode != UKIRT_OBJ) { 48 fprintf (stderr, "inconsistent headers for UKIRT\n"); 49 exit (2); 50 } 51 } 52 53 for (i = 1; i < Nheaders; i++) { 54 extsize[0][i] = headers[i][0].datasize + gfits_data_size (headers[i]); 55 56 gfits_scan (headers[i], ExtnameKeyword, "%s", 1, extname); 57 headerSets[Nimage].exttype = strcreate ("UKIRT_OBJ"); 58 headerSets[Nimage].extdata = strcreate (extname); 59 headerSets[Nimage].exthead = strcreate (extname); 60 headerSets[Nimage].extxrad = NULL; 61 headerSets[Nimage].extnum_data = i; 62 headerSets[Nimage].extnum_head = i; 63 headerSets[Nimage].extnum_xrad = -1; 64 Nimage ++; 65 } 66 *nimage = Nimage; 67 return headerSets; 68 } 69 70 other_modes: 71 41 72 // now examine the headers, count the table entries, find corresponding headers 42 73 for (i = 0; i < Nheaders; i++) { … … 71 102 if (!strcmp (exttype, "PS1_DV4")) goto keep; 72 103 if (!strcmp (exttype, "PS1_DV5")) goto keep; 104 73 105 continue; 74 106
Note:
See TracChangeset
for help on using the changeset viewer.
