Changeset 8392
- Timestamp:
- Aug 16, 2006, 2:30:23 PM (20 years ago)
- Location:
- trunk/Ohana/src/getstar
- Files:
-
- 5 deleted
- 2 edited
-
Makefile (modified) (1 diff)
-
src/gcatalog.c (deleted)
-
src/getstar.c (modified) (4 diffs)
-
src/init_catalog.c (deleted)
-
src/load_pt_catalog.c (deleted)
-
src/mkcatalog.c (deleted)
-
src/wcatalog.c (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/getstar/Makefile
r6968 r8392 24 24 $(SRC)/Shutdown.$(ARCH).o \ 25 25 $(SRC)/SetSignals.$(ARCH).o \ 26 $(SRC)/gcatalog.$(ARCH).o \ 27 $(SRC)/load_pt_catalog.$(ARCH).o \ 28 $(SRC)/select_by_region.$(ARCH).o \ 29 $(SRC)/wcatalog.$(ARCH).o \ 30 $(SRC)/init_catalog.$(ARCH).o \ 31 $(SRC)/mkcatalog.$(ARCH).o 26 $(SRC)/select_by_region.$(ARCH).o 32 27 33 28 OBJ = $(GETSTAR) -
trunk/Ohana/src/getstar/src/getstar.c
r6968 r8392 16 16 SkyTableSetFilenames (sky, CATDIR, "cpt"); 17 17 18 /* choose elements to load based on options */ 19 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF; 20 init_catalog (&output); 18 // create an output catalog with the desired name and format options 19 output.filename = OUTPUT; 20 output.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 21 output.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 22 output.Nsecfilt = GetPhotcodeNsecfilt (); 23 dvo_catalog_open (&output, NULL, VERBOSE, "w"); 21 24 22 25 switch (MODE) { … … 28 31 skylist = SkyListByPatch (sky, -1, ®ION); 29 32 for (i = 0; i < skylist[0].Nregions; i++) { 33 // set the parameters which guide catalog open/load/create 30 34 catalog.filename = skylist[0].filename[i]; 31 load_pt_catalog (&catalog, skylist[0].regions[i]); 32 unlock_catalog (&catalog); 35 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 36 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF; 37 38 // an error exit status here is a significant error 39 if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "r")) { 40 fprintf (stderr, "ERROR: failure to open/create catalog file %s\n", catalog.filename); 41 exit (2); 42 } 43 if (!catalog.Nave_disk) { 44 dvo_catalog_unlock (&catalog); 45 dvo_catalog_free (&catalog); 46 continue; 47 } 48 dvo_catalog_unlock (&catalog); 33 49 34 50 /* skip empty catalogs */ 35 if (catalog.Nave_disk == 0) continue;36 51 select_by_region (&output, &catalog, ®ION, 0, 0); 37 52 } … … 46 61 skylist = SkyListByImage (sky, -1, &image, &Nimage); 47 62 for (i = 0; i < skylist[0].Nregions; i++) { 48 catalog.filename = skylist[0].filename[i]; 49 load_pt_catalog (&catalog, skylist[0].regions[i]); 50 unlock_catalog (&catalog); 63 // set the parameters which guide catalog open/load/create 64 catalog.filename = skylist[0].filename[i]; 65 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 66 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF; 51 67 52 /* skip empty catalogs */ 53 if (catalog.Nave_disk == 0) continue; 54 stars = select_by_image (&catalog, &image, 0, 0, stars, &Nstars); 68 // an error exit status here is a significant error 69 if (!dvo_catalog_open (&catalog, skylist[0].regions[i], VERBOSE, "r")) { 70 fprintf (stderr, "ERROR: failure to open/create catalog file %s\n", catalog.filename); 71 exit (2); 72 } 73 /* skip empty catalogs */ 74 if (!catalog.Nave_disk) continue; 75 stars = select_by_image (&catalog, &image, 0, 0, stars, &Nstars); 55 76 } 56 77 # endif … … 70 91 71 92 /* write out the selected stars */ 72 wcatalog (OUTPUT, &output); 93 // XXX need to set the catalog boundaries by hand? RA0-RA1, DEC0-DEC1 94 dvo_catalog_save (&output, VERBOSE); 95 dvo_catalog_unlock (&output); 96 dvo_catalog_free (&output); 73 97 fprintf (stderr, "SUCCESS\n"); 74 98 exit (0); 75 76 99 }
Note:
See TracChangeset
for help on using the changeset viewer.
