Changeset 36809
- Timestamp:
- Jun 3, 2014, 1:25:35 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140423/Ohana/src
- Files:
-
- 13 edited
-
dvopsps/src/insert_objects_dvopsps_catalog.c (modified) (1 diff)
-
relastro/Makefile (modified) (1 diff)
-
relastro/include/relastro.h (modified) (2 diffs)
-
relastro/src/BrightCatalog.c (modified) (2 diffs)
-
relastro/src/ImageOps.c (modified) (3 diffs)
-
relastro/src/UpdateObjectOffsets.c (modified) (1 diff)
-
relastro/src/args.c (modified) (3 diffs)
-
relastro/src/bcatalog.c (modified) (3 diffs)
-
relastro/src/launch_region_hosts.c (modified) (3 diffs)
-
relastro/src/load_catalogs.c (modified) (6 diffs)
-
relastro/src/relastro_client.c (modified) (1 diff)
-
relastro/src/relastro_images.c (modified) (1 diff)
-
relastro/src/relastro_parallel_images.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140423/Ohana/src/dvopsps/src/insert_objects_dvopsps_catalog.c
r35450 r36809 292 292 PrintIOBuffer (ave_buffer, "%d, ", average->measureOffset); 293 293 PrintIOBuffer (ave_buffer, "%d, ", average->missingOffset); 294 PrintIOBuffer (ave_buffer, "%d, ", average->extendOffset);294 PrintIOBuffer (ave_buffer, "%d, ", 0); // was : average->extendOffset); 295 295 PrintIOBuffer (ave_buffer, "%u, ", average->flags); 296 296 PrintIOBuffer (ave_buffer, "%u, ", average->photFlagsUpper); -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/Makefile
r36630 r36809 127 127 $(SRC)/plotstuff.$(ARCH).o \ 128 128 $(SRC)/relastroVisual.$(ARCH).o \ 129 $(SRC)/syncfile.$(ARCH).o \ 129 130 $(SRC)/BrightCatalog.$(ARCH).o 130 131 -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h
r36808 r36809 315 315 int liststats PROTO((double *value, double *dvalue, int N, StatType *stats)); 316 316 int liststats_pos PROTO((double *value, double *dvalue, int N, StatType *stats, int XVERB)); 317 Catalog *load_catalogs PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath ));317 Catalog *load_catalogs PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath, char *syncfile)); 318 318 int load_images PROTO((FITS_DB *db, SkyList *skylist, int UseFullOverlap)); 319 319 Image *select_images PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage, int UseFullOverlap)); … … 533 533 534 534 float getColor (off_t meas, int cat); 535 536 int strextend (char *input, char *format,...); -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/BrightCatalog.c
r36808 r36809 476 476 gfits_define_bintable_column (&theader, "J", "OFF_MEASURE", "offset to first psf measurement", "", 1.0, 1.0*0x8000); 477 477 gfits_define_bintable_column (&theader, "J", "OFF_MISSING", "offset to first missing obs", "", 1.0, 1.0*0x8000); 478 gfits_define_bintable_column (&theader, " J", "OFF_EXTEND", "offset to first extended measurement", "", 1.0, 1.0*0x8000);478 gfits_define_bintable_column (&theader, "E", "REF_COLOR", "reference color", "", 1.0, 0.0); 479 479 gfits_define_bintable_column (&theader, "J", "FLAGS", "average object flags (star; ghost; etc)", "", 1.0, 1.0*0x8000); 480 480 gfits_define_bintable_column (&theader, "J", "PHOTFLAGS_U", "upper bit of 2 bit summary of per-measure photflags", "", 1.0, 1.0*0x8000); … … 575 575 gfits_set_bintable_column (&theader, &ftable, "OFF_MEASURE", measureOffset, catalog->Naverage); 576 576 gfits_set_bintable_column (&theader, &ftable, "OFF_MISSING", missingOffset, catalog->Naverage); 577 gfits_set_bintable_column (&theader, &ftable, "REF_COLOR", refColor,catalog->Naverage);577 gfits_set_bintable_column (&theader, &ftable, "REF_COLOR", refColor, catalog->Naverage); 578 578 gfits_set_bintable_column (&theader, &ftable, "FLAGS", flags, catalog->Naverage); 579 579 gfits_set_bintable_column (&theader, &ftable, "PHOTFLAGS_U", photFlagsUpper, catalog->Naverage); -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/ImageOps.c
r36808 r36809 477 477 } 478 478 479 X = measure[0].Xccd; 480 Y = measure[0].Yccd; 479 481 if (USE_FIXED_PIXCOORDS) { 480 X = isfinite(measure[0].Xfix) ? measure[0].Xfix : measure[0].Xccd; 481 Y = isfinite(measure[0].Yfix) ? measure[0].Yfix : measure[0].Yccd; 482 } else { 483 X = measure[0].Xccd; 484 Y = measure[0].Yccd; 482 if (isfinite(measure[0].Xfix) && isfinite(measure[0].Yfix)) { 483 float dX = measure[0].Xfix - measure[0].Xccd; 484 float dY = measure[0].Yfix - measure[0].Yccd; 485 if (hypot(dX,dY) < 2.0) { 486 X = measure[0].Xfix; 487 Y = measure[0].Yfix; 488 } 489 } 485 490 } 486 491 n = measure[0].averef; … … 618 623 Measure *measure = &catalog[c].measure[m]; 619 624 625 X = measure[0].Xccd; 626 Y = measure[0].Yccd; 620 627 if (USE_FIXED_PIXCOORDS) { 621 X = isfinite(measure[0].Xfix) ? measure[0].Xfix : measure[0].Xccd; 622 Y = isfinite(measure[0].Yfix) ? measure[0].Yfix : measure[0].Yccd; 623 } else { 624 X = measure[0].Xccd; 625 Y = measure[0].Yccd; 628 if (isfinite(measure[0].Xfix) && isfinite(measure[0].Yfix)) { 629 float dX = measure[0].Xfix - measure[0].Xccd; 630 float dY = measure[0].Yfix - measure[0].Yccd; 631 if (hypot(dX,dY) < 2.0) { 632 X = measure[0].Xfix; 633 Y = measure[0].Yfix; 634 } 635 } 626 636 } 627 637 n = measure[0].averef; … … 688 698 689 699 /* apply the current image transformation or use the current value of R+dR, D+dD? */ 700 raw[i].X = measure[0].Xccd; 701 raw[i].Y = measure[0].Yccd; 690 702 if (USE_FIXED_PIXCOORDS) { 691 raw[i].X = isfinite(measure[0].Xfix) ? measure[0].Xfix : measure[0].Xccd; 692 raw[i].Y = isfinite(measure[0].Yfix) ? measure[0].Yfix : measure[0].Yccd; 693 } else { 694 raw[i].X = measure[0].Xccd; 695 raw[i].Y = measure[0].Yccd; 696 } 697 703 if (isfinite(measure[0].Xfix) && isfinite(measure[0].Yfix)) { 704 float dX = measure[0].Xfix - measure[0].Xccd; 705 float dY = measure[0].Yfix - measure[0].Yccd; 706 if (hypot(dX,dY) < 2.0) { 707 raw[i].X = measure[0].Xfix; 708 raw[i].Y = measure[0].Yfix; 709 } 710 } 711 } 698 712 raw[i].Mag = measure[0].M; 699 713 raw[i].dMag = measure[0].dM; -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/UpdateObjectOffsets.c
r35763 r36809 126 126 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR); 127 127 128 char tmpline[1024]; 129 if (FIT_MODE == FIT_PM_ONLY) { snprintf (tmpline, 1024, "%s -pm", command); strcpy (command, tmpline); } 130 if (FIT_MODE == FIT_PAR_ONLY) { snprintf (tmpline, 1024, "%s -par", command); strcpy (command, tmpline); } 131 if (FIT_MODE == FIT_PM_AND_PAR) { snprintf (tmpline, 1024, "%s -pmpar", command); strcpy (command, tmpline); } 132 133 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 134 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 135 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 136 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); } 137 138 if (RESET_BAD_IMAGES) { snprintf (tmpline, 1024, "%s -reset-bad-images", command); strcpy (command, tmpline); } 139 140 if (ImagSelect) { snprintf (tmpline, 1024, "%s -instmag %f %f", command, ImagMin, ImagMax); strcpy (command, tmpline); } 141 if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue); strcpy (command, tmpline); } 128 if (FIT_MODE == FIT_PM_ONLY) strextend (command, "-pm"); 129 if (FIT_MODE == FIT_PAR_ONLY) strextend (command, "-par"); 130 if (FIT_MODE == FIT_PM_AND_PAR) strextend (command, "-pmpar"); 131 132 if (VERBOSE) strextend (command, "-v"); 133 if (VERBOSE2) strextend (command, "-vv"); 134 if (RESET) strextend (command, "-reset"); 135 if (UPDATE) strextend (command, "-update"); 136 137 if (RESET_BAD_IMAGES) strextend (command, "-reset-bad-images"); 138 139 if (ImagSelect) strextend (command, "-instmag %f %f", ImagMin, ImagMax); 140 if (MaxDensityUse) strextend (command, "-max-density %f", MaxDensityValue); 142 141 143 if (USE_BASIC_CHECK) { snprintf (tmpline, 1024, "%s -basic-image-search", command); strcpy (command, tmpline); } 144 if (FlagOutlier) { snprintf (tmpline, 1024, "%s -clip %d", command, CLIP_THRESH); strcpy (command, tmpline); } 142 if (USE_BASIC_CHECK) strextend (command, "-basic-image-search"); 143 if (FlagOutlier) strextend (command, "-clip %d", CLIP_THRESH); 144 if (ExcludeBogus) strextend (command, "-exclude-bogus %f", ExcludeBogusRadius); 145 145 146 if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command); strcpy (command, tmpline); }147 148 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); }149 if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); }150 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); }151 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); }152 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); }146 if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1"); 147 148 if (PHOTCODE_KEEP_LIST) strextend (command, "+photcode %s", PHOTCODE_KEEP_LIST); 149 if (PHOTCODE_SKIP_LIST) strextend (command, "-photcode %s", PHOTCODE_SKIP_LIST); 150 if (PhotFlagSelect) strextend (command, "+photflags"); 151 if (PhotFlagBad) strextend (command, "+photflagbad %d", PhotFlagBad); 152 if (PhotFlagPoor) strextend (command, "+photflagpoor %d", PhotFlagPoor); 153 153 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 154 154 155 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); } 156 if (MaxMeanOffset != 10.0) { snprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); } 155 if (DCR_COLOR_POS && DCR_COLOR_NEG) { 156 strextend (command, "-dcr-color %s %s", DCR_COLOR_POS, DCR_COLOR_NEG); 157 } 158 159 if (MinBadQF > 0.0) strextend (command, "-min-bad-psfqf %f", MinBadQF); 160 if (MaxMeanOffset != 10.0) strextend (command, "-max-mean-offset %f", MaxMeanOffset); 157 161 158 162 if (TimeSelect) { 159 163 char *tstart = ohana_sec_to_date (TSTART); 160 164 char *tstop = ohana_sec_to_date (TSTOP); 161 s nprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);165 strextend (command, "-time %s %s", tstart, tstop); 162 166 free (tstart); 163 167 free (tstop); 164 strcpy (command, tmpline);165 168 } 166 169 fprintf (stderr, "command: %s\n", command); -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/args.c
r36808 r36809 318 318 } 319 319 320 PHOTCODE_SKIP_LIST = strcreate("SCOS.103a.E,SCOS.4414.OG590,SCOS.4415.OG590,SCOS.IIIaF.OG590,SCOS.IIIaF.RG610,SCOS.IIIaF.RG630,SCOS.IIIaJ.GG385,SCOS.IIIaJ.GG395,SCOS.IVN.RG715,SCOS.IVN.RG9"); 320 char *SuperCOSMOS_SKIP = strcreate("SCOS.103a.E,SCOS.4414.OG590,SCOS.4415.OG590,SCOS.IIIaF.OG590,SCOS.IIIaF.RG610,SCOS.IIIaF.RG630,SCOS.IIIaJ.GG385,SCOS.IIIaJ.GG395,SCOS.IVN.RG715,SCOS.IVN.RG9"); 321 322 PHOTCODE_SKIP_LIST = NULL; 321 323 if ((N = get_argument (argc, argv, "-photcode"))) { 322 324 remove_argument (N, &argc, argv); 323 char * tmp1= strcreate(argv[N]);324 325 int Ntotal = strlen(tmp1) + strlen(PHOTCODE_SKIP_LIST) + 5;326 327 char *tmp2 = NULL;328 ALLOCATE (tmp2, char, Ntotal);329 snprintf (tmp2, Ntotal, "%s,%s", PHOTCODE_SKIP_LIST, tmp1);330 331 free (tmp1);332 free (PHOTCODE_SKIP_LIST);333 334 PHOTCODE_SKIP_LIST = tmp2;325 char *RawSkip = strcreate(argv[N]); 326 327 char *GotSkip = strstr (RawSkip, SuperCOSMOS_SKIP); 328 if (!GotSkip) { 329 int Ntotal = strlen(RawSkip) + strlen(SuperCOSMOS_SKIP) + 5; 330 ALLOCATE (PHOTCODE_SKIP_LIST, char, Ntotal); 331 snprintf (PHOTCODE_SKIP_LIST, Ntotal, "%s,%s", SuperCOSMOS_SKIP, RawSkip); 332 free (RawSkip); 333 free (SuperCOSMOS_SKIP); 334 } else { 335 PHOTCODE_SKIP_LIST = RawSkip; 336 } 335 337 remove_argument (N, &argc, argv); 336 338 } … … 692 694 remove_argument (N, &argc, argv); 693 695 TimeSelect = TRUE; 696 } 697 698 DCR_COLOR_POS = NULL; 699 DCR_COLOR_NEG = NULL; 700 if ((N = get_argument (argc, argv, "-dcr-color"))) { 701 remove_argument (N, &argc, argv); 702 DCR_COLOR_POS = strcreate(argv[N]); 703 remove_argument (N, &argc, argv); 704 DCR_COLOR_NEG = strcreate(argv[N]); 705 remove_argument (N, &argc, argv); 694 706 } 695 707 … … 905 917 exit (2); 906 918 } 919 920 int strextend (char *input, char *format,...) { 921 922 char tmpextra[1024], tmpline[1024]; 923 va_list argp; 924 925 va_start (argp, format); 926 vsnprintf (tmpextra, 1024, format, argp); 927 snprintf (tmpline, 1024, "%s %s", input, tmpextra); 928 strcpy (input, tmpline); 929 930 return TRUE; 931 } -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/bcatalog.c
r36800 r36809 10 10 11 11 // test image: 2013/06/15,13:25:51, GPC1.r.XY50 12 static int CHECK_TEST_IMAGE = TRUE;12 static int CHECK_TEST_IMAGE = FALSE; 13 13 // static unsigned int Tref = 1378812312; 14 14 // static short Cref = 10001; … … 59 59 ID_STAR_NO_ASTROM ; 60 60 61 if ( ExcludeBogus && (fbogus == NULL)) {61 if (VERBOSE2 && ExcludeBogus && (fbogus == NULL)) { 62 62 char name[1024]; 63 63 snprintf (name, 1024, "%s/bogus.%02d.dat", CATDIR, HOST_ID); … … 125 125 if (radius > ExcludeBogusRadius) { 126 126 NskipBogus ++; 127 if ( TRUE ||VERBOSE2) {127 if (VERBOSE2) { 128 128 FILE *foutput = fbogus ? fbogus : stderr; 129 129 char *date = ohana_sec_to_date(catalog[0].measure[offset].t); -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/launch_region_hosts.c
r36769 r36809 1 1 # include "relastro.h" 2 2 # define DEBUG 0 3 4 int strextend (char *input, char *format,...) {5 6 char tmpextra[1024], tmpline[1024];7 va_list argp;8 9 va_start (argp, format);10 vsnprintf (tmpextra, 1024, format, argp);11 snprintf (tmpline, 1024, "%s %s", input, tmpextra);12 strcpy (input, tmpline);13 14 return TRUE;15 }16 3 17 4 int launch_region_hosts (RegionHostTable *regionHosts) { … … 92 79 if (MaxDensityUse) strextend (command, "-max-density %f", MaxDensityValue); 93 80 if (ImagSelect) strextend (command, "-instmag %f %f", ImagMin, ImagMax); 81 if (ExcludeBogus) strextend (command, "-exclude-bogus %f", ExcludeBogusRadius); 82 83 if (DCR_COLOR_POS && DCR_COLOR_NEG) { 84 strextend (command, "-dcr-color %s %s", DCR_COLOR_POS, DCR_COLOR_NEG); 85 } 86 94 87 if (PhotFlagSelect) strextend (command, "+photflags"); 95 88 if (PhotFlagBad) strextend (command, "+photflagbad %d", PhotFlagBad); … … 102 95 strextend (command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM); 103 96 strextend (command, "-D RELASTRO_DPOS_MAX %f", DPOS_MAX); 104 strextend (command, "-D ADDSTAR_RADIUS %d", ADDSTAR_RADIUS); 97 strextend (command, "-D ADDSTAR_RADIUS %f", ADDSTAR_RADIUS); 98 99 if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1"); 105 100 106 101 if (TimeSelect) { -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/load_catalogs.c
r36800 r36809 1 1 # include "relastro.h" 2 2 3 Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog );3 Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog, char *syncfile); 4 4 void bcatalog_show_skips (); 5 5 6 Catalog *load_catalogs (SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath ) {6 Catalog *load_catalogs (SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath, char *syncfile) { 7 7 8 8 int i, j, Nstar; … … 12 12 // XXX need to decide how to determine PARALLEL mode... 13 13 if (PARALLEL && !hostID) { 14 catalog = load_catalogs_parallel (skylist, Ncatalog );14 catalog = load_catalogs_parallel (skylist, Ncatalog, syncfile); 15 15 return catalog; 16 16 } … … 116 116 // CATDIR is supplied globally 117 117 # define DEBUG 1 118 Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog ) {118 Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog, char *syncfile) { 119 119 120 120 char uniquer[12]; … … 153 153 table->hosts[i].results, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR, SIGMA_LIM); 154 154 155 char tmpline[1024]; 156 if (FIT_MODE == FIT_PM_ONLY) { snprintf (tmpline, 1024, "%s -pm", command); strcpy (command, tmpline); } 157 if (FIT_MODE == FIT_PAR_ONLY) { snprintf (tmpline, 1024, "%s -par", command); strcpy (command, tmpline); } 158 if (FIT_MODE == FIT_PM_AND_PAR) { snprintf (tmpline, 1024, "%s -pmpar", command); strcpy (command, tmpline); } 159 160 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 161 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 162 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 163 if (ImagSelect) { snprintf (tmpline, 1024, "%s -instmag %f %f", command, ImagMin, ImagMax); strcpy (command, tmpline); } 164 if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue); strcpy (command, tmpline); } 155 if (FIT_MODE == FIT_PM_ONLY) strextend (command, "-pm"); 156 if (FIT_MODE == FIT_PAR_ONLY) strextend (command, "-par"); 157 if (FIT_MODE == FIT_PM_AND_PAR) strextend (command, "-pmpar"); 158 159 if (VERBOSE) strextend (command, "-v"); 160 if (VERBOSE2) strextend (command, "-vv"); 161 if (RESET) strextend (command, "-reset"); 162 if (ImagSelect) strextend (command, "-instmag %f %f", ImagMin, ImagMax); 163 if (MaxDensityUse) strextend (command, "-max-density %f", MaxDensityValue); 164 if (FlagOutlier) strextend (command, "-clip %d", CLIP_THRESH); 165 if (ExcludeBogus) strextend (command, "-exclude-bogus %f", ExcludeBogusRadius); 165 166 166 if ( FlagOutlier) { snprintf (tmpline, 1024, "%s -clip %d", command, CLIP_THRESH); strcpy (command, tmpline); }167 if (ExcludeBogus) { snprintf (tmpline, 1024, "%s -exclude-bogus %f", command, ExcludeBogusRadius); strcpy (command, tmpline); }168 169 if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command); strcpy (command, tmpline); } 170 171 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); }172 if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); }173 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); }174 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); }175 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); }167 if (DCR_COLOR_POS && DCR_COLOR_NEG) { 168 strextend (command, "-dcr-color %s %s", DCR_COLOR_POS, DCR_COLOR_NEG); 169 } 170 171 if (USE_FIXED_PIXCOORDS) strextend (command, "-D USE_FIXED_PIXCOORDS 1"); 172 if (PHOTCODE_KEEP_LIST) strextend (command, "+photcode %s", PHOTCODE_KEEP_LIST); 173 if (PHOTCODE_SKIP_LIST) strextend (command, "-photcode %s", PHOTCODE_SKIP_LIST); 174 if (PhotFlagSelect) strextend (command, "+photflags"); 175 if (PhotFlagBad) strextend (command, "+photflagbad %d", PhotFlagBad); 176 if (PhotFlagPoor) strextend (command, "+photflagpoor %d", PhotFlagPoor); 176 177 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 177 178 … … 179 180 char *tstart = ohana_sec_to_date (TSTART); 180 181 char *tstop = ohana_sec_to_date (TSTOP); 181 s nprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);182 strextend (command, "-time %s %s", tstart, tstop); 182 183 free (tstart); 183 184 free (tstop); 184 strcpy (command, tmpline);185 185 } 186 186 … … 215 215 } 216 216 217 // update syncfile here (save lots of I/O time) 218 219 // NOTE: if I let all hosts load blindly, I saturate the data clients with too many 220 // relastro_client requests. I need to have the master mediate this. the master 221 // will not launch the next remote job until this one says it is done 222 if (syncfile) { 223 update_sync_file (syncfile, 1); 224 } 225 217 226 // each host generates a BrightCatalog structure, with the measure, average, etc value 218 227 // loaded into a single set of arrays (of MeasureTiny, AverageTiny, Secfilt). I need to -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_client.c
r36630 r36809 33 33 // USAGE: relastro_client -load-objects 34 34 int Ncatalog; 35 Catalog *catalog = load_catalogs (skylist, &Ncatalog, TRUE, HOST_ID, HOSTDIR );35 Catalog *catalog = load_catalogs (skylist, &Ncatalog, TRUE, HOST_ID, HOSTDIR, NULL); 36 36 if (!catalog) { 37 37 fprintf (stderr, "ERROR loading catalogs from %s\n", CATDIR); -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_images.c
r36769 r36809 31 31 // photcodesKeep is used here to allow measurements from the images being calibrated 32 32 // note if -reset-to-photcode is selected, photocodesKeep is replaced with below with photcodesReset 33 catalog = load_catalogs (skylist, &Ncatalog, TRUE, 0, NULL );33 catalog = load_catalogs (skylist, &Ncatalog, TRUE, 0, NULL, NULL); 34 34 MARKTIME("load catalog data: %f sec\n", dtime); 35 35 -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_parallel_images.c
r36769 r36809 45 45 46 46 /* load catalog data from region files (hostID is 0 since we are not a client */ 47 catalog = load_catalogs (skylist, &Ncatalog, TRUE, 0, NULL); 47 char *syncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loadcat.sync"); 48 catalog = load_catalogs (skylist, &Ncatalog, TRUE, 0, NULL, syncfile); 48 49 MARKTIME("-- load catalog data: %f sec\n", dtime); 50 free (syncfile); 49 51 50 52 if (photcodesReset) { … … 53 55 } 54 56 55 // NOTE: if I let all hosts load blindly, I saturate the data clients with too many56 // relastro_client requests. I need to have the master mediate this. the master57 // will not launch the next remote job until this one says it is done58 char *syncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loadcat.sync");59 update_sync_file (syncfile, 1);60 61 57 // generate tables go from catID,objID -> catSeq,objSeq 62 58 indexCatalogs (catalog, Ncatalog);
Note:
See TracChangeset
for help on using the changeset viewer.
