IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36550


Ignore:
Timestamp:
Feb 25, 2014, 1:18:21 PM (12 years ago)
Author:
eugene
Message:

fix image table updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/relphot_parallel_regions.c

    r36520 r36550  
    1212  // load the RegionTable (UserRegion should not be used at this level)
    1313  RegionHostTable *regionHosts = RegionHostTableLoad (CATDIR, REGION_FILE);
     14  if (!regionHosts) {
     15    fprintf (stderr, "ERROR: problem with region host table\n");
     16    exit (2);
     17  }
    1418
    1519  // load the flat correction table (if defined)
     
    2832
    2933  /* lock and load the image db table */
     34  // XXX add optional case in which we do not update the db?
    3035  status = dvo_image_lock (&db, ImageCat, 60.0, (UPDATE ? LCK_XCLD : LCK_SOFT));
    3136  if (!status && UPDATE) {
     
    5459  slurp_image_mags (regionHosts, -1);
    5560
     61  if (!UPDATE) {
     62    dvo_image_unlock (&db);
     63    MARKTIME ("finished relphot -parallel-regions: %f sec total\n", dtime);
     64    fprintf (stderr, "NOTE: UPDATE is OFF (results are not saved)\n");
     65    exit (0);
     66  }
     67
    5668  /* update catalogs (in parallel) */
    5769  reload_catalogs (skylist, flatcorr, 0, NULL);
    5870
    59   // do not save changes if we did not make changes.
    60   dvo_image_update (&db, VERBOSE);
    61 
    62   if (!UPDATE) dvo_image_unlock (&db);
     71  // save the changes to the image parameters
     72  dvo_image_save (&db, VERBOSE);
    6373  dvo_image_unlock (&db);
     74  MARKTIME ("finished relphot -parallel-regions: %f sec total\n", dtime);
    6475
    6576  exit (0);
Note: See TracChangeset for help on using the changeset viewer.