IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36574


Ignore:
Timestamp:
Mar 4, 2014, 5:27:20 PM (12 years ago)
Author:
eugene
Message:

relastro -parallel-regions basically works; now need to test the results

Location:
branches/eam_branches/ipp-20140206/Ohana/src/relastro
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/include/relastro.h

    r36569 r36574  
    2929typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode;
    3030
    31 typedef enum {TARGET_NONE, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED, TARGET_MERGE_SOURCE, TARGET_UPDATE_OBJECTS, TARGET_UPDATE_OFFSETS, TARGET_LOAD_OBJECTS, TARGET_HPM, TARGET_PARALLEL_REGIONS, TARGET_PARALLEL_IMAGES} FitTarget;
     31typedef enum {OP_NONE, OP_IMAGES, OP_HIGH_SPEED, OP_MERGE_SOURCE, OP_UPDATE_OBJECTS, OP_UPDATE_OFFSETS, OP_LOAD_OBJECTS, OP_HPM, OP_PARALLEL_REGIONS, OP_PARALLEL_IMAGES} RelastroOp;
     32
     33typedef enum {TARGET_NONE, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS} FitTarget;
    3234
    3335typedef enum {
     
    118120  unsigned int start;
    119121  unsigned int stop;
     122  off_t myImage;
    120123  float Mcal;
    121124  float dMcal;
     
    233236FitMode FIT_MODE;
    234237
     238RelastroOp RELASTRO_OP;
    235239FitTarget FIT_TARGET;
    236240
     
    495499int share_mean_pos (Catalog *catalog, int Ncatalog, RegionHostTable *regionHosts, int nloop);
    496500int slurp_mean_pos (Catalog *catalog, int Ncatalog, RegionHostTable *regionHosts, int nloop);
    497 int set_mean_pos (MeanPos *meanpos, AverageTiny *average);
     501int set_mean_pos (MeanPos *meanpos, Average *average);
    498502MeanPos *merge_mean_pos (MeanPos *target, int *ntarget, MeanPos *source, int Nsource);
    499503
     
    516520Image *ImageTableLoad(char *filename, off_t *nimage);
    517521int ImageTableSave (char *filename, Image *images, off_t Nimages);
     522int select_mosaics_hostregion (RegionHostTable *regionHosts, Image *image, off_t Nimage);
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/ConfigInit.c

    r35105 r36574  
    1818  if (VERBOSE) fprintf (stderr, "loaded config file: %s\n", file);
    1919
    20   GetConfig (config, "RELASTRO_SIGMA_LIM",         "%lf", 0, &SIGMA_LIM); // exclude measurements on this basis
    21   GetConfig (config, "RELASTRO_SRC_MEAS_TOOFEW",   "%d",  0, &SRC_MEAS_TOOFEW);
     20  // set defaults for all of these if they are not used by parallel / remote clients
     21  if (!ScanConfig (config, "RELASTRO_SIGMA_LIM",         "%lf", 0, &SIGMA_LIM))       SIGMA_LIM = 0.01;
     22  if (!ScanConfig (config, "RELASTRO_SRC_MEAS_TOOFEW",   "%d",  0, &SRC_MEAS_TOOFEW)) SRC_MEAS_TOOFEW = 3;
    2223
    2324  if (!ScanConfig (config, "RELASTRO_IMFIT_CLIP_NITER",    "%d",  0, &IMFIT_CLIP_NITER))    IMFIT_CLIP_NITER  = 3;
     
    2526  if (!ScanConfig (config, "RELASTRO_IMFIT_SYS_SIGMA_LIM", "%lf", 0, &IMFIT_SYS_SIGMA_LIM)) IMFIT_SYS_SIGMA_LIM = 0.01;
    2627
    27   GetConfig (config, "PM_DT_MIN",              "%lf", 0, &PM_DT_MIN);
    28   GetConfig (config, "PM_TOOFEW",              "%d",  0, &PM_TOOFEW);
    29   GetConfig (config, "POS_TOOFEW",             "%d",  0, &POS_TOOFEW);
     28  if (!ScanConfig (config, "PM_DT_MIN",              "%lf", 0, &PM_DT_MIN))        PM_DT_MIN = 0.25;   
     29  if (!ScanConfig (config, "PM_TOOFEW",              "%d",  0, &PM_TOOFEW))        PM_TOOFEW = 4;   
     30  if (!ScanConfig (config, "POS_TOOFEW",             "%d",  0, &POS_TOOFEW))       POS_TOOFEW = 1; 
     31  if (!ScanConfig (config, "PAR_FACTOR_MIN",         "%lf", 0, &PAR_FACTOR_MIN))   PAR_FACTOR_MIN = 0.2;
     32  if (!ScanConfig (config, "RELASTRO_MAP_NX",        "%d",  0, &NX_MAP))           NX_MAP = 5;
     33  if (!ScanConfig (config, "RELASTRO_MAP_NY",        "%d",  0, &NY_MAP))           NY_MAP = 5;
     34  if (!ScanConfig (config, "RELASTRO_DPOS_MAX",      "%lf", 0, &DPOS_MAX))         DPOS_MAX = 6.0;   
     35  if (!ScanConfig (config, "ADDSTAR_RADIUS",         "%lf", 0, &ADDSTAR_RADIUS))   ADDSTAR_RADIUS = 1.0;
    3036
    31   GetConfig (config, "PAR_FACTOR_MIN",         "%lf", 0, &PAR_FACTOR_MIN);
    32 
    33   GetConfig (config, "RELASTRO_MAP_NX",        "%d",  0, &NX_MAP);
    34   GetConfig (config, "RELASTRO_MAP_NY",        "%d",  0, &NY_MAP);
    35   GetConfig (config, "RELASTRO_DPOS_MAX",      "%lf", 0, &DPOS_MAX);
    36   GetConfig (config, "ADDSTAR_RADIUS",         "%lf", 0, &ADDSTAR_RADIUS);
    37 
    38   if (!ScanConfig (config, "USE_FIXED_PIXCOORDS", "%d", 0, &USE_FIXED_PIXCOORDS)) {
    39     USE_FIXED_PIXCOORDS = FALSE;
    40   }
     37  if (!ScanConfig (config, "USE_FIXED_PIXCOORDS", "%d", 0, &USE_FIXED_PIXCOORDS))  USE_FIXED_PIXCOORDS = FALSE;
    4138
    4239  // force CATDIR to be absolute (so parallel mode will work)
     
    5653  sprintf (ImageCat, "%s/Images.dat", CATDIR);
    5754
    58   if (!ScanConfig (config, "SKY_DEPTH",         "%d",  0, &SKY_DEPTH)) {
    59     SKY_DEPTH = 2;
    60   }
    61   if (!ScanConfig (config, "SKY_TABLE",         "%s",  0, SKY_TABLE)) {
    62     SKY_TABLE[0] = 0;
    63   }
     55  if (!ScanConfig (config, "SKY_DEPTH",         "%d",  0, &SKY_DEPTH)) SKY_DEPTH = 2;
     56  if (!ScanConfig (config, "SKY_TABLE",         "%s",  0, SKY_TABLE)) SKY_TABLE[0] = 0;
    6457
    6558  if (*CATMODE == 0) strcpy (CATMODE, "RAW");
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/ImagePosIO.c

    r36565 r36574  
    199199  ALLOCATE (pc2_1     ,         float ,          Nimage_pos);
    200200  ALLOCATE (pc2_2     ,         float ,          Nimage_pos);
    201   ALLOCATE (polyterms ,         float ,          Nimage_pos);
    202   ALLOCATE (ctype     ,         char  ,          Nimage_pos);
     201  ALLOCATE (polyterms ,         float ,          14*Nimage_pos);
     202  ALLOCATE (ctype     ,         char  ,          15*Nimage_pos);
    203203  ALLOCATE (Npolyterms,         char  ,          Nimage_pos);
    204204  ALLOCATE (dXpixSys  ,         float ,          Nimage_pos);
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/MosaicOps.c

    r36571 r36574  
    105105    mosaic[Nmosaic].secz  = image[i].secz;
    106106    mosaic[Nmosaic].coords = image[i].coords;
     107    mosaic[Nmosaic].myImage = i;
    107108
    108109    // init the mosaic_own_images array data
     
    250251  if (im >= Nmosaic_for_images) abort();
    251252
    252   // search for the mosaic that
     253  // search for the mosaic that matches this image
    253254  mos = mosaic_for_images[im];
    254255  if (mos < 0) return NULL;
     
    257258}
    258259
     260// extend each host image table to include the mosaic 'images' needed by the host
    259261int select_mosaics_hostregion (RegionHostTable *regionHosts, Image *image, off_t Nimage) {
    260262
     263  int i;
     264  off_t j;
     265  char *mosaicUsed;
     266
    261267  ALLOCATE (mosaicUsed, char, Nmosaic);
    262   memset (mosaicUsed, 0, Nmosaic * sizeof(char));
    263268
    264269  // we need to add the mosaics to each of the region hosts lists of images
    265270  for (i = 0; i < regionHosts->Nhosts; i++) {
    266271
     272    int Nadd = 0;
     273    int NADD = 100;
     274    off_t *addMosaic = NULL;
     275    ALLOCATE (addMosaic, off_t, NADD);
     276
     277    // reset the mosaicUsed flags (valid only for this host)
     278    memset (mosaicUsed, 0, Nmosaic * sizeof(char));
     279
    267280    RegionHostInfo *host = &regionHosts->hosts[i];
    268281
    269282    // find the mosaics associated with a given
    270     for (j = 0; j < host->Nimages; j++) {
     283    for (j = 0; j < host->Nimage; j++) {
    271284
    272285      int im = host->imseq[j];
     
    275288      if (im >= Nmosaic_for_images) abort();
    276289
    277       // search for the mosaic that
     290      // search for the mosaic that matches this image (skip unmatched images)
    278291      off_t mos = mosaic_for_images[im];
    279       if (mos < 0) return NULL;
    280 
    281       // &mosaic[mos];
    282       // XXX do what?
    283     }
    284 
    285 }
    286 
     292      if (mos < 0) continue;
     293
     294      if (mosaicUsed[mos]) continue;
     295
     296      mosaicUsed[mos] = TRUE;
     297      addMosaic[Nadd] = mos;
     298      Nadd ++;
     299     
     300      CHECK_REALLOCATE (addMosaic, off_t, NADD, Nadd, 100);
     301    }
     302
     303    REALLOCATE (host->image, Image, host->Nimage + Nadd);
     304
     305    for (j = 0; j < Nadd; j++) {
     306      off_t mos = addMosaic[j];
     307      off_t mos_im = mosaic[mos].myImage;
     308
     309      host->image[host->Nimage + j] = image[mos_im];
     310    }
     311   
     312    host->Nimage += Nadd;
     313  }
     314  return TRUE;
     315}
     316
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/UpdateObjects.c

    r36482 r36574  
    205205      if (((mode == FIT_PM_ONLY) || (mode == FIT_PM_AND_PAR)) && (N <= PM_TOOFEW)) mode = FIT_AVERAGE;
    206206
    207       if (FIT_TARGET == TARGET_HIGH_SPEED) {
     207      if (RELASTRO_OP == OP_HIGH_SPEED) {
    208208          Tmean = 0.5*(Tmax - Tmin);
    209209      } else {
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/args.c

    r36569 r36574  
    1313  /* possible operations */
    1414  FIT_TARGET = TARGET_NONE;
     15  RELASTRO_OP = OP_NONE;
    1516  FIT_MODE = FIT_AVERAGE;
    1617
     
    2122    if (N > argc - 6) usage_merge_source();
    2223    if (strcmp(argv[N+3], "into")) usage_merge_source();
    23     FIT_TARGET = TARGET_MERGE_SOURCE;
     24    RELASTRO_OP = OP_MERGE_SOURCE;
    2425    remove_argument (N, &argc, argv);
    2526    OBJ_ID_SRC = strtol(argv[N], &endptr, 0);
     
    4344  if ((N = get_argument (argc, argv, "-update-objects"))) {
    4445    remove_argument (N, &argc, argv);
    45     FIT_TARGET = TARGET_UPDATE_OBJECTS;
     46    RELASTRO_OP = OP_UPDATE_OBJECTS;
    4647  }
    4748
    4849  if ((N = get_argument (argc, argv, "-update-offsets"))) {
    4950    remove_argument (N, &argc, argv);
    50     FIT_TARGET = TARGET_UPDATE_OFFSETS;
     51    RELASTRO_OP = OP_UPDATE_OFFSETS;
    5152  }
    5253
     
    6970  if ((N = get_argument (argc, argv, "-parallel-images"))) {
    7071    remove_argument (N, &argc, argv);
    71     FIT_TARGET = TARGET_PARALLEL_IMAGES;
     72    RELASTRO_OP = OP_PARALLEL_IMAGES;
    7273    if (N >= argc) usage();
    7374    IMAGE_TABLE = strcreate (argv[N]);
     
    7677  }
    7778
     79  if ((N = get_argument (argc, argv, "-images"))) {
     80    remove_argument (N, &argc, argv);
     81    RELASTRO_OP = OP_IMAGES;
     82  }
     83
    7884  PARALLEL_REGIONS_MANUAL = FALSE;
    7985  if ((N = get_argument (argc, argv, "-parallel-regions"))) {
    8086    remove_argument (N, &argc, argv);
    81     FIT_TARGET = TARGET_PARALLEL_REGIONS;
     87    RELASTRO_OP = OP_PARALLEL_REGIONS;
    8288    if (!REGION_FILE) usage();
    8389    if ((N = get_argument (argc, argv, "-parallel-regions-manual"))) {
     
    126132    // XXX include a parallax / no-parallax option
    127133    if (N >= argc - 4) usage();
    128     FIT_TARGET = TARGET_HIGH_SPEED;
     134    RELASTRO_OP = OP_HIGH_SPEED;
    129135    remove_argument (N, &argc, argv);
    130136    PHOTCODE_A_LIST = strcreate(argv[N]);
     
    140146  if ((N = get_argument (argc, argv, "-hpm"))) {
    141147    if (N >= argc - 2) usage();
    142     FIT_TARGET = TARGET_HPM;
     148    RELASTRO_OP = OP_HPM;
    143149    remove_argument (N, &argc, argv);
    144150    RADIUS = atof(argv[N]);
     
    152158    remove_argument (N, &argc, argv);
    153159    PARALLEL_OUTPUT = TRUE;
    154     if ((FIT_TARGET != TARGET_HIGH_SPEED) && (FIT_TARGET != TARGET_HPM)) {
     160    if ((RELASTRO_OP != OP_HIGH_SPEED) && (RELASTRO_OP != OP_HPM)) {
    155161      fprintf (stderr, "-parallel-output only valid for -high-speed or -hpm modes\n");
    156162      exit (1);
     
    179185  }
    180186
    181   if (FIT_TARGET == TARGET_NONE) usage();
     187  if (RELASTRO_OP == OP_NONE) usage();
     188
     189  if (((RELASTRO_OP == OP_IMAGES) || (RELASTRO_OP == OP_PARALLEL_REGIONS) || (RELASTRO_OP == OP_PARALLEL_IMAGES)) && (FIT_TARGET == TARGET_NONE)) usage();
    182190
    183191  /* specify portion of the sky : allow default of all sky? */
     
    463471
    464472  /* possible operations */
    465   FIT_TARGET = TARGET_NONE;
     473  RELASTRO_OP = TARGET_NONE;
    466474  FIT_MODE = FIT_AVERAGE;
    467475
     
    498506    BCATALOG = strcreate(argv[N]);
    499507    remove_argument (N, &argc, argv);
    500     FIT_TARGET = TARGET_LOAD_OBJECTS;
     508    RELASTRO_OP = OP_LOAD_OBJECTS;
    501509  }
    502510
    503511  if ((N = get_argument (argc, argv, "-update-objects"))) {
    504512    remove_argument (N, &argc, argv);
    505     FIT_TARGET = TARGET_UPDATE_OBJECTS;
     513    RELASTRO_OP = OP_UPDATE_OBJECTS;
    506514  }
    507515
    508516  if ((N = get_argument (argc, argv, "-update-offsets"))) {
    509517    remove_argument (N, &argc, argv);
    510     FIT_TARGET = TARGET_UPDATE_OFFSETS;
     518    RELASTRO_OP = OP_UPDATE_OFFSETS;
    511519  }
    512520
     
    528536    // XXX include a parallax / no-parallax option
    529537    if (N >= argc - 5) usage_client();
    530     FIT_TARGET = TARGET_HIGH_SPEED;
     538    RELASTRO_OP = OP_HIGH_SPEED;
    531539    remove_argument (N, &argc, argv);
    532540    PHOTCODE_A_LIST = strcreate(argv[N]);
     
    542550  if ((N = get_argument (argc, argv, "-hpm"))) {
    543551    if (N >= argc - 3) usage();
    544     FIT_TARGET = TARGET_HPM;
     552    RELASTRO_OP = OP_HPM;
    545553    remove_argument (N, &argc, argv);
    546554    RADIUS = atof(argv[N]);
     
    580588  }
    581589
    582   if (FIT_TARGET == TARGET_NONE) usage_client();
     590  if (RELASTRO_OP == OP_NONE) usage_client();
    583591
    584592  /* specify portion of the sky : allow default of all sky? */
     
    759767
    760768void usage () {
    761   fprintf (stderr, "ERROR: USAGE: relastro -update-simple [options]\n");
    762   fprintf (stderr, "       OR:    relastro -update-chips [options]\n");
    763   fprintf (stderr, "       OR:    relastro -update-mosaic [options]\n");
     769  fprintf (stderr, "ERROR: USAGE: relastro -images -update-simple [options]\n");
     770  fprintf (stderr, "       OR:    relastro -images -update-chips [options]\n");
     771  fprintf (stderr, "       OR:    relastro -images -update-mosaic [options]\n");
     772  fprintf (stderr, "       OR:    relastro -parallel-regions -update-simple [options]\n");
     773  fprintf (stderr, "       OR:    relastro -parallel-regions -update-chips [options]\n");
     774  fprintf (stderr, "       OR:    relastro -parallel-regions -update-mosaic [options]\n");
     775  fprintf (stderr, "       OR:    relastro -parallel-images -update-simple [options]\n");
     776  fprintf (stderr, "       OR:    relastro -parallel-images -update-chips [options]\n");
     777  fprintf (stderr, "       OR:    relastro -parallel-images -update-mosaic [options]\n");
    764778  fprintf (stderr, "       OR:    relastro -update-objects [options]\n");
    765779  fprintf (stderr, "       OR:    relastro -high-speed [options]\n");
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/assign_images.c

    r36571 r36574  
    3838  // supply the mosaics to the image table for the regionHosts : we already have the image
    3939  // <-> mosaic relationship, we just need to select these mosaics (once per regionHost)
    40   // XXX DEFINE ME: select_mosaics_hostregion (regionHosts, image, Nimage);
    41   abort ();
     40  select_mosaics_hostregion (regionHosts, image, Nimage);
    4241
    4342  return TRUE;
     
    136135      regionHosts->hosts[i].NIMAGE += D_NIMAGE;
    137136      REALLOCATE (regionHosts->hosts[i].image, Image, regionHosts->hosts[i].NIMAGE);
    138       // REALLOCATE (regionHosts->hosts[i].line_number, off_t, regionHosts->hosts[i].NIMAGE);
     137      REALLOCATE (regionHosts->hosts[i].imseq, off_t, regionHosts->hosts[i].NIMAGE);
    139138    }
    140139  }
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/indexCatalogs.c

    r36565 r36574  
    3131    objIDmax[i] = 0;
    3232    for (j = 0; j < catalog[i].Naverage; j++) {
    33       objIDmax[i] = MAX (catalog[i].averageT[j].objID, objIDmax[i]);
     33      objIDmax[i] = MAX (catalog[i].average[j].objID, objIDmax[i]);
    3434    }
    3535
     
    4040
    4141    for (j = 0; j < catalog[i].Naverage; j++) {
    42       int objID = catalog[i].averageT[j].objID;
     42      int objID = catalog[i].average[j].objID;
    4343      objIDseq[i][objID] = j;
    4444    }
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/initialize.c

    r34429 r36574  
    66  args (argc, argv);
    77
    8   if (FIT_TARGET == TARGET_MERGE_SOURCE) return;
     8  if (RELASTRO_OP == OP_MERGE_SOURCE) return;
    99
    1010  fprintf (stderr, "PHOTCODE_KEEP_LIST: %s\n", PHOTCODE_KEEP_LIST);
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/launch_region_hosts.c

    r36569 r36574  
    5858              filename, REGION_FILE, host->hostID, CATDIR, host->RminCat, host->RmaxCat, host->DminCat, host->DmaxCat, STATMODE, MIN_ERROR);
    5959
     60    switch (FIT_TARGET) {
     61      case TARGET_SIMPLE:
     62        strextend (command, "-update-simple");
     63        break;
     64      case TARGET_CHIPS:
     65        strextend (command, "-update-chips");
     66        break;
     67      case TARGET_MOSAICS:
     68        strextend (command, "-update-mosaics");
     69        break;
     70      case TARGET_NONE:
     71        abort();
     72    }
     73
    6074    if (VERBOSE)            strextend (command, "-v");
    6175    if (VERBOSE2)           strextend (command, "-vv");
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/load_images.c

    r36569 r36574  
    2828 
    2929  /* unlock, if we can (else, unlocked below) */
    30   int unlockImages = !UPDATE || (FIT_TARGET == TARGET_UPDATE_OFFSETS);
     30  int unlockImages = !UPDATE || (RELASTRO_OP == OP_UPDATE_OFFSETS);
    3131  if (unlockImages) dvo_image_unlock (db);
    3232
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/markObjects.c

    r36565 r36574  
    88  // How strongly do I own this object?
    99  for (i = 0; i < Ncatalog; i++) {
     10    ALLOCATE (catalog[i].nOwn, int, catalog[i].Naverage);
     11    memset (catalog[i].nOwn, 0, catalog[i].Naverage*sizeof(int));
    1012    for (j = 0; j < catalog[i].Naverage; j++) {
    1113      int nOwn = 0;
    12       int m = catalog[i].averageT[j].measureOffset;
    13       for (n = 0; n < catalog[i].averageT[j].Nmeasure; n++) {
     14      int m = catalog[i].average[j].measureOffset;
     15      for (n = 0; n < catalog[i].average[j].Nmeasure; n++) {
    1416        if (!catalog[i].measureT[m+n].myDet) continue;
    1517        nOwn ++;
    1618      }
    17       catalog[i].averageT[j].nOwn = nOwn;
     19      catalog[i].nOwn[j] = nOwn;
    1820    }
    1921  }
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro.c

    r36564 r36574  
    1010  SkyList *skylist = SkyListByPatch (sky, -1, &UserPatch);
    1111
    12   switch (FIT_TARGET) {
    13     case TARGET_UPDATE_OBJECTS:
     12  switch (RELASTRO_OP) {
     13    case OP_UPDATE_OBJECTS:
    1414      /* the object analysis is a separate process iterating over catalogs */
    1515      relastro_objects (skylist, 0, NULL);
    1616      exit (0);
    1717
    18     case TARGET_HIGH_SPEED:
     18    case OP_HIGH_SPEED:
    1919      /* high-speed is a 2pt cross-correlation process for linking moving objects (high PM) */
    2020      high_speed_catalogs (sky, skylist, 0, NULL);
    2121      exit (0);
    2222
    23     case TARGET_HPM:
     23    case OP_HPM:
    2424      hpm_catalogs (sky, skylist, 0, NULL);
    2525      exit (0);
    2626
    27     case TARGET_MERGE_SOURCE:
     27    case OP_MERGE_SOURCE:
    2828      /* a special method to manually merge unlinked detections of sources togther (not parallel) */
    2929      relastro_merge_source (sky);
    3030      exit (0);
    3131
    32     case TARGET_SIMPLE:
    33     case TARGET_CHIPS:
    34     case TARGET_MOSAICS:
     32    case OP_IMAGES:
    3533      relastro_images (skylist);
    3634      exit (0);
    3735
    38     case TARGET_UPDATE_OFFSETS:
     36    case OP_UPDATE_OFFSETS:
    3937      // iterate over catalogs to make detection coordinates consistant
    4038      UpdateObjectOffsets (skylist, 0, NULL);
    4139      exit (0);
    4240
    43     case TARGET_PARALLEL_REGIONS:
     41    case OP_PARALLEL_REGIONS:
    4442      // run image updates in parallel across multiple remote machines
    4543      relastro_parallel_regions ();
    4644      exit (0);
    4745
    48     case TARGET_PARALLEL_IMAGES:
     46    case OP_PARALLEL_IMAGES:
    4947      // operation on the remote machines in the PARALLEL_REGION mode
    5048      relastro_parallel_images ();
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro_client.c

    r35763 r36574  
    2828  SkyList *skylist = SkyListByPatch (sky, -1, &UserPatch);
    2929
    30   switch (FIT_TARGET) {
     30  switch (RELASTRO_OP) {
    3131
    32     case TARGET_LOAD_OBJECTS: {
     32    case OP_LOAD_OBJECTS: {
    3333      // USAGE: relastro_client -load-objects
    3434      int Ncatalog;
     
    4646    }
    4747     
    48     case TARGET_UPDATE_OBJECTS: {
     48    case OP_UPDATE_OBJECTS: {
    4949      // USAGE: relastro_client -update-objects
    5050      relastro_objects (skylist, HOST_ID, HOSTDIR);
     
    5252    }
    5353
    54     case TARGET_HIGH_SPEED: {
     54    case OP_HIGH_SPEED: {
    5555      // USAGE: relastro_client -high-speed
    5656      high_speed_catalogs (sky, skylist, HOST_ID, HOSTDIR);
     
    5858    }
    5959
    60     case TARGET_HPM: {
     60    case OP_HPM: {
    6161      // USAGE: relastro_client -high-speed
    6262      hpm_catalogs (sky, skylist, HOST_ID, HOSTDIR);
     
    6565
    6666      // XXX loading the images is fairly costly -- see if we can do an image subset
    67     case TARGET_UPDATE_OFFSETS: {
     67    case OP_UPDATE_OFFSETS: {
    6868      FITS_DB db;
    6969     
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro_objects.c

    r35763 r36574  
    144144    // PM_TOOFEW
    145145    // SRC_MEAS_TOOFEW
    146     // FIT_TARGET
    147146
    148147    char command[1024];
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro_parallel_regions.c

    r36564 r36574  
    6060  if (PARALLEL) {
    6161    // save the updated image parameters
    62     dvo_image_update (&db, VERBOSE);
     62    dvo_image_save (&db, VERBOSE);
    6363    dvo_image_unlock (&db);
    6464  }
     
    6969  if (!PARALLEL) {
    7070    // save the changes to the image parameters
    71     // XXX if we have generated a vtable, we can use update; otherwise use save
    72     // dvo_image_save (&db, VERBOSE);
    73     dvo_image_update (&db, VERBOSE);
     71    dvo_image_save (&db, VERBOSE);
    7472    dvo_image_unlock (&db);
    7573  }
  • branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/share_mean_pos.c

    r36569 r36574  
    2525
    2626      // do I own this object? (in region range?) --- CAREFUL HERE!!
    27       if (catalog[i].averageT[j].R <  Rmin) continue;
    28       if (catalog[i].averageT[j].R >= Rmax) continue;
    29       if (catalog[i].averageT[j].D <  Dmin) continue;
    30       if (catalog[i].averageT[j].D >= Dmax) continue;
     27      if (catalog[i].average[j].R <  Rmin) continue;
     28      if (catalog[i].average[j].R >= Rmax) continue;
     29      if (catalog[i].average[j].D <  Dmin) continue;
     30      if (catalog[i].average[j].D >= Dmax) continue;
    3131
    3232      // does this object have missing detections (does someone else need it?)
    3333      // XXX : sky objects without missing detections
    3434      // XXX watch out for detections which are not associated with an image (REF)
    35       if (catalog[i].averageT[j].nOwn == catalog[i].averageT[j].Nmeasure) continue;
     35      if (catalog[i].nOwn[j] == catalog[i].average[j].Nmeasure) continue;
    3636
    37       set_mean_pos (&meanpos[Nmeanpos], &catalog[i].averageT[j]);
     37      set_mean_pos (&meanpos[Nmeanpos], &catalog[i].average[j]);
    3838      Nmeanpos ++;
    3939      CHECK_REALLOCATE (meanpos, MeanPos, NMEANPOS, Nmeanpos, D_NMEANPOS);
     
    9494    }
    9595
    96     catalog[catSeq].averageT[objSeq].R = meanpos[i].R;
    97     catalog[catSeq].averageT[objSeq].D = meanpos[i].D;
     96    catalog[catSeq].average[objSeq].R = meanpos[i].R;
     97    catalog[catSeq].average[objSeq].D = meanpos[i].D;
    9898  }
    9999
     
    103103}
    104104
    105 int set_mean_pos (MeanPos *meanpos, AverageTiny *average) {
     105int set_mean_pos (MeanPos *meanpos, Average *average) {
    106106
    107107  meanpos->R     = average->R;
Note: See TracChangeset for help on using the changeset viewer.