IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2015, 9:44:51 PM (11 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20150419/Ohana/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150419/Ohana/src

  • branches/eam_branches/ipp-20150419/Ohana/src/relastro/src/UpdateObjectOffsets.c

    r37807 r38447  
    3434    catalog.catformat = dvo_catalog_catformat (CATFORMAT);    // set the default catformat from config data
    3535    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;
    3737    catalog.Nsecfilt  = GetPhotcodeNsecfilt ();
    3838
     
    4141      exit (1);
    4242    }
    43     if (!catalog.Naves_disk) {
     43    if (!catalog.Naverage_disk) {
    4444      if (VERBOSE2) fprintf (stderr, "no data in %s, skipping\n", catalog.filename);
    4545      dvo_catalog_unlock (&catalog);
     
    102102
    103103  int Ngroups;
    104   HostTableGroup *groups = HostTableGroups (table, &Ngroups);
     104  HostTableGroup *groups = HostTableGroupsUniqueMachines (table, &Ngroups);
    105105  // split the table into Ngroups, each with a unique set of machines (this avoids overloading the remote host machines)
    106106
     
    152152    // MaxDensityUse, MaxDensityValue
    153153
    154     char command[1024];
    155     snprintf (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",
    156156              group->hosts[i][0].hostID, CATDIR, group->hosts[i][0].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR);
    157157
    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);
    183183    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    184184
    185185    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);
    187187    }
    188188    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);
    194194
    195195    if (TimeSelect) {
    196196      char *tstart = ohana_sec_to_date (TSTART);
    197197      char *tstop  = ohana_sec_to_date (TSTOP);
    198       strextend (command, "-time %s %s", tstart, tstop);
     198      strextend (&command, "-time %s %s", tstart, tstop);
    199199      free (tstart);
    200200      free (tstop);
     
    270270    // MaxDensityUse, MaxDensityValue
    271271
    272     char command[1024];
    273     snprintf (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",
    274274              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, MIN_ERROR);
    275275
    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);
    301301    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    302302
    303303    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);
    305305    }
    306306    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);
    312312
    313313    if (TimeSelect) {
    314314      char *tstart = ohana_sec_to_date (TSTART);
    315315      char *tstop  = ohana_sec_to_date (TSTOP);
    316       strextend (command, "-time %s %s", tstart, tstop);
     316      strextend (&command, "-time %s %s", tstart, tstop);
    317317      free (tstart);
    318318      free (tstop);
Note: See TracChangeset for help on using the changeset viewer.