Changeset 39446
- Timestamp:
- Mar 10, 2016, 6:12:05 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20160226/src/relastro/src/load_images.c
r39439 r39446 27 27 MARKTIME("build chip match: %f sec\n", dtime); 28 28 29 char mapfile[DVO_MAX_PATH];30 snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);31 table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE);32 33 // assign images.coords.offsetMap -> table->map[i]34 if (table) {35 AstromOffsetTableMatchChips (image, Nimage, table);36 } else {37 table = AstromOffsetTableInit ();38 }39 40 29 // select the images which overlap the selected sky regions 41 30 if (UseAllImages) { … … 54 43 } 55 44 45 /* unlock, if we can (else, unlocked below) and free, if we can */ 46 int unlockImages = !UPDATE || (RELASTRO_OP == OP_UPDATE_OFFSETS); 47 if (unlockImages) { 48 if (subset != image) { 49 // if we have generated an image subset and we are running UPDATE_OFFSETS, the we can free images here 50 free (image); 51 db[0].ftable.buffer = NULL; 52 BuildChipMatch (subset, Nsubset); 53 } 54 dvo_image_unlock (db); 55 } 56 57 char mapfile[DVO_MAX_PATH]; 58 snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR); 59 table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE); 60 61 // assign images.coords.offsetMap -> table->map[i] 62 if (table) { 63 AstromOffsetTableMatchChips (subset, Nsubset, table); 64 } else { 65 table = AstromOffsetTableInit (); 66 } 67 56 68 initImages (subset, LineNumber, Nsubset); 57 69 MARKTIME(" init images: %f sec\n", dtime); … … 60 72 MARKTIME(" init mosaics: %f sec\n", dtime); 61 73 62 /* unlock, if we can (else, unlocked below) */63 int unlockImages = !UPDATE || (RELASTRO_OP == OP_UPDATE_OFFSETS);64 if (unlockImages) dvo_image_unlock (db);65 66 74 return TRUE; 67 75 }
Note:
See TracChangeset
for help on using the changeset viewer.
