IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8395


Ignore:
Timestamp:
Aug 16, 2006, 2:32:53 PM (20 years ago)
Author:
eugene
Message:

replaced relastro with relphot

Location:
trunk/Ohana/src/relastro/src
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relastro/src/relastro.c

    r6822 r8395  
    11# include "relphot.h"
    2 /** I'm not currently setting the lockfiles.  this should be fixed! **/
    32
    43int main (int argc, char **argv) {
     
    65  int i, status, Ncatalog;
    76  Catalog *catalog;
    8   GSCRegion fullregion, *region;
    97  FITS_DB db;
     8
     9  SkyList *skylist = NULL;
    1010
    1111  /* get configuration info, args */
    1212  initialize (argc, argv);
    1313
     14  /* register database handle with shutdown procedure */
    1415  set_db (&db);
     16
     17  /* lock and load the image db table */
    1518  status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT));
    1619  if (!status) Shutdown ("ERROR: failure to lock image catalog %s", db.filename);
    1720  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);
    1822
    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) */
    2230  if (!UPDATE) dvo_image_unlock (&db);
    2331
    2432  /* load catalog data from region files */
    25   catalog = load_catalogs (region, Ncatalog, &fullregion);
     33  catalog = load_catalogs (skylist, &Ncatalog);
    2634
    2735  /* match measurements with images, mosaics */
     
    8088
    8189  /* at this point, we have correct cal coeffs in the image/mosaic structures */
    82   free_catalogs (catalog, Ncatalog);
     90  for (i = 0; i < Ncatalog; i++) dvo_catalog_free (&catalog[i]);
    8391  freeImageBins (Ncatalog);
    8492  freeMosaicBins (Ncatalog);
     
    8694
    8795  /* load catalog data from region files, update Mrel include all data */
    88   reload_catalogs (region, Ncatalog, &fullregion);
     96  reload_catalogs (skylist);
    8997  setMcalFinal ();
    9098  dvo_image_update (&db, VERBOSE);
Note: See TracChangeset for help on using the changeset viewer.