IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 24, 2016, 10:03:04 AM (10 years ago)
Author:
eugene
Message:

add warp repair option (copied from relastro); free boundary & tessellation tree; free memory; call load_images in relphot_objects; when load_images is called by relphot_objects, free the full image set leaving only the subset; push SkyList load as high as possible

File:
1 edited

Legend:

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

    r39479 r39481  
    88  if (!mode) exit (2);
    99
     10  SkyList *skylist = NULL;
     11
    1012  SkyTable *sky = SkyTableLoadOptimal (CATDIR, NULL, NULL, TRUE, -1, VERBOSE);
    1113  if (!sky) {
     
    1517  SkyTableSetFilenames (sky, CATDIR, "cpt");
    1618 
    17   SkyList *skylist = NULL;
    18   if (UserCatalog) {
    19     int Nchar = strlen(UserCatalog);
    20     if (!strcmp (&UserCatalog[Nchar-4], ".cpt")) UserCatalog[Nchar-4] = 0;
    21     skylist = SkyListByName (sky, UserCatalog);
    22   } else {
    23     skylist = SkyListByPatch (sky, -1, &UserPatch);
    24   }
    25   if (!skylist) {
    26     fprintf (stderr, "ERROR setting up skylist for %s\n", CATDIR);
    27     exit (2);
     19  if ((mode != PARALLEL_REGIONS) && (mode != PARALLEL_IMAGES)) {
     20    skylist = NULL;
     21    if (UserCatalog) {
     22      int Nchar = strlen(UserCatalog);
     23      if (!strcmp (&UserCatalog[Nchar-4], ".cpt")) UserCatalog[Nchar-4] = 0;
     24      skylist = SkyListByName (sky, UserCatalog);
     25    } else {
     26      skylist = SkyListByPatch (sky, -1, &UserPatch);
     27    }
     28    if (!skylist) {
     29      fprintf (stderr, "ERROR setting up skylist for %s\n", CATDIR);
     30      exit (2);
     31    }
    2832  }
    2933 
     
    3741    case UPDATE_AVERAGES:
    3842      // take the current set of detections and set the mean magnitudes
    39       // DOES NOT LOAD THE IMAGE TABLE
    40       relphot_objects (sky, skylist, 0, NULL);
     43      relphot_objects (skylist, 0, NULL);
    4144      relphot_free (sky, skylist);
    4245      exit (0);
     
    4447    case SYNTH_PHOT:
    4548      // set the mean magnitudes ONLY for SYNPHOT objects
    46       relphot_synthphot (0, NULL);
     49      relphot_synthphot (skylist, 0, NULL);
    4750      relphot_free (sky, skylist);
    4851      exit (0);
     
    5053    case PARALLEL_REGIONS:
    5154      // run image updates in parallel across multiple remote machines
    52       relphot_parallel_regions ();
     55      relphot_parallel_regions (sky);
    5356      relphot_free (sky, skylist);
    5457      exit (0);
     
    5659    case PARALLEL_IMAGES:
    5760      // operation on the remote machines in the PARALLEL_REGION mode
    58       relphot_parallel_images ();
     61      relphot_parallel_images (sky);
    5962      relphot_free (sky, skylist);
    6063      exit (0);
Note: See TracChangeset for help on using the changeset viewer.