Changeset 8395
- Timestamp:
- Aug 16, 2006, 2:32:53 PM (20 years ago)
- Location:
- trunk/Ohana/src/relastro/src
- Files:
-
- 1 deleted
- 1 edited
-
relastro.c (modified) (4 diffs)
-
relphot.c (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relastro/src/relastro.c
r6822 r8395 1 1 # include "relphot.h" 2 /** I'm not currently setting the lockfiles. this should be fixed! **/3 2 4 3 int main (int argc, char **argv) { … … 6 5 int i, status, Ncatalog; 7 6 Catalog *catalog; 8 GSCRegion fullregion, *region;9 7 FITS_DB db; 8 9 SkyList *skylist = NULL; 10 10 11 11 /* get configuration info, args */ 12 12 initialize (argc, argv); 13 13 14 /* register database handle with shutdown procedure */ 14 15 set_db (&db); 16 17 /* lock and load the image db table */ 15 18 status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT)); 16 19 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename); 17 20 if (db.dbstate == LCK_EMPTY) Shutdown ("ERROR: No images in catalog %s (1)", db.filename); 21 if (!dvo_image_load (&db, VERBOSE, FALSE)) Shutdown ("can't read image catalog %s", db.filename); 18 22 19 /* load regions and images based on seed region */ 20 // XXX EAM : load images and regions based on bounds, not name 21 region = load_images (&db, argv[1], &Ncatalog, &fullregion); 23 /* load regions and images based on specified sky patch */ 24 // XXX need to mimic old-style load by passing patch name 25 // XXX need to reduce number of global variables in use. 26 // XXX this is fairly lame: argv[1] is photcode if UserPatchSelect is true 27 skylist = load_images (&db, argv[1], &UserPatch, UserPatchSelect); 28 29 /* unlock, if we can (else, unlocked below) */ 22 30 if (!UPDATE) dvo_image_unlock (&db); 23 31 24 32 /* load catalog data from region files */ 25 catalog = load_catalogs ( region, Ncatalog, &fullregion);33 catalog = load_catalogs (skylist, &Ncatalog); 26 34 27 35 /* match measurements with images, mosaics */ … … 80 88 81 89 /* at this point, we have correct cal coeffs in the image/mosaic structures */ 82 f ree_catalogs (catalog, Ncatalog);90 for (i = 0; i < Ncatalog; i++) dvo_catalog_free (&catalog[i]); 83 91 freeImageBins (Ncatalog); 84 92 freeMosaicBins (Ncatalog); … … 86 94 87 95 /* load catalog data from region files, update Mrel include all data */ 88 reload_catalogs ( region, Ncatalog, &fullregion);96 reload_catalogs (skylist); 89 97 setMcalFinal (); 90 98 dvo_image_update (&db, VERBOSE);
Note:
See TracChangeset
for help on using the changeset viewer.
