Changeset 38441 for trunk/Ohana/src/relastro
- Timestamp:
- Jun 12, 2015, 6:18:23 PM (11 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 20 edited
-
. (modified) (1 prop)
-
src/relastro/include/relastro.h (modified) (2 diffs)
-
src/relastro/src/BrightCatalog.c (modified) (8 diffs)
-
src/relastro/src/ImageTable.c (modified) (3 diffs)
-
src/relastro/src/UpdateObjectOffsets.c (modified) (5 diffs)
-
src/relastro/src/args.c (modified) (1 diff)
-
src/relastro/src/assign_images.c (modified) (1 diff)
-
src/relastro/src/bcatalog.c (modified) (3 diffs)
-
src/relastro/src/high_speed_catalogs.c (modified) (4 diffs)
-
src/relastro/src/high_speed_objects.c (modified) (2 diffs)
-
src/relastro/src/hpm_catalogs.c (modified) (4 diffs)
-
src/relastro/src/hpm_objects.c (modified) (2 diffs)
-
src/relastro/src/launch_region_hosts.c (modified) (2 diffs)
-
src/relastro/src/load_catalogs.c (modified) (4 diffs)
-
src/relastro/src/load_images.c (modified) (1 diff)
-
src/relastro/src/relastro_client.c (modified) (1 diff)
-
src/relastro/src/relastro_images.c (modified) (1 diff)
-
src/relastro/src/relastro_merge_source.c (modified) (2 diffs)
-
src/relastro/src/relastro_objects.c (modified) (3 diffs)
-
src/relastro/src/relastro_parallel_regions.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
Property svn:mergeinfo
set to
/branches/eam_branches/ohana.20150429 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Ohana/src/relastro/include/relastro.h
r38062 r38441 539 539 int hpm_objects (SkyRegion *region, Catalog *catalog); 540 540 541 int strextend (char *input, char *format,...);542 541 int launch_region_hosts (RegionHostTable *regionHosts); 543 542 … … 591 590 float getColorBlue (off_t meas, int cat); 592 591 float getColorRed (off_t meas, int cat); 593 594 int strextend (char *input, char *format,...);595 592 596 593 int areImagesLoaded (); -
trunk/Ohana/src/relastro/src/BrightCatalog.c
r38062 r38441 172 172 GET_COLUMN(Nmeasure, "NMEASURE", short); 173 173 GET_COLUMN(Nmissing, "NMISSING", short); 174 GET_COLUMN(N extend, "NEXTEND",short);174 GET_COLUMN(Ngalphot, "NGALPHOT", short); 175 175 GET_COLUMN(measureOffset, "OFF_MEASURE", int); 176 176 GET_COLUMN(missingOffset, "OFF_MISSING", int); … … 208 208 average[i].Nmeasure = Nmeasure[i] ; 209 209 average[i].Nmissing = Nmissing[i] ; 210 average[i].N extend = Nextend[i] ;210 average[i].Ngalphot = Ngalphot[i] ; 211 211 average[i].measureOffset = measureOffset[i] ; 212 212 average[i].missingOffset = missingOffset[i] ; … … 241 241 free (Nmeasure); 242 242 free (Nmissing); 243 free (N extend);243 free (Ngalphot); 244 244 free (measureOffset); 245 245 free (missingOffset); … … 502 502 gfits_define_bintable_column (&theader, "I", "NMEASURE", "number of psf measurements", "", 1.0, 0.0); 503 503 gfits_define_bintable_column (&theader, "I", "NMISSING", "number of missings", "", 1.0, 0.0); 504 gfits_define_bintable_column (&theader, "I", "N EXTEND", "number of extended measurements","", 1.0, 0.0);504 gfits_define_bintable_column (&theader, "I", "NGALPHOT", "number of galaxy shape measurements", "", 1.0, 0.0); 505 505 gfits_define_bintable_column (&theader, "J", "OFF_MEASURE", "offset to first psf measurement", "", 1.0, 0.0); 506 506 gfits_define_bintable_column (&theader, "J", "OFF_MISSING", "offset to first missing obs", "", 1.0, 0.0); … … 537 537 short *Nmeasure ; ALLOCATE (Nmeasure , short , catalog->Naverage); 538 538 short *Nmissing ; ALLOCATE (Nmissing , short , catalog->Naverage); 539 short *N extend ; ALLOCATE (Nextend, short , catalog->Naverage);539 short *Ngalphot ; ALLOCATE (Ngalphot , short , catalog->Naverage); 540 540 int *measureOffset ; ALLOCATE (measureOffset , int , catalog->Naverage); 541 541 int *missingOffset ; ALLOCATE (missingOffset , int , catalog->Naverage); … … 571 571 Nmeasure[i] = average[i].Nmeasure ; 572 572 Nmissing[i] = average[i].Nmissing ; 573 N extend[i] = average[i].Nextend;573 Ngalphot[i] = average[i].Ngalphot ; 574 574 measureOffset[i] = average[i].measureOffset ; 575 575 missingOffset[i] = average[i].missingOffset ; … … 604 604 gfits_set_bintable_column (&theader, &ftable, "NMEASURE", Nmeasure, catalog->Naverage); 605 605 gfits_set_bintable_column (&theader, &ftable, "NMISSING", Nmissing, catalog->Naverage); 606 gfits_set_bintable_column (&theader, &ftable, "N EXTEND", Nextend,catalog->Naverage);606 gfits_set_bintable_column (&theader, &ftable, "NGALPHOT", Ngalphot, catalog->Naverage); 607 607 gfits_set_bintable_column (&theader, &ftable, "OFF_MEASURE", measureOffset, catalog->Naverage); 608 608 gfits_set_bintable_column (&theader, &ftable, "OFF_MISSING", missingOffset, catalog->Naverage); … … 635 635 free (Nmeasure); 636 636 free (Nmissing); 637 free (N extend);637 free (Ngalphot); 638 638 free (measureOffset); 639 639 free (missingOffset); -
trunk/Ohana/src/relastro/src/ImageTable.c
r36630 r38441 7 7 FITS_DB db; 8 8 9 gfits_db_init (&db); 9 10 db.mode = dvo_catalog_catmode (CATMODE); 10 11 db.format = dvo_catalog_catformat (CATFORMAT); … … 27 28 // convert database table to internal structure (binary to Image) 28 29 // 'image' points to the same memory as db->ftable->buffer 29 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.s wapped);30 Image *image = gfits_table_get_Image (&db.ftable, &Nimage, &db.scaledValue, &db.nativeOrder); 30 31 if (!image) { 31 32 Shutdown ("ERROR: failed to read images"); … … 42 43 43 44 // setup image table format and lock 45 gfits_db_init (&db); 44 46 db.mode = dvo_catalog_catmode (CATMODE); 45 47 db.format = dvo_catalog_catformat (CATFORMAT); -
trunk/Ohana/src/relastro/src/UpdateObjectOffsets.c
r37807 r38441 34 34 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 35 35 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 36 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;36 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 37 37 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 38 38 … … 41 41 exit (1); 42 42 } 43 if (!catalog.Nave s_disk) {43 if (!catalog.Naverage_disk) { 44 44 if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", catalog.filename); 45 45 dvo_catalog_unlock (&catalog); … … 102 102 103 103 int Ngroups; 104 HostTableGroup *groups = HostTableGroups (table, &Ngroups);104 HostTableGroup *groups = HostTableGroupsUniqueMachines (table, &Ngroups); 105 105 // split the table into Ngroups, each with a unique set of machines (this avoids overloading the remote host machines) 106 106 … … 152 152 // MaxDensityUse, MaxDensityValue 153 153 154 char command[1024];155 s nprintf (command, 1024, "relastro_client -update-offsets -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f",154 char *command = NULL; 155 strextend (&command, "relastro_client -update-offsets -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f", 156 156 group->hosts[i][0].hostID, CATDIR, group->hosts[i][0].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR); 157 157 158 if (FIT_MODE == FIT_PM_ONLY) strextend ( command, "-pm");159 if (FIT_MODE == FIT_PAR_ONLY) strextend ( command, "-par");160 if (FIT_MODE == FIT_PM_AND_PAR) strextend ( command, "-pmpar");161 162 if (VERBOSE) strextend ( command, "-v");163 if (VERBOSE2) strextend ( command, "-vv");164 if (RESET) strextend ( command, "-reset");165 if (UPDATE) strextend ( command, "-update");166 167 if (RESET_BAD_IMAGES) strextend ( command, "-reset-bad-images");168 169 if (ImagSelect) strextend ( command, "-instmag %f %f", ImagMin, ImagMax);170 if (MaxDensityUse) strextend ( command, "-max-density %f", MaxDensityValue);171 172 if (USE_BASIC_CHECK) strextend ( command, "-basic-image-search");173 if (FlagOutlier) strextend ( command, "-clip %d", CLIP_THRESH);174 if (ExcludeBogus) strextend ( command, "-exclude-bogus %f", ExcludeBogusRadius);175 176 if (USE_FIXED_PIXCOORDS) strextend ( command, "-D USE_FIXED_PIXCOORDS 1");177 178 if (PHOTCODE_KEEP_LIST) strextend ( command, "+photcode %s", PHOTCODE_KEEP_LIST);179 if (PHOTCODE_SKIP_LIST) strextend ( command, "-photcode %s", PHOTCODE_SKIP_LIST);180 if (PhotFlagSelect) strextend ( command, "+photflags");181 if (PhotFlagBad) strextend ( command, "+photflagbad %d", PhotFlagBad);182 if (PhotFlagPoor) strextend ( command, "+photflagpoor %d", PhotFlagPoor);158 if (FIT_MODE == FIT_PM_ONLY) strextend (&command, "-pm"); 159 if (FIT_MODE == FIT_PAR_ONLY) strextend (&command, "-par"); 160 if (FIT_MODE == FIT_PM_AND_PAR) strextend (&command, "-pmpar"); 161 162 if (VERBOSE) strextend (&command, "-v"); 163 if (VERBOSE2) strextend (&command, "-vv"); 164 if (RESET) strextend (&command, "-reset"); 165 if (UPDATE) strextend (&command, "-update"); 166 167 if (RESET_BAD_IMAGES) strextend (&command, "-reset-bad-images"); 168 169 if (ImagSelect) strextend (&command, "-instmag %f %f", ImagMin, ImagMax); 170 if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue); 171 172 if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search"); 173 if (FlagOutlier) strextend (&command, "-clip %d", CLIP_THRESH); 174 if (ExcludeBogus) strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius); 175 176 if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); 177 178 if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); 179 if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); 180 if (PhotFlagSelect) strextend (&command, "+photflags"); 181 if (PhotFlagBad) strextend (&command, "+photflagbad %d", PhotFlagBad); 182 if (PhotFlagPoor) strextend (&command, "+photflagpoor %d", PhotFlagPoor); 183 183 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 184 184 185 185 if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) { 186 strextend ( command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);186 strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG); 187 187 } 188 188 if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) { 189 strextend ( command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);190 } 191 192 if (MinBadQF > 0.0) strextend ( command, "-min-bad-psfqf %f", MinBadQF);193 if (MaxMeanOffset != 10.0) strextend ( command, "-max-mean-offset %f", MaxMeanOffset);189 strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG); 190 } 191 192 if (MinBadQF > 0.0) strextend (&command, "-min-bad-psfqf %f", MinBadQF); 193 if (MaxMeanOffset != 10.0) strextend (&command, "-max-mean-offset %f", MaxMeanOffset); 194 194 195 195 if (TimeSelect) { 196 196 char *tstart = ohana_sec_to_date (TSTART); 197 197 char *tstop = ohana_sec_to_date (TSTOP); 198 strextend ( command, "-time %s %s", tstart, tstop);198 strextend (&command, "-time %s %s", tstart, tstop); 199 199 free (tstart); 200 200 free (tstop); … … 270 270 // MaxDensityUse, MaxDensityValue 271 271 272 char command[1024];273 s nprintf (command, 1024, "relastro_client -update-offsets -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f",272 char *command = NULL; 273 strextend (&command, "relastro_client -update-offsets -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f", 274 274 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR); 275 275 276 if (FIT_MODE == FIT_PM_ONLY) strextend ( command, "-pm");277 if (FIT_MODE == FIT_PAR_ONLY) strextend ( command, "-par");278 if (FIT_MODE == FIT_PM_AND_PAR) strextend ( command, "-pmpar");279 280 if (VERBOSE) strextend ( command, "-v");281 if (VERBOSE2) strextend ( command, "-vv");282 if (RESET) strextend ( command, "-reset");283 if (UPDATE) strextend ( command, "-update");284 285 if (RESET_BAD_IMAGES) strextend ( command, "-reset-bad-images");286 287 if (ImagSelect) strextend ( command, "-instmag %f %f", ImagMin, ImagMax);288 if (MaxDensityUse) strextend ( command, "-max-density %f", MaxDensityValue);289 290 if (USE_BASIC_CHECK) strextend ( command, "-basic-image-search");291 if (FlagOutlier) strextend ( command, "-clip %d", CLIP_THRESH);292 if (ExcludeBogus) strextend ( command, "-exclude-bogus %f", ExcludeBogusRadius);293 294 if (USE_FIXED_PIXCOORDS) strextend ( command, "-D USE_FIXED_PIXCOORDS 1");295 296 if (PHOTCODE_KEEP_LIST) strextend ( command, "+photcode %s", PHOTCODE_KEEP_LIST);297 if (PHOTCODE_SKIP_LIST) strextend ( command, "-photcode %s", PHOTCODE_SKIP_LIST);298 if (PhotFlagSelect) strextend ( command, "+photflags");299 if (PhotFlagBad) strextend ( command, "+photflagbad %d", PhotFlagBad);300 if (PhotFlagPoor) strextend ( command, "+photflagpoor %d", PhotFlagPoor);276 if (FIT_MODE == FIT_PM_ONLY) strextend (&command, "-pm"); 277 if (FIT_MODE == FIT_PAR_ONLY) strextend (&command, "-par"); 278 if (FIT_MODE == FIT_PM_AND_PAR) strextend (&command, "-pmpar"); 279 280 if (VERBOSE) strextend (&command, "-v"); 281 if (VERBOSE2) strextend (&command, "-vv"); 282 if (RESET) strextend (&command, "-reset"); 283 if (UPDATE) strextend (&command, "-update"); 284 285 if (RESET_BAD_IMAGES) strextend (&command, "-reset-bad-images"); 286 287 if (ImagSelect) strextend (&command, "-instmag %f %f", ImagMin, ImagMax); 288 if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue); 289 290 if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search"); 291 if (FlagOutlier) strextend (&command, "-clip %d", CLIP_THRESH); 292 if (ExcludeBogus) strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius); 293 294 if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); 295 296 if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); 297 if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); 298 if (PhotFlagSelect) strextend (&command, "+photflags"); 299 if (PhotFlagBad) strextend (&command, "+photflagbad %d", PhotFlagBad); 300 if (PhotFlagPoor) strextend (&command, "+photflagpoor %d", PhotFlagPoor); 301 301 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 302 302 303 303 if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) { 304 strextend ( command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);304 strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG); 305 305 } 306 306 if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) { 307 strextend ( command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);308 } 309 310 if (MinBadQF > 0.0) strextend ( command, "-min-bad-psfqf %f", MinBadQF);311 if (MaxMeanOffset != 10.0) strextend ( command, "-max-mean-offset %f", MaxMeanOffset);307 strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG); 308 } 309 310 if (MinBadQF > 0.0) strextend (&command, "-min-bad-psfqf %f", MinBadQF); 311 if (MaxMeanOffset != 10.0) strextend (&command, "-max-mean-offset %f", MaxMeanOffset); 312 312 313 313 if (TimeSelect) { 314 314 char *tstart = ohana_sec_to_date (TSTART); 315 315 char *tstop = ohana_sec_to_date (TSTOP); 316 strextend ( command, "-time %s %s", tstart, tstop);316 strextend (&command, "-time %s %s", tstart, tstop); 317 317 free (tstart); 318 318 free (tstop); -
trunk/Ohana/src/relastro/src/args.c
r37807 r38441 959 959 } 960 960 961 int strextend (char *input, char *format,...) {962 963 char tmpextra[1024], tmpline[1024];964 va_list argp;965 966 va_start (argp, format);967 vsnprintf (tmpextra, 1024, format, argp);968 snprintf (tmpline, 1024, "%s %s", input, tmpextra);969 strcpy (input, tmpline);970 971 return TRUE;972 } -
trunk/Ohana/src/relastro/src/assign_images.c
r37807 r38441 11 11 // convert database table to internal structure (binary to Image) 12 12 // 'image' points to the same memory as db->ftable->buffer 13 Image *image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);13 Image *image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 14 14 if (!image) { 15 15 fprintf (stderr, "ERROR: failed to read images\n"); -
trunk/Ohana/src/relastro/src/bcatalog.c
r37807 r38441 521 521 subcatalog[0].Nmeasure = Nmeasure; 522 522 subcatalog[0].Nsecfilt = oldcatalog[0].Nsecfilt; 523 subcatalog[0].Nsecf _mem = Naverage * oldcatalog[0].Nsecfilt;523 subcatalog[0].Nsecfilt_mem = Naverage * oldcatalog[0].Nsecfilt; 524 524 525 525 return (TRUE); … … 628 628 subcatalog[0].Nmeasure = Nmeasure; 629 629 subcatalog[0].Nsecfilt = oldcatalog[0].Nsecfilt; 630 subcatalog[0].Nsecf _mem = Naverage * oldcatalog[0].Nsecfilt;630 subcatalog[0].Nsecfilt_mem = Naverage * oldcatalog[0].Nsecfilt; 631 631 632 632 return (TRUE); … … 722 722 subcatalog[0].Nmeasure = Nmeasure; 723 723 subcatalog[0].Nsecfilt = catalog[0].Nsecfilt; 724 subcatalog[0].Nsecf _mem = Naverage * catalog[0].Nsecfilt;724 subcatalog[0].Nsecfilt_mem = Naverage * catalog[0].Nsecfilt; 725 725 726 726 return (TRUE); -
trunk/Ohana/src/relastro/src/high_speed_catalogs.c
r35763 r38441 31 31 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 32 32 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 33 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;33 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 34 34 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 35 35 … … 38 38 exit (1); 39 39 } 40 if (!catalog.Nave s_disk) {40 if (!catalog.Naverage_disk) { 41 41 if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", catalog.filename); 42 42 dvo_catalog_unlock (&catalog); … … 147 147 } 148 148 149 char command[1024];150 s nprintf (command, 1024, "relastro_client -high-speed %s %s %f %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f",149 char *command = NULL; 150 strextend (&command, "relastro_client -high-speed %s %s %f %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f", 151 151 PHOTCODE_A_LIST, PHOTCODE_B_LIST, RADIUS, outputDir, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 152 152 … … 154 154 155 155 // options / arguments that can affect relastro_client -high-speed 156 char tmpline[1024]; 157 if (FIT_MODE == FIT_PM_ONLY) { snprintf (tmpline, 1024, "%s -pm", command); strcpy (command, tmpline); } 158 if (FIT_MODE == FIT_PAR_ONLY) { snprintf (tmpline, 1024, "%s -par", command); strcpy (command, tmpline); } 159 if (FIT_MODE == FIT_PM_AND_PAR) { snprintf (tmpline, 1024, "%s -pmpar", command); strcpy (command, tmpline); } 160 161 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 162 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 163 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 164 if (ImagSelect) { snprintf (tmpline, 1024, "%s -instmag %f %f", command, ImagMin, ImagMax); strcpy (command, tmpline); } 165 if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue); strcpy (command, tmpline); } 156 if (FIT_MODE == FIT_PM_ONLY) { strextend (&command, "-pm"); } 157 if (FIT_MODE == FIT_PAR_ONLY) { strextend (&command, "-par"); } 158 if (FIT_MODE == FIT_PM_AND_PAR) { strextend (&command, "-pmpar"); } 159 160 if (VERBOSE) { strextend (&command, "-v"); } 161 if (VERBOSE2) { strextend (&command, "-vv"); } 162 if (RESET) { strextend (&command, "-reset"); } 163 if (ImagSelect) { strextend (&command, "-instmag %f %f", ImagMin, ImagMax); } 164 if (MaxDensityUse) { strextend (&command, "-max-density %f", MaxDensityValue); } 166 165 167 if (USE_BASIC_CHECK) { snprintf (tmpline, 1024, "%s -basic-image-search", command); strcpy (command, tmpline); } 168 169 if (FlagOutlier) { snprintf (tmpline, 1024, "%s -clip %d", command, CLIP_THRESH); strcpy (command, tmpline); } 170 171 if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command); strcpy (command, tmpline); } 172 173 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); } 174 if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); } 175 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); } 176 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); } 177 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); } 166 if (USE_BASIC_CHECK) { strextend (&command, "-basic-image-search"); } 167 if (FlagOutlier) { strextend (&command, "-clip %d", CLIP_THRESH); } 168 if (USE_FIXED_PIXCOORDS) { strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); } 169 if (PHOTCODE_KEEP_LIST) { strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); } 170 if (PHOTCODE_SKIP_LIST) { strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); } 171 if (PhotFlagSelect) { strextend (&command, "+photflags"); } 172 if (PhotFlagBad) { strextend (&command, "+photflagbad %d", PhotFlagBad); } 173 if (PhotFlagPoor) { strextend (&command, "+photflagpoor %d", PhotFlagPoor); } 178 174 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 179 175 180 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); }181 if (MaxMeanOffset != 10.0) { s nprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); }182 183 if (WHERE_A[0]) { s nprintf (tmpline, 1024, "%s -D WHERE_A \"%s\"", command, WHERE_A); strcpy (command, tmpline); }184 if (WHERE_B[0]) { s nprintf (tmpline, 1024, "%s -D WHERE_B \"%s\"", command, WHERE_B); strcpy (command, tmpline); }176 if (MinBadQF > 0.0) { strextend (&command, "-min-bad-psfqf %f", MinBadQF); } 177 if (MaxMeanOffset != 10.0) { strextend (&command, "-max-mean-offset %f", MaxMeanOffset); } 178 179 if (WHERE_A[0]) { strextend (&command, "-D WHERE_A \"%s\"", WHERE_A); } 180 if (WHERE_B[0]) { strextend (&command, "-D WHERE_B \"%s\"", WHERE_B); } 185 181 186 182 if (TimeSelect) { 187 183 char *tstart = ohana_sec_to_date (TSTART); 188 184 char *tstop = ohana_sec_to_date (TSTOP); 189 s nprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);185 strextend (&command, "-time %s %s", tstart, tstop); 190 186 free (tstart); 191 187 free (tstop); 192 strcpy (command, tmpline);193 188 } 194 189 -
trunk/Ohana/src/relastro/src/high_speed_objects.c
r37807 r38441 32 32 catalogOut.filename = filename; // based on the input name, need to keep everything below the catdir portion 33 33 catalogOut.Nsecfilt = Nsecfilt; 34 catalogOut.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF; // load all data34 catalogOut.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; // load all data 35 35 36 36 catalogOut.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data … … 263 263 catalogOut.Nmeasure=Nmatchmeas; 264 264 catalogOut.Nsecfilt=Nsecfilt; 265 catalogOut.Nsecf _mem=Nmatch*Nsecfilt;265 catalogOut.Nsecfilt_mem=Nmatch*Nsecfilt; 266 266 267 267 populate_tiny_values (&catalogOut, DVO_TV_MEASURE); -
trunk/Ohana/src/relastro/src/hpm_catalogs.c
r35763 r38441 29 29 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 30 30 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 31 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;31 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 32 32 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 33 33 … … 36 36 exit (1); 37 37 } 38 if (!catalog.Nave s_disk) {38 if (!catalog.Naverage_disk) { 39 39 if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", catalog.filename); 40 40 dvo_catalog_unlock (&catalog); … … 145 145 } 146 146 147 char command[1024];148 s nprintf (command, 1024, "relastro_client -hpm %f %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f",147 char *command = NULL; 148 strextend (&command, "relastro_client -hpm %f %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f", 149 149 RADIUS, outputDir, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 150 150 … … 152 152 153 153 // options / arguments that can affect relastro_client -high-speed 154 char tmpline[1024]; 155 if (FIT_MODE == FIT_PM_ONLY) { snprintf (tmpline, 1024, "%s -pm", command); strcpy (command, tmpline); } 156 if (FIT_MODE == FIT_PAR_ONLY) { snprintf (tmpline, 1024, "%s -par", command); strcpy (command, tmpline); } 157 if (FIT_MODE == FIT_PM_AND_PAR) { snprintf (tmpline, 1024, "%s -pmpar", command); strcpy (command, tmpline); } 158 159 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 160 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 161 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 162 if (ImagSelect) { snprintf (tmpline, 1024, "%s -instmag %f %f", command, ImagMin, ImagMax); strcpy (command, tmpline); } 163 if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue); strcpy (command, tmpline); } 154 if (FIT_MODE == FIT_PM_ONLY) { strextend (&command, "-pm"); } 155 if (FIT_MODE == FIT_PAR_ONLY) { strextend (&command, "-par"); } 156 if (FIT_MODE == FIT_PM_AND_PAR) { strextend (&command, "-pmpar"); } 157 158 if (VERBOSE) { strextend (&command, "-v"); } 159 if (VERBOSE2) { strextend (&command, "-vv"); } 160 if (RESET) { strextend (&command, "-reset"); } 161 if (ImagSelect) { strextend (&command, "-instmag %f %f", ImagMin, ImagMax); } 162 if (MaxDensityUse) { strextend (&command, "-max-density %f", MaxDensityValue); } 164 163 165 if (USE_BASIC_CHECK) { snprintf (tmpline, 1024, "%s -basic-image-search", command); strcpy (command, tmpline); } 166 167 if (FlagOutlier) { snprintf (tmpline, 1024, "%s -clip %d", command, CLIP_THRESH); 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); } 164 if (USE_BASIC_CHECK) { strextend (&command, "-basic-image-search"); } 165 if (FlagOutlier) { strextend (&command, "-clip %d", CLIP_THRESH); } 166 if (USE_FIXED_PIXCOORDS) { strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); } 167 if (PHOTCODE_KEEP_LIST) { strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); } 168 if (PHOTCODE_SKIP_LIST) { strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); } 169 if (PhotFlagSelect) { strextend (&command, "+photflags"); } 170 if (PhotFlagBad) { strextend (&command, "+photflagbad %d", PhotFlagBad); } 171 if (PhotFlagPoor) { strextend (&command, "+photflagpoor %d", PhotFlagPoor); } 176 172 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 177 173 178 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); }179 if (MaxMeanOffset != 10.0) { s nprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); }174 if (MinBadQF > 0.0) { strextend (&command, "-min-bad-psfqf %f", MinBadQF); } 175 if (MaxMeanOffset != 10.0) { strextend (&command, "-max-mean-offset %f", MaxMeanOffset); } 180 176 181 177 if (TimeSelect) { 182 178 char *tstart = ohana_sec_to_date (TSTART); 183 179 char *tstop = ohana_sec_to_date (TSTOP); 184 s nprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);180 strextend (&command, "-time %s %s", tstart, tstop); 185 181 free (tstart); 186 182 free (tstop); 187 strcpy (command, tmpline);188 183 } 189 184 -
trunk/Ohana/src/relastro/src/hpm_objects.c
r37807 r38441 33 33 catalogOut.filename = filename; 34 34 catalogOut.Nsecfilt = Nsecfilt; 35 catalogOut.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF; // load all data35 catalogOut.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; // load all data 36 36 37 37 catalogOut.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data … … 279 279 } 280 280 catalogOut.Nsecfilt = Nsecfilt; 281 catalogOut.Nsecf _mem = Nsecfilt * catalogOut.Naverage;281 catalogOut.Nsecfilt_mem = Nsecfilt * catalogOut.Naverage; 282 282 283 283 populate_tiny_values (&catalogOut, DVO_TV_MEASURE); -
trunk/Ohana/src/relastro/src/launch_region_hosts.c
r37807 r38441 77 77 } 78 78 79 char command[1024];80 s nprintf (command, 1024, "relastro -parallel-images %s", filename);81 strextend ( command, "-region-hosts %s", REGION_FILE);82 strextend ( command, "-region-hostID %d", host->hostID);83 strextend ( command, "-D CATDIR %s", CATDIR);84 strextend ( command, "-region %f %f %f %f", host->RminCat, host->RmaxCat, host->DminCat, host->DmaxCat);85 strextend ( command, "-statmode %s", STATMODE);86 strextend ( command, "-minerror %f", MIN_ERROR);87 strextend ( command, "-nloop %d", NLOOP);88 strextend ( command, "-threads %d", NTHREADS);79 char *command = NULL; 80 strextend (&command, "relastro -parallel-images %s", filename); 81 strextend (&command, "-region-hosts %s", REGION_FILE); 82 strextend (&command, "-region-hostID %d", host->hostID); 83 strextend (&command, "-D CATDIR %s", CATDIR); 84 strextend (&command, "-region %f %f %f %f", host->RminCat, host->RmaxCat, host->DminCat, host->DmaxCat); 85 strextend (&command, "-statmode %s", STATMODE); 86 strextend (&command, "-minerror %f", MIN_ERROR); 87 strextend (&command, "-nloop %d", NLOOP); 88 strextend (&command, "-threads %d", NTHREADS); 89 89 90 90 switch (FIT_TARGET) { 91 91 case TARGET_SIMPLE: 92 strextend ( command, "-update-simple");92 strextend (&command, "-update-simple"); 93 93 break; 94 94 case TARGET_CHIPS: 95 strextend ( command, "-update-chips");95 strextend (&command, "-update-chips"); 96 96 break; 97 97 case TARGET_MOSAICS: 98 strextend ( command, "-update-mosaics");98 strextend (&command, "-update-mosaics"); 99 99 break; 100 100 case TARGET_NONE: … … 102 102 } 103 103 104 if (VERBOSE) strextend ( command, "-v");105 if (VERBOSE2) strextend ( command, "-vv");106 if (RESET) strextend ( command, "-reset");107 if (UPDATE) strextend ( command, "-update");108 if (PARALLEL) strextend ( command, "-parallel");109 if (PARALLEL_MANUAL) strextend ( command, "-parallel-manual");110 if (PARALLEL_SERIAL) strextend ( command, "-parallel-serial");111 if (PHOTCODE_KEEP_LIST) strextend ( command, "+photcode %s", PHOTCODE_KEEP_LIST);112 if (PHOTCODE_SKIP_LIST) strextend ( command, "-photcode %s", PHOTCODE_SKIP_LIST);113 if (PHOTCODE_RESET_LIST) strextend ( command, "-reset-to-photcode %s", PHOTCODE_RESET_LIST);104 if (VERBOSE) strextend (&command, "-v"); 105 if (VERBOSE2) strextend (&command, "-vv"); 106 if (RESET) strextend (&command, "-reset"); 107 if (UPDATE) strextend (&command, "-update"); 108 if (PARALLEL) strextend (&command, "-parallel"); 109 if (PARALLEL_MANUAL) strextend (&command, "-parallel-manual"); 110 if (PARALLEL_SERIAL) strextend (&command, "-parallel-serial"); 111 if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); 112 if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); 113 if (PHOTCODE_RESET_LIST) strextend (&command, "-reset-to-photcode %s", PHOTCODE_RESET_LIST); 114 114 115 if (MaxDensityUse) strextend ( command, "-max-density %f", MaxDensityValue);116 if (ImagSelect) strextend ( command, "-instmag %f %f", ImagMin, ImagMax);117 if (ExcludeBogus) strextend ( command, "-exclude-bogus %f", ExcludeBogusRadius);115 if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue); 116 if (ImagSelect) strextend (&command, "-instmag %f %f", ImagMin, ImagMax); 117 if (ExcludeBogus) strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius); 118 118 119 119 if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) { 120 strextend ( command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);120 strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG); 121 121 } 122 122 if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) { 123 strextend ( command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);123 strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG); 124 124 } 125 125 126 if (PhotFlagSelect) strextend ( command, "+photflags");127 if (PhotFlagBad) strextend ( command, "+photflagbad %d", PhotFlagBad);128 if (PhotFlagPoor) strextend ( command, "+photflagpoor %d", PhotFlagPoor);126 if (PhotFlagSelect) strextend (&command, "+photflags"); 127 if (PhotFlagBad) strextend (&command, "+photflagbad %d", PhotFlagBad); 128 if (PhotFlagPoor) strextend (&command, "+photflagpoor %d", PhotFlagPoor); 129 129 130 if (CHIPMAP) strextend ( command, "-chipmap %d", CHIPMAP);131 if (RESET_IMAGES) strextend ( command, "-reset-images");130 if (CHIPMAP) strextend (&command, "-chipmap %d", CHIPMAP); 131 if (RESET_IMAGES) strextend (&command, "-reset-images"); 132 132 133 if (MinBadQF > 0.0) strextend ( command, "-min-bad-psfqf %f", MinBadQF);134 if (MaxMeanOffset != 10.0) strextend ( command, "-max-mean-offset %f", MaxMeanOffset);133 if (MinBadQF > 0.0) strextend (&command, "-min-bad-psfqf %f", MinBadQF); 134 if (MaxMeanOffset != 10.0) strextend (&command, "-max-mean-offset %f", MaxMeanOffset); 135 135 136 strextend ( command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);137 strextend ( command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);138 strextend ( command, "-D RELASTRO_DPOS_MAX %f", DPOS_MAX);139 strextend ( command, "-D ADDSTAR_RADIUS %f", ADDSTAR_RADIUS);136 strextend (&command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW); 137 strextend (&command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM); 138 strextend (&command, "-D RELASTRO_DPOS_MAX %f", DPOS_MAX); 139 strextend (&command, "-D ADDSTAR_RADIUS %f", ADDSTAR_RADIUS); 140 140 141 strextend ( command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);141 strextend (&command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL); 142 142 143 strextend ( command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);144 strextend ( command, "-D USE_ICRF_LOCAL %d", USE_ICRF_LOCAL);145 strextend ( command, "-D USE_ICRF_SHFIT %d", USE_ICRF_SHFIT);146 strextend ( command, "-D USE_ICRF_POLE %d", USE_ICRF_POLE);143 strextend (&command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT); 144 strextend (&command, "-D USE_ICRF_LOCAL %d", USE_ICRF_LOCAL); 145 strextend (&command, "-D USE_ICRF_SHFIT %d", USE_ICRF_SHFIT); 146 strextend (&command, "-D USE_ICRF_POLE %d", USE_ICRF_POLE); 147 147 148 if (USE_FIXED_PIXCOORDS) strextend ( command, "-D USE_FIXED_PIXCOORDS 1");148 if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); 149 149 150 150 if (TimeSelect) { 151 151 char *tstart = ohana_sec_to_date (TSTART); 152 152 char *tstop = ohana_sec_to_date (TSTOP); 153 strextend ( command, "-time %s %s", tstart, tstop);153 strextend (&command, "-time %s %s", tstart, tstop); 154 154 free (tstart); 155 155 free (tstop); -
trunk/Ohana/src/relastro/src/load_catalogs.c
r38062 r38441 40 40 pcatalog->catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 41 41 pcatalog->catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 42 pcatalog->catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF; // don't need to load all data at this point42 pcatalog->catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_SECFILT; // don't need to load all data at this point 43 43 pcatalog->Nsecfilt = GetPhotcodeNsecfilt (); 44 44 … … 48 48 exit (1); 49 49 } 50 if (!pcatalog[0].Nave s_disk) {50 if (!pcatalog[0].Naverage_disk) { 51 51 if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", pcatalog[0].filename); 52 52 dvo_catalog_unlock (pcatalog); … … 160 160 // MaxDensityUse, MaxDensityValue 161 161 162 char command[1024];163 s nprintf (command, 1024, "relastro_client -load-objects %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f -D RELASTRO_SIGMA_LIM %f",162 char *command = NULL; 163 strextend (&command, "relastro_client -load-objects %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -minerror %f -D RELASTRO_SIGMA_LIM %f", 164 164 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); 165 165 166 if (FIT_MODE == FIT_PM_ONLY) strextend ( command, "-pm");167 if (FIT_MODE == FIT_PAR_ONLY) strextend ( command, "-par");168 if (FIT_MODE == FIT_PM_AND_PAR) strextend ( command, "-pmpar");169 170 if (VERBOSE) strextend ( command, "-v");171 if (VERBOSE2) strextend ( command, "-vv");172 if (RESET) strextend ( command, "-reset");173 if (ImagSelect) strextend ( command, "-instmag %f %f", ImagMin, ImagMax);174 if (MaxDensityUse) strextend ( command, "-max-density %f", MaxDensityValue);175 if (FlagOutlier) strextend ( command, "-clip %d", CLIP_THRESH);176 if (ExcludeBogus) strextend ( command, "-exclude-bogus %f", ExcludeBogusRadius);177 178 if (USE_ICRF_CORRECT) strextend ( command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);179 if (USE_GALAXY_MODEL) strextend ( command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);166 if (FIT_MODE == FIT_PM_ONLY) strextend (&command, "-pm"); 167 if (FIT_MODE == FIT_PAR_ONLY) strextend (&command, "-par"); 168 if (FIT_MODE == FIT_PM_AND_PAR) strextend (&command, "-pmpar"); 169 170 if (VERBOSE) strextend (&command, "-v"); 171 if (VERBOSE2) strextend (&command, "-vv"); 172 if (RESET) strextend (&command, "-reset"); 173 if (ImagSelect) strextend (&command, "-instmag %f %f", ImagMin, ImagMax); 174 if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue); 175 if (FlagOutlier) strextend (&command, "-clip %d", CLIP_THRESH); 176 if (ExcludeBogus) strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius); 177 178 if (USE_ICRF_CORRECT) strextend (&command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT); 179 if (USE_GALAXY_MODEL) strextend (&command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL); 180 180 181 181 if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) { 182 strextend ( command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);182 strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG); 183 183 } 184 184 if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) { 185 strextend ( command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);186 } 187 188 if (USE_FIXED_PIXCOORDS) strextend ( command, "-D USE_FIXED_PIXCOORDS 1");189 if (PHOTCODE_KEEP_LIST) strextend ( command, "+photcode %s", PHOTCODE_KEEP_LIST);190 if (PHOTCODE_SKIP_LIST) strextend ( command, "-photcode %s", PHOTCODE_SKIP_LIST);191 if (PhotFlagSelect) strextend ( command, "+photflags");192 if (PhotFlagBad) strextend ( command, "+photflagbad %d", PhotFlagBad);193 if (PhotFlagPoor) strextend ( command, "+photflagpoor %d", PhotFlagPoor);185 strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG); 186 } 187 188 if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); 189 if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); 190 if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); 191 if (PhotFlagSelect) strextend (&command, "+photflags"); 192 if (PhotFlagBad) strextend (&command, "+photflagbad %d", PhotFlagBad); 193 if (PhotFlagPoor) strextend (&command, "+photflagpoor %d", PhotFlagPoor); 194 194 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 195 195 … … 197 197 char *tstart = ohana_sec_to_date (TSTART); 198 198 char *tstop = ohana_sec_to_date (TSTOP); 199 strextend ( command, "-time %s %s", tstart, tstop);199 strextend (&command, "-time %s %s", tstart, tstop); 200 200 free (tstart); 201 201 free (tstop); -
trunk/Ohana/src/relastro/src/load_images.c
r37807 r38441 16 16 17 17 // convert database table to internal structure 18 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].s wapped);18 image = gfits_table_get_Image (&db[0].ftable, &Nimage, &db[0].scaledValue, &db[0].nativeOrder); 19 19 if (!image) { 20 20 fprintf (stderr, "ERROR: failed to read images\n"); -
trunk/Ohana/src/relastro/src/relastro_client.c
r37807 r38441 69 69 70 70 set_db (&db); 71 gfits_db_init (&db); 71 72 72 73 /* lock and load the image db table */ -
trunk/Ohana/src/relastro/src/relastro_images.c
r37807 r38441 11 11 /* register database handle with shutdown procedure */ 12 12 set_db (&db); 13 gfits_db_init (&db); 13 14 14 15 /* lock and load the image db table */ -
trunk/Ohana/src/relastro/src/relastro_merge_source.c
r37038 r38441 45 45 catalog_src.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 46 46 catalog_src.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 47 catalog_src.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;47 catalog_src.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 48 48 catalog_src.Nsecfilt = GetPhotcodeNsecfilt (); 49 49 … … 52 52 exit (1); 53 53 } 54 if (!catalog_src.Nave s_disk) {54 if (!catalog_src.Naverage_disk) { 55 55 fprintf (stderr, "no data in %s, error in cat ID?\n", catalog_src.filename); 56 56 exit (1); -
trunk/Ohana/src/relastro/src/relastro_objects.c
r37807 r38441 44 44 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 45 45 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 46 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;46 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT; 47 47 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 48 48 … … 52 52 exit (1); 53 53 } 54 if (!catalog.Nave s_disk) {54 if (!catalog.Naverage_disk) { 55 55 if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", catalog.filename); 56 56 dvo_catalog_unlock (&catalog); … … 147 147 // SRC_MEAS_TOOFEW 148 148 149 char command[1024];150 s nprintf (command, 1024, "relastro_client -update-objects -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s",149 char *command = NULL; 150 strextend (&command, "relastro_client -update-objects -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s", 151 151 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE); 152 152 153 char tmpline[1024]; 154 if (FIT_MODE == FIT_PM_ONLY) { snprintf (tmpline, 1024, "%s -pm", command); strcpy (command, tmpline); } 155 if (FIT_MODE == FIT_PAR_ONLY) { snprintf (tmpline, 1024, "%s -par", command); strcpy (command, tmpline); } 156 if (FIT_MODE == FIT_PM_AND_PAR) { snprintf (tmpline, 1024, "%s -pmpar", command); strcpy (command, tmpline); } 157 158 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 159 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 160 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 161 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); } 162 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); } 165 166 if (FlagOutlier) { snprintf (tmpline, 1024, "%s -clip %d", command, CLIP_THRESH); strcpy (command, tmpline); } 167 168 if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command); strcpy (command, tmpline); } 169 170 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); } 171 if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); } 172 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); } 173 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); } 174 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); } 153 if (FIT_MODE == FIT_PM_ONLY) { strextend (&command, "-pm"); } 154 if (FIT_MODE == FIT_PAR_ONLY) { strextend (&command, "-par"); } 155 if (FIT_MODE == FIT_PM_AND_PAR) { strextend (&command, "-pmpar"); } 156 157 if (VERBOSE) { strextend (&command, "-v"); } 158 if (VERBOSE2) { strextend (&command, "-vv"); } 159 if (RESET) { strextend (&command, "-reset"); } 160 if (UPDATE) { strextend (&command, "-update"); } 161 if (ImagSelect) { strextend (&command, "-instmag %f %f", ImagMin, ImagMax); } 162 if (MaxDensityUse) { strextend (&command, "-max-density %f", MaxDensityValue); } 163 if (FlagOutlier) { strextend (&command, "-clip %d", CLIP_THRESH); } 164 if (USE_FIXED_PIXCOORDS) { strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); } 165 if (PHOTCODE_KEEP_LIST) { strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); } 166 if (PHOTCODE_SKIP_LIST) { strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST); } 167 if (PhotFlagSelect) { strextend (&command, "+photflags"); } 168 if (PhotFlagBad) { strextend (&command, "+photflagbad %d", PhotFlagBad); } 169 if (PhotFlagPoor) { strextend (&command, "+photflagpoor %d", PhotFlagPoor); } 175 170 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 176 171 177 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); }178 if (MaxMeanOffset != 10.0) { s nprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); }172 if (MinBadQF > 0.0) { strextend (&command, "-min-bad-psfqf %f", MinBadQF); } 173 if (MaxMeanOffset != 10.0) { strextend (&command, "-max-mean-offset %f", MaxMeanOffset); } 179 174 180 175 if (TimeSelect) { 181 176 char *tstart = ohana_sec_to_date (TSTART); 182 177 char *tstop = ohana_sec_to_date (TSTOP); 183 s nprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);178 strextend (&command, "-time %s %s", tstart, tstop); 184 179 free (tstart); 185 180 free (tstop); 186 strcpy (command, tmpline);187 181 } 188 182 -
trunk/Ohana/src/relastro/src/relastro_parallel_regions.c
r37807 r38441 17 17 // register database handle with shutdown procedure 18 18 set_db (&db); 19 gfits_db_init (&db); 19 20 db.mode = dvo_catalog_catmode (CATMODE); 20 21 db.format = dvo_catalog_catformat (CATFORMAT);
Note:
See TracChangeset
for help on using the changeset viewer.
