IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36809


Ignore:
Timestamp:
Jun 3, 2014, 1:25:35 PM (12 years ago)
Author:
eugene
Message:

make sure all arguments are making their way to the child jobs; relastro ready for full parallel-regions with refColor and bogus exclusion

Location:
branches/eam_branches/ipp-20140423/Ohana/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140423/Ohana/src/dvopsps/src/insert_objects_dvopsps_catalog.c

    r35450 r36809  
    292292  PrintIOBuffer (ave_buffer, "%d, ",  average->measureOffset); 
    293293  PrintIOBuffer (ave_buffer, "%d, ",  average->missingOffset); 
    294   PrintIOBuffer (ave_buffer, "%d, ",  average->extendOffset);   
     294  PrintIOBuffer (ave_buffer, "%d, ",  0); // was : average->extendOffset);   
    295295  PrintIOBuffer (ave_buffer, "%u, ",  average->flags);         
    296296  PrintIOBuffer (ave_buffer, "%u, ",  average->photFlagsUpper);
  • branches/eam_branches/ipp-20140423/Ohana/src/relastro/Makefile

    r36630 r36809  
    127127$(SRC)/plotstuff.$(ARCH).o           \
    128128$(SRC)/relastroVisual.$(ARCH).o \
     129$(SRC)/syncfile.$(ARCH).o \
    129130$(SRC)/BrightCatalog.$(ARCH).o
    130131
  • branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h

    r36808 r36809  
    315315int           liststats           PROTO((double *value, double *dvalue, int N, StatType *stats));
    316316int           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));
     317Catalog      *load_catalogs       PROTO((SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath, char *syncfile));
    318318int           load_images         PROTO((FITS_DB *db, SkyList *skylist, int UseFullOverlap));
    319319Image        *select_images       PROTO((SkyList *skylist, Image *timage, off_t Ntimage, off_t **LineNumber, off_t *Nimage, int UseFullOverlap));
     
    533533
    534534float getColor (off_t meas, int cat);
     535
     536int strextend (char *input, char *format,...);
  • branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/BrightCatalog.c

    r36808 r36809  
    476476    gfits_define_bintable_column (&theader, "J", "OFF_MEASURE", "offset to first psf measurement",                        "", 1.0, 1.0*0x8000);
    477477    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);
    479479    gfits_define_bintable_column (&theader, "J", "FLAGS",       "average object flags (star; ghost; etc)",                "", 1.0, 1.0*0x8000);
    480480    gfits_define_bintable_column (&theader, "J", "PHOTFLAGS_U", "upper bit of 2 bit summary of per-measure photflags",    "", 1.0, 1.0*0x8000);
     
    575575    gfits_set_bintable_column (&theader, &ftable, "OFF_MEASURE", measureOffset,   catalog->Naverage);
    576576    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);
    578578    gfits_set_bintable_column (&theader, &ftable, "FLAGS",       flags,           catalog->Naverage);
    579579    gfits_set_bintable_column (&theader, &ftable, "PHOTFLAGS_U", photFlagsUpper,  catalog->Naverage);
  • branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/ImageOps.c

    r36808 r36809  
    477477    }
    478478
     479    X = measure[0].Xccd;
     480    Y = measure[0].Yccd;
    479481    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      }
    485490    }
    486491    n = measure[0].averef;
     
    618623    Measure *measure = &catalog[c].measure[m];
    619624
     625    X = measure[0].Xccd;
     626    Y = measure[0].Yccd;
    620627    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      }
    626636    }
    627637    n = measure[0].averef;
     
    688698
    689699    /* 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;
    690702    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    }
    698712    raw[i].Mag  = measure[0].M;
    699713    raw[i].dMag = measure[0].dM;
  • branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/UpdateObjectOffsets.c

    r35763 r36809  
    126126              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR);
    127127
    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);
    142141   
    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);
    145145   
    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);
    153153    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    154154
    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);
    157161
    158162    if (TimeSelect) {
    159163      char *tstart = ohana_sec_to_date (TSTART);
    160164      char *tstop  = ohana_sec_to_date (TSTOP);
    161       snprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);
     165      strextend (command, "-time %s %s", tstart, tstop);
    162166      free (tstart);
    163167      free (tstop);
    164       strcpy (command, tmpline);
    165168    }
    166169    fprintf (stderr, "command: %s\n", command);
  • branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/args.c

    r36808 r36809  
    318318  }
    319319
    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;
    321323  if ((N = get_argument (argc, argv, "-photcode"))) {
    322324    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    }
    335337    remove_argument (N, &argc, argv);
    336338  }
     
    692694    remove_argument (N, &argc, argv);
    693695    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);
    694706  }
    695707
     
    905917  exit (2);
    906918}
     919
     920int 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  
    1010
    1111// test image: 2013/06/15,13:25:51, GPC1.r.XY50
    12 static int CHECK_TEST_IMAGE = TRUE;
     12static int CHECK_TEST_IMAGE = FALSE;
    1313// static unsigned int Tref = 1378812312;
    1414// static short Cref = 10001;
     
    5959    ID_STAR_NO_ASTROM ;
    6060
    61   if (ExcludeBogus && (fbogus == NULL)) {
     61  if (VERBOSE2 && ExcludeBogus && (fbogus == NULL)) {
    6262    char name[1024];
    6363    snprintf (name, 1024, "%s/bogus.%02d.dat", CATDIR, HOST_ID);
     
    125125          if (radius > ExcludeBogusRadius) {
    126126              NskipBogus ++;
    127               if (TRUE || VERBOSE2) {
     127              if (VERBOSE2) {
    128128                FILE *foutput = fbogus ? fbogus : stderr;
    129129                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  
    11# include "relastro.h"
    22# 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 }
    163
    174int launch_region_hosts (RegionHostTable *regionHosts) {
     
    9279    if (MaxDensityUse)      strextend (command, "-max-density %f", MaxDensityValue);
    9380    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
    9487    if (PhotFlagSelect)     strextend (command, "+photflags");
    9588    if (PhotFlagBad)        strextend (command, "+photflagbad %d", PhotFlagBad);
     
    10295    strextend (command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
    10396    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");
    105100
    106101    if (TimeSelect) {
  • branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/load_catalogs.c

    r36800 r36809  
    11# include "relastro.h"
    22
    3 Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog);
     3Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog, char *syncfile);
    44void bcatalog_show_skips ();
    55
    6 Catalog *load_catalogs (SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath) {
     6Catalog *load_catalogs (SkyList *skylist, int *Ncatalog, int subselect, int hostID, char *hostpath, char *syncfile) {
    77
    88  int i, j, Nstar;
     
    1212  // XXX need to decide how to determine PARALLEL mode...
    1313  if (PARALLEL && !hostID) {
    14     catalog = load_catalogs_parallel (skylist, Ncatalog);
     14    catalog = load_catalogs_parallel (skylist, Ncatalog, syncfile);
    1515    return catalog;
    1616  }
     
    116116// CATDIR is supplied globally
    117117# define DEBUG 1
    118 Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog) {
     118Catalog *load_catalogs_parallel (SkyList *sky, int *Ncatalog, char *syncfile) {
    119119
    120120  char uniquer[12];
     
    153153              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);
    154154
    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);
    165166   
    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);
    176177    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    177178
     
    179180      char *tstart = ohana_sec_to_date (TSTART);
    180181      char *tstop  = ohana_sec_to_date (TSTOP);
    181       snprintf (tmpline, 1024, "%s -time %s %s", command, tstart, tstop);
     182      strextend (command, "-time %s %s", tstart, tstop);
    182183      free (tstart);
    183184      free (tstop);
    184       strcpy (command, tmpline);
    185185    }
    186186
     
    215215  }
    216216
     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
    217226  // each host generates a BrightCatalog structure, with the measure, average, etc value
    218227  // 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  
    3333      // USAGE: relastro_client -load-objects
    3434      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);
    3636      if (!catalog) {
    3737        fprintf (stderr, "ERROR loading catalogs from %s\n", CATDIR);
  • branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_images.c

    r36769 r36809  
    3131  // photcodesKeep is used here to allow measurements from the images being calibrated
    3232  // 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);
    3434  MARKTIME("load catalog data: %f sec\n", dtime);
    3535
  • branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/relastro_parallel_images.c

    r36769 r36809  
    4545
    4646  /* 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);
    4849  MARKTIME("-- load catalog data: %f sec\n", dtime);
     50  free (syncfile);
    4951 
    5052  if (photcodesReset) {
     
    5355  }
    5456
    55   // NOTE: if I let all hosts load blindly, I saturate the data clients with too many
    56   // relastro_client requests.  I need to have the master mediate this.  the master
    57   // will not launch the next remote job until this one says it is done
    58   char *syncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loadcat.sync");
    59   update_sync_file (syncfile, 1);
    60  
    6157  // generate tables go from catID,objID -> catSeq,objSeq
    6258  indexCatalogs (catalog, Ncatalog);
Note: See TracChangeset for help on using the changeset viewer.