Changeset 31468
- Timestamp:
- May 6, 2011, 11:13:57 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110505/Ohana/src
- Files:
-
- 1 added
- 4 edited
-
getstar/src/getstar.c (modified) (2 diffs)
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/src/dvo_catalog_split.c (modified) (2 diffs)
-
libfits/table/F_copy_T.c (added)
-
relphot/src/relphot.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110505/Ohana/src/getstar/src/getstar.c
r31467 r31468 64 64 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 65 65 catalog.catflags = LOAD_AVES | LOAD_SECF; 66 if (needMeas) { 67 catalog.catflags |= LOAD_MEAS; 68 } 66 catalog.catflags |= needMeas ? LOAD_MEAS : SKIP_MEAS; 69 67 70 68 // an error exit status here is a significant error … … 98 96 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 99 97 catalog.catflags = LOAD_AVES | LOAD_SECF; 100 if (needMeas) { 101 catalog.catflags |= LOAD_MEAS; 102 } 98 catalog.catflags |= needMeas ? LOAD_MEAS : SKIP_MEAS; 103 99 104 100 // an error exit status here is a significant error -
branches/eam_branches/ipp-20110505/Ohana/src/libdvo/include/dvo.h
r31450 r31468 75 75 # define LOAD_MISS 0x04 76 76 # define LOAD_SECF 0x08 77 # define LOAD_MEAS_META 0x10 77 # define SKIP_AVES 0x10 78 # define SKIP_MEAS 0x20 79 # define SKIP_MISS 0x40 80 # define SKIP_SECF 0x80 81 82 // # define LOAD_MEAS_META 0x100 -- is this used?? 78 83 79 84 /* photometry code types */ -
branches/eam_branches/ipp-20110505/Ohana/src/libdvo/src/dvo_catalog_split.c
r31450 r31468 239 239 240 240 /*** Measure Table ***/ 241 status = dvo_catalog_open_subcat (catalog, &catalog[0].measure_catalog, ftable.header, "MEASURE", VERBOSE); 242 if (status == DVO_CAT_OPEN_FAIL) { 243 return (FALSE); 244 } 245 if ((status == DVO_CAT_OPEN_EMPTY) && (catalog[0].Nmeas_disk > 0)) { 246 return (FALSE); 241 if (!(catalog[0].catflags & SKIP_MEAS)) { 242 // unless we specify 'skip', we still need to load the 243 status = dvo_catalog_open_subcat (catalog, &catalog[0].measure_catalog, ftable.header, "MEASURE", VERBOSE); 244 if (status == DVO_CAT_OPEN_FAIL) { 245 return (FALSE); 246 } 247 if ((status == DVO_CAT_OPEN_EMPTY) && (catalog[0].Nmeas_disk > 0)) { 248 return (FALSE); 249 } 247 250 } 248 251 if ((status != DVO_CAT_OPEN_EMPTY) && (catalog[0].catflags & LOAD_MEAS)) { … … 262 265 } else { 263 266 // XXX is it necessary to generate a template header here? 267 // XXX this is a memory leak, right? 268 if (catalog[0].measure_catalog) { 269 gfits_free_header (&catalog[0].measure_catalog[0].header); 270 } else { 271 ALLOCATE (catalog[0].measure_catalog, Catalog, 1); 272 dvo_catalog_init (catalog[0].measure_catalog, TRUE); 273 } 264 274 gfits_create_header (&catalog[0].measure_catalog[0].header); 265 275 ALLOCATE (catalog[0].measure, Measure, 1); -
branches/eam_branches/ipp-20110505/Ohana/src/relphot/src/relphot.c
r31450 r31468 147 147 } 148 148 149 if (SOMETHING) { 150 FITS_DB dbX; 151 dbX.lockstate = LCK_XCLD; 152 dbX.timeout = 60.0; 153 gfits_db_init (&dbX); 154 char filename[1024]; 155 snprintf (filename, 1024, "%s.bck", ImageCat); 156 if (!gfits_db_lock (dbX, filename)) { 157 fprintf (stderr, "can't lock backup image image catalog\n"); 158 return (FALSE); 159 } 160 161 // copy header 162 gfits_copy_header (dbX.header, db.header); 163 gfits_copy_header (dbX.theader, db.theader); 164 gfits_copy_matrix (dbX.matrix, db.matrix); 165 gfits_copy_table (dbX.matrix, db.matrix); 166 167 // copy Images.dat to another structure 168 dvo_image_update (&db, VERBOSE); 169 dvo_image_unlock (&db); 170 } 171 149 172 if (USE_GRID) dump_grid (); 150 173 if (!UPDATE) exit (0);
Note:
See TracChangeset
for help on using the changeset viewer.
