Changeset 36574
- Timestamp:
- Mar 4, 2014, 5:27:20 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140206/Ohana/src/relastro
- Files:
-
- 17 edited
-
include/relastro.h (modified) (5 diffs)
-
src/ConfigInit.c (modified) (3 diffs)
-
src/ImagePosIO.c (modified) (1 diff)
-
src/MosaicOps.c (modified) (4 diffs)
-
src/UpdateObjects.c (modified) (1 diff)
-
src/args.c (modified) (15 diffs)
-
src/assign_images.c (modified) (2 diffs)
-
src/indexCatalogs.c (modified) (2 diffs)
-
src/initialize.c (modified) (1 diff)
-
src/launch_region_hosts.c (modified) (1 diff)
-
src/load_images.c (modified) (1 diff)
-
src/markObjects.c (modified) (1 diff)
-
src/relastro.c (modified) (1 diff)
-
src/relastro_client.c (modified) (5 diffs)
-
src/relastro_objects.c (modified) (1 diff)
-
src/relastro_parallel_regions.c (modified) (2 diffs)
-
src/share_mean_pos.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140206/Ohana/src/relastro/include/relastro.h
r36569 r36574 29 29 typedef enum {FIT_NONE, FIT_AVERAGE, FIT_PM_ONLY, FIT_PAR_ONLY, FIT_PM_AND_PAR} FitMode; 30 30 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; 31 typedef 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 33 typedef enum {TARGET_NONE, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS} FitTarget; 32 34 33 35 typedef enum { … … 118 120 unsigned int start; 119 121 unsigned int stop; 122 off_t myImage; 120 123 float Mcal; 121 124 float dMcal; … … 233 236 FitMode FIT_MODE; 234 237 238 RelastroOp RELASTRO_OP; 235 239 FitTarget FIT_TARGET; 236 240 … … 495 499 int share_mean_pos (Catalog *catalog, int Ncatalog, RegionHostTable *regionHosts, int nloop); 496 500 int slurp_mean_pos (Catalog *catalog, int Ncatalog, RegionHostTable *regionHosts, int nloop); 497 int set_mean_pos (MeanPos *meanpos, Average Tiny*average);501 int set_mean_pos (MeanPos *meanpos, Average *average); 498 502 MeanPos *merge_mean_pos (MeanPos *target, int *ntarget, MeanPos *source, int Nsource); 499 503 … … 516 520 Image *ImageTableLoad(char *filename, off_t *nimage); 517 521 int ImageTableSave (char *filename, Image *images, off_t Nimages); 522 int select_mosaics_hostregion (RegionHostTable *regionHosts, Image *image, off_t Nimage); -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/ConfigInit.c
r35105 r36574 18 18 if (VERBOSE) fprintf (stderr, "loaded config file: %s\n", file); 19 19 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; 22 23 23 24 if (!ScanConfig (config, "RELASTRO_IMFIT_CLIP_NITER", "%d", 0, &IMFIT_CLIP_NITER)) IMFIT_CLIP_NITER = 3; … … 25 26 if (!ScanConfig (config, "RELASTRO_IMFIT_SYS_SIGMA_LIM", "%lf", 0, &IMFIT_SYS_SIGMA_LIM)) IMFIT_SYS_SIGMA_LIM = 0.01; 26 27 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; 30 36 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; 41 38 42 39 // force CATDIR to be absolute (so parallel mode will work) … … 56 53 sprintf (ImageCat, "%s/Images.dat", CATDIR); 57 54 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; 64 57 65 58 if (*CATMODE == 0) strcpy (CATMODE, "RAW"); -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/ImagePosIO.c
r36565 r36574 199 199 ALLOCATE (pc2_1 , float , Nimage_pos); 200 200 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); 203 203 ALLOCATE (Npolyterms, char , Nimage_pos); 204 204 ALLOCATE (dXpixSys , float , Nimage_pos); -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/MosaicOps.c
r36571 r36574 105 105 mosaic[Nmosaic].secz = image[i].secz; 106 106 mosaic[Nmosaic].coords = image[i].coords; 107 mosaic[Nmosaic].myImage = i; 107 108 108 109 // init the mosaic_own_images array data … … 250 251 if (im >= Nmosaic_for_images) abort(); 251 252 252 // search for the mosaic that 253 // search for the mosaic that matches this image 253 254 mos = mosaic_for_images[im]; 254 255 if (mos < 0) return NULL; … … 257 258 } 258 259 260 // extend each host image table to include the mosaic 'images' needed by the host 259 261 int select_mosaics_hostregion (RegionHostTable *regionHosts, Image *image, off_t Nimage) { 260 262 263 int i; 264 off_t j; 265 char *mosaicUsed; 266 261 267 ALLOCATE (mosaicUsed, char, Nmosaic); 262 memset (mosaicUsed, 0, Nmosaic * sizeof(char));263 268 264 269 // we need to add the mosaics to each of the region hosts lists of images 265 270 for (i = 0; i < regionHosts->Nhosts; i++) { 266 271 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 267 280 RegionHostInfo *host = ®ionHosts->hosts[i]; 268 281 269 282 // find the mosaics associated with a given 270 for (j = 0; j < host->Nimage s; j++) {283 for (j = 0; j < host->Nimage; j++) { 271 284 272 285 int im = host->imseq[j]; … … 275 288 if (im >= Nmosaic_for_images) abort(); 276 289 277 // search for the mosaic that 290 // search for the mosaic that matches this image (skip unmatched images) 278 291 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 205 205 if (((mode == FIT_PM_ONLY) || (mode == FIT_PM_AND_PAR)) && (N <= PM_TOOFEW)) mode = FIT_AVERAGE; 206 206 207 if ( FIT_TARGET == TARGET_HIGH_SPEED) {207 if (RELASTRO_OP == OP_HIGH_SPEED) { 208 208 Tmean = 0.5*(Tmax - Tmin); 209 209 } else { -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/args.c
r36569 r36574 13 13 /* possible operations */ 14 14 FIT_TARGET = TARGET_NONE; 15 RELASTRO_OP = OP_NONE; 15 16 FIT_MODE = FIT_AVERAGE; 16 17 … … 21 22 if (N > argc - 6) usage_merge_source(); 22 23 if (strcmp(argv[N+3], "into")) usage_merge_source(); 23 FIT_TARGET = TARGET_MERGE_SOURCE;24 RELASTRO_OP = OP_MERGE_SOURCE; 24 25 remove_argument (N, &argc, argv); 25 26 OBJ_ID_SRC = strtol(argv[N], &endptr, 0); … … 43 44 if ((N = get_argument (argc, argv, "-update-objects"))) { 44 45 remove_argument (N, &argc, argv); 45 FIT_TARGET = TARGET_UPDATE_OBJECTS;46 RELASTRO_OP = OP_UPDATE_OBJECTS; 46 47 } 47 48 48 49 if ((N = get_argument (argc, argv, "-update-offsets"))) { 49 50 remove_argument (N, &argc, argv); 50 FIT_TARGET = TARGET_UPDATE_OFFSETS;51 RELASTRO_OP = OP_UPDATE_OFFSETS; 51 52 } 52 53 … … 69 70 if ((N = get_argument (argc, argv, "-parallel-images"))) { 70 71 remove_argument (N, &argc, argv); 71 FIT_TARGET = TARGET_PARALLEL_IMAGES;72 RELASTRO_OP = OP_PARALLEL_IMAGES; 72 73 if (N >= argc) usage(); 73 74 IMAGE_TABLE = strcreate (argv[N]); … … 76 77 } 77 78 79 if ((N = get_argument (argc, argv, "-images"))) { 80 remove_argument (N, &argc, argv); 81 RELASTRO_OP = OP_IMAGES; 82 } 83 78 84 PARALLEL_REGIONS_MANUAL = FALSE; 79 85 if ((N = get_argument (argc, argv, "-parallel-regions"))) { 80 86 remove_argument (N, &argc, argv); 81 FIT_TARGET = TARGET_PARALLEL_REGIONS;87 RELASTRO_OP = OP_PARALLEL_REGIONS; 82 88 if (!REGION_FILE) usage(); 83 89 if ((N = get_argument (argc, argv, "-parallel-regions-manual"))) { … … 126 132 // XXX include a parallax / no-parallax option 127 133 if (N >= argc - 4) usage(); 128 FIT_TARGET = TARGET_HIGH_SPEED;134 RELASTRO_OP = OP_HIGH_SPEED; 129 135 remove_argument (N, &argc, argv); 130 136 PHOTCODE_A_LIST = strcreate(argv[N]); … … 140 146 if ((N = get_argument (argc, argv, "-hpm"))) { 141 147 if (N >= argc - 2) usage(); 142 FIT_TARGET = TARGET_HPM;148 RELASTRO_OP = OP_HPM; 143 149 remove_argument (N, &argc, argv); 144 150 RADIUS = atof(argv[N]); … … 152 158 remove_argument (N, &argc, argv); 153 159 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)) { 155 161 fprintf (stderr, "-parallel-output only valid for -high-speed or -hpm modes\n"); 156 162 exit (1); … … 179 185 } 180 186 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(); 182 190 183 191 /* specify portion of the sky : allow default of all sky? */ … … 463 471 464 472 /* possible operations */ 465 FIT_TARGET= TARGET_NONE;473 RELASTRO_OP = TARGET_NONE; 466 474 FIT_MODE = FIT_AVERAGE; 467 475 … … 498 506 BCATALOG = strcreate(argv[N]); 499 507 remove_argument (N, &argc, argv); 500 FIT_TARGET = TARGET_LOAD_OBJECTS;508 RELASTRO_OP = OP_LOAD_OBJECTS; 501 509 } 502 510 503 511 if ((N = get_argument (argc, argv, "-update-objects"))) { 504 512 remove_argument (N, &argc, argv); 505 FIT_TARGET = TARGET_UPDATE_OBJECTS;513 RELASTRO_OP = OP_UPDATE_OBJECTS; 506 514 } 507 515 508 516 if ((N = get_argument (argc, argv, "-update-offsets"))) { 509 517 remove_argument (N, &argc, argv); 510 FIT_TARGET = TARGET_UPDATE_OFFSETS;518 RELASTRO_OP = OP_UPDATE_OFFSETS; 511 519 } 512 520 … … 528 536 // XXX include a parallax / no-parallax option 529 537 if (N >= argc - 5) usage_client(); 530 FIT_TARGET = TARGET_HIGH_SPEED;538 RELASTRO_OP = OP_HIGH_SPEED; 531 539 remove_argument (N, &argc, argv); 532 540 PHOTCODE_A_LIST = strcreate(argv[N]); … … 542 550 if ((N = get_argument (argc, argv, "-hpm"))) { 543 551 if (N >= argc - 3) usage(); 544 FIT_TARGET = TARGET_HPM;552 RELASTRO_OP = OP_HPM; 545 553 remove_argument (N, &argc, argv); 546 554 RADIUS = atof(argv[N]); … … 580 588 } 581 589 582 if ( FIT_TARGET == TARGET_NONE) usage_client();590 if (RELASTRO_OP == OP_NONE) usage_client(); 583 591 584 592 /* specify portion of the sky : allow default of all sky? */ … … 759 767 760 768 void 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"); 764 778 fprintf (stderr, " OR: relastro -update-objects [options]\n"); 765 779 fprintf (stderr, " OR: relastro -high-speed [options]\n"); -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/assign_images.c
r36571 r36574 38 38 // supply the mosaics to the image table for the regionHosts : we already have the image 39 39 // <-> 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); 42 41 43 42 return TRUE; … … 136 135 regionHosts->hosts[i].NIMAGE += D_NIMAGE; 137 136 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); 139 138 } 140 139 } -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/indexCatalogs.c
r36565 r36574 31 31 objIDmax[i] = 0; 32 32 for (j = 0; j < catalog[i].Naverage; j++) { 33 objIDmax[i] = MAX (catalog[i].average T[j].objID, objIDmax[i]);33 objIDmax[i] = MAX (catalog[i].average[j].objID, objIDmax[i]); 34 34 } 35 35 … … 40 40 41 41 for (j = 0; j < catalog[i].Naverage; j++) { 42 int objID = catalog[i].average T[j].objID;42 int objID = catalog[i].average[j].objID; 43 43 objIDseq[i][objID] = j; 44 44 } -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/initialize.c
r34429 r36574 6 6 args (argc, argv); 7 7 8 if ( FIT_TARGET == TARGET_MERGE_SOURCE) return;8 if (RELASTRO_OP == OP_MERGE_SOURCE) return; 9 9 10 10 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 58 58 filename, REGION_FILE, host->hostID, CATDIR, host->RminCat, host->RmaxCat, host->DminCat, host->DmaxCat, STATMODE, MIN_ERROR); 59 59 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 60 74 if (VERBOSE) strextend (command, "-v"); 61 75 if (VERBOSE2) strextend (command, "-vv"); -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/load_images.c
r36569 r36574 28 28 29 29 /* 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); 31 31 if (unlockImages) dvo_image_unlock (db); 32 32 -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/markObjects.c
r36565 r36574 8 8 // How strongly do I own this object? 9 9 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)); 10 12 for (j = 0; j < catalog[i].Naverage; j++) { 11 13 int nOwn = 0; 12 int m = catalog[i].average T[j].measureOffset;13 for (n = 0; n < catalog[i].average T[j].Nmeasure; n++) {14 int m = catalog[i].average[j].measureOffset; 15 for (n = 0; n < catalog[i].average[j].Nmeasure; n++) { 14 16 if (!catalog[i].measureT[m+n].myDet) continue; 15 17 nOwn ++; 16 18 } 17 catalog[i]. averageT[j].nOwn= nOwn;19 catalog[i].nOwn[j] = nOwn; 18 20 } 19 21 } -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro.c
r36564 r36574 10 10 SkyList *skylist = SkyListByPatch (sky, -1, &UserPatch); 11 11 12 switch ( FIT_TARGET) {13 case TARGET_UPDATE_OBJECTS:12 switch (RELASTRO_OP) { 13 case OP_UPDATE_OBJECTS: 14 14 /* the object analysis is a separate process iterating over catalogs */ 15 15 relastro_objects (skylist, 0, NULL); 16 16 exit (0); 17 17 18 case TARGET_HIGH_SPEED:18 case OP_HIGH_SPEED: 19 19 /* high-speed is a 2pt cross-correlation process for linking moving objects (high PM) */ 20 20 high_speed_catalogs (sky, skylist, 0, NULL); 21 21 exit (0); 22 22 23 case TARGET_HPM:23 case OP_HPM: 24 24 hpm_catalogs (sky, skylist, 0, NULL); 25 25 exit (0); 26 26 27 case TARGET_MERGE_SOURCE:27 case OP_MERGE_SOURCE: 28 28 /* a special method to manually merge unlinked detections of sources togther (not parallel) */ 29 29 relastro_merge_source (sky); 30 30 exit (0); 31 31 32 case TARGET_SIMPLE: 33 case TARGET_CHIPS: 34 case TARGET_MOSAICS: 32 case OP_IMAGES: 35 33 relastro_images (skylist); 36 34 exit (0); 37 35 38 case TARGET_UPDATE_OFFSETS:36 case OP_UPDATE_OFFSETS: 39 37 // iterate over catalogs to make detection coordinates consistant 40 38 UpdateObjectOffsets (skylist, 0, NULL); 41 39 exit (0); 42 40 43 case TARGET_PARALLEL_REGIONS:41 case OP_PARALLEL_REGIONS: 44 42 // run image updates in parallel across multiple remote machines 45 43 relastro_parallel_regions (); 46 44 exit (0); 47 45 48 case TARGET_PARALLEL_IMAGES:46 case OP_PARALLEL_IMAGES: 49 47 // operation on the remote machines in the PARALLEL_REGION mode 50 48 relastro_parallel_images (); -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro_client.c
r35763 r36574 28 28 SkyList *skylist = SkyListByPatch (sky, -1, &UserPatch); 29 29 30 switch ( FIT_TARGET) {30 switch (RELASTRO_OP) { 31 31 32 case TARGET_LOAD_OBJECTS: {32 case OP_LOAD_OBJECTS: { 33 33 // USAGE: relastro_client -load-objects 34 34 int Ncatalog; … … 46 46 } 47 47 48 case TARGET_UPDATE_OBJECTS: {48 case OP_UPDATE_OBJECTS: { 49 49 // USAGE: relastro_client -update-objects 50 50 relastro_objects (skylist, HOST_ID, HOSTDIR); … … 52 52 } 53 53 54 case TARGET_HIGH_SPEED: {54 case OP_HIGH_SPEED: { 55 55 // USAGE: relastro_client -high-speed 56 56 high_speed_catalogs (sky, skylist, HOST_ID, HOSTDIR); … … 58 58 } 59 59 60 case TARGET_HPM: {60 case OP_HPM: { 61 61 // USAGE: relastro_client -high-speed 62 62 hpm_catalogs (sky, skylist, HOST_ID, HOSTDIR); … … 65 65 66 66 // 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: { 68 68 FITS_DB db; 69 69 -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro_objects.c
r35763 r36574 144 144 // PM_TOOFEW 145 145 // SRC_MEAS_TOOFEW 146 // FIT_TARGET147 146 148 147 char command[1024]; -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/relastro_parallel_regions.c
r36564 r36574 60 60 if (PARALLEL) { 61 61 // save the updated image parameters 62 dvo_image_ update (&db, VERBOSE);62 dvo_image_save (&db, VERBOSE); 63 63 dvo_image_unlock (&db); 64 64 } … … 69 69 if (!PARALLEL) { 70 70 // 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); 74 72 dvo_image_unlock (&db); 75 73 } -
branches/eam_branches/ipp-20140206/Ohana/src/relastro/src/share_mean_pos.c
r36569 r36574 25 25 26 26 // do I own this object? (in region range?) --- CAREFUL HERE!! 27 if (catalog[i].average T[j].R < Rmin) continue;28 if (catalog[i].average T[j].R >= Rmax) continue;29 if (catalog[i].average T[j].D < Dmin) continue;30 if (catalog[i].average T[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; 31 31 32 32 // does this object have missing detections (does someone else need it?) 33 33 // XXX : sky objects without missing detections 34 34 // 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; 36 36 37 set_mean_pos (&meanpos[Nmeanpos], &catalog[i].average T[j]);37 set_mean_pos (&meanpos[Nmeanpos], &catalog[i].average[j]); 38 38 Nmeanpos ++; 39 39 CHECK_REALLOCATE (meanpos, MeanPos, NMEANPOS, Nmeanpos, D_NMEANPOS); … … 94 94 } 95 95 96 catalog[catSeq].average T[objSeq].R = meanpos[i].R;97 catalog[catSeq].average T[objSeq].D = meanpos[i].D;96 catalog[catSeq].average[objSeq].R = meanpos[i].R; 97 catalog[catSeq].average[objSeq].D = meanpos[i].D; 98 98 } 99 99 … … 103 103 } 104 104 105 int set_mean_pos (MeanPos *meanpos, Average Tiny*average) {105 int set_mean_pos (MeanPos *meanpos, Average *average) { 106 106 107 107 meanpos->R = average->R;
Note:
See TracChangeset
for help on using the changeset viewer.
