IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 16, 2016, 5:58:00 AM (10 years ago)
Author:
eugene
Message:

min chip order is 1; re-org code to set the remote command options (to be sure all options were being passed); plug leak; initImages now takes an argument to distinguish subset vs full image set (do not free the later)

Location:
branches/czw_branch/20160809/Ohana/src/relastro
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20160809/Ohana/src/relastro/include/relastro.h

    r39751 r39765  
    523523void          initGridBins        PROTO((Catalog *catalog, int Ncatalog));
    524524void          initImageBins       PROTO((Catalog *catalog, int Ncatalog, int FULLINIT));
    525 void          initImages          PROTO((Image *input, off_t *line_number, off_t N));
     525void          initImages          PROTO((Image *input, off_t *line_number, off_t N, int isSubset));
    526526void          freeImages          PROTO((char *dbImagePtr));
    527527void          initMosaicBins      PROTO((Catalog *catalog, int Ncatalog));
  • branches/czw_branch/20160809/Ohana/src/relastro/src/ImageOps.c

    r39751 r39765  
    66static Image        *image;   // list of available images
    77static off_t        Nimage;   // number of available images
     8static int         isImageSubset;
    89
    910// if we read only a subset of the rows from the Image FITS, LineNumber tells us to which row
     
    7879}
    7980
    80 void initImages (Image *input, off_t *line_number, off_t N) {
     81void initImages (Image *input, off_t *line_number, off_t N, int isSubset) {
    8182
    8283  off_t i;
    8384
     85  isImageSubset = isSubset;
    8486  image = input;
    8587  LineNumber = line_number;
     
    136138  // we call gfits_db_free as well as this function.  sometimes those point at the same
    137139  // memory location, in which case we should only do the free once.
    138   if ((void *) dbImagePtr != (void *) image) free (image);
     140  if (((void *) dbImagePtr != (void *) image) && isImageSubset) free (image);
    139141  free_astrom_table();
    140142}
  • branches/czw_branch/20160809/Ohana/src/relastro/src/UpdateObjectOffsets.c

    r39731 r39765  
    167167    strextend (&command, "relastro_client -update-offsets");
    168168    strextend (&command, "-hostID %d", group->hosts[i][0].hostID);
     169    strextend (&command, "-hostdir %s", group->hosts[i][0].pathname);
     170
    169171    strextend (&command, "-D CATDIR %s", CATDIR);
    170     strextend (&command, "-hostdir %s", group->hosts[i][0].pathname);
    171172    strextend (&command, "-region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    172173    strextend (&command, "-statmode %s", STATMODE);
    173174    strextend (&command, "-minerror %f", MIN_ERROR);
    174175
     176    strextend (&command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
     177    strextend (&command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);
     178
    175179    if (FIT_MODE == FIT_PM_ONLY)         strextend (&command, "-pm");
    176180    if (FIT_MODE == FIT_PAR_ONLY)        strextend (&command, "-par");
     
    180184    if (VERBOSE2)      strextend (&command, "-vv");
    181185    if (RESET)         strextend (&command, "-reset");
    182     if (UPDATE)        strextend (&command, "-update");
    183 
    184     if (RESET_BAD_IMAGES) strextend (&command, "-reset-bad-images");
    185186
    186187    if (ImagSelect)    strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
    187188    if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue);
    188    
    189     if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search");
    190189    if (FlagOutlier)     strextend (&command, "-clip %d", CLIP_THRESH);
    191190    if (ExcludeBogus)    strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
    192191   
    193     if (USE_ALL_IMAGES)      strextend (&command, "-use-all-images");
    194192    if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1");
    195 
    196     if (REPAIR_STACKS)          strextend (&command, "-repair-stacks-on-update");
    197     if (CHECK_MEASURE_TO_IMAGE) strextend (&command, "-check-measures");
    198 
    199     if (UPDATE_PS1_CHIP_MEASURE) strextend (&command, "-update-ps1-chip");
    200     if (UPDATE_HSC_MEASURE)      strextend (&command, "-update-hsc");
    201     if (UPDATE_CFH_MEASURE)      strextend (&command, "-update-cfh");
    202 
    203193    if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST);
    204194    if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST);
     
    208198    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    209199
    210     if (N_BOOTSTRAP_SAMPLES > 1) strextend (&command, "-bootstrap-samples %d", N_BOOTSTRAP_SAMPLES);
    211 
    212200    if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
    213201      strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
     
    217205    }
    218206
     207    if (REPAIR_STACKS)          strextend (&command, "-repair-stacks-on-update");
     208    if (CHECK_MEASURE_TO_IMAGE) strextend (&command, "-check-measures");
     209
     210    if (UPDATE_PS1_CHIP_MEASURE) strextend (&command, "-update-ps1-chip");
     211    if (UPDATE_HSC_MEASURE)      strextend (&command, "-update-hsc");
     212    if (UPDATE_CFH_MEASURE)      strextend (&command, "-update-cfh");
     213
     214    if (UPDATE)        strextend (&command, "-update");
     215    if (RESET_BAD_IMAGES) strextend (&command, "-reset-bad-images");
     216    if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search");
     217    if (USE_ALL_IMAGES)      strextend (&command, "-use-all-images");
     218
    219219    if (MinBadQF > 0.0)        strextend (&command, "-min-bad-psfqf %f", MinBadQF);
    220220    if (MaxMeanOffset != 10.0) strextend (&command, "-max-mean-offset  %f", MaxMeanOffset);
     221    if (N_BOOTSTRAP_SAMPLES > 1) strextend (&command, "-bootstrap-samples %d", N_BOOTSTRAP_SAMPLES);
    221222
    222223    if (TimeSelect) {
     
    304305    strextend (&command, "relastro_client -update-offsets");
    305306    strextend (&command, "-hostID %d", table->hosts[i].hostID);
     307    strextend (&command, "-hostdir %s", table->hosts[i].pathname);
     308
    306309    strextend (&command, "-D CATDIR %s", CATDIR);
    307     strextend (&command, "-hostdir %s", table->hosts[i].pathname);
    308310    strextend (&command, "-region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    309311    strextend (&command, "-statmode %s", STATMODE);
    310312    strextend (&command, "-minerror %f", MIN_ERROR);
    311313
     314    strextend (&command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
     315    strextend (&command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);
     316
    312317    if (FIT_MODE == FIT_PM_ONLY)         strextend (&command, "-pm");
    313318    if (FIT_MODE == FIT_PAR_ONLY)        strextend (&command, "-par");
     
    317322    if (VERBOSE2)      strextend (&command, "-vv");
    318323    if (RESET)         strextend (&command, "-reset");
    319     if (UPDATE)        strextend (&command, "-update");
    320 
    321     if (RESET_BAD_IMAGES) strextend (&command, "-reset-bad-images");
    322324
    323325    if (ImagSelect)    strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
    324326    if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue);
    325    
    326     if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search");
    327327    if (FlagOutlier)     strextend (&command, "-clip %d", CLIP_THRESH);
    328328    if (ExcludeBogus)    strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
    329329   
    330     if (USE_ALL_IMAGES)      strextend (&command, "-use-all-images");
    331330    if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1");
    332 
    333     if (REPAIR_STACKS)          strextend (&command, "-repair-stacks-on-update");
    334     if (CHECK_MEASURE_TO_IMAGE) strextend (&command, "-check-measures");
    335 
    336     if (UPDATE_PS1_CHIP_MEASURE) strextend (&command, "-update-ps1-chip");
    337     if (UPDATE_HSC_MEASURE)      strextend (&command, "-update-hsc");
    338     if (UPDATE_CFH_MEASURE)      strextend (&command, "-update-cfh");
    339 
    340331    if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST);
    341332    if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST);
     
    345336    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    346337
    347     if (N_BOOTSTRAP_SAMPLES > 1) strextend (&command, "-bootstrap-samples %d", N_BOOTSTRAP_SAMPLES);
    348 
    349338    if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
    350339      strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
     
    353342      strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
    354343    }
     344
     345    if (REPAIR_STACKS)          strextend (&command, "-repair-stacks-on-update");
     346    if (CHECK_MEASURE_TO_IMAGE) strextend (&command, "-check-measures");
     347
     348    if (UPDATE_PS1_CHIP_MEASURE) strextend (&command, "-update-ps1-chip");
     349    if (UPDATE_HSC_MEASURE)      strextend (&command, "-update-hsc");
     350    if (UPDATE_CFH_MEASURE)      strextend (&command, "-update-cfh");
     351
     352    if (UPDATE)        strextend (&command, "-update");
     353    if (RESET_BAD_IMAGES) strextend (&command, "-reset-bad-images");
     354    if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search");
     355    if (USE_ALL_IMAGES)      strextend (&command, "-use-all-images");
     356
     357    if (N_BOOTSTRAP_SAMPLES > 1) strextend (&command, "-bootstrap-samples %d", N_BOOTSTRAP_SAMPLES);
    355358
    356359    if (MinBadQF > 0.0)        strextend (&command, "-min-bad-psfqf %f", MinBadQF);
  • branches/czw_branch/20160809/Ohana/src/relastro/src/args.c

    r39761 r39765  
    509509  }
    510510
    511   CHIPORDER = 0;
     511  CHIPORDER = 1;
    512512  if ((N = get_argument (argc, argv, "-chiporder"))) {
    513513    remove_argument (N, &argc, argv);
     
    727727  FREE (BCATALOG);
    728728  FREE (HOSTDIR);
     729  FREE (GALAXY_MODEL);
    729730
    730731  // these are set in initialize
     
    12071208  FREE(HIGH_SPEED_DIR);
    12081209  FREE(BCATALOG);
    1209   FREE (HOSTDIR);
     1210  FREE(HOSTDIR);
     1211  FREE(GALAXY_MODEL);
    12101212
    12111213  // these are set in initialize
  • branches/czw_branch/20160809/Ohana/src/relastro/src/assign_images.c

    r39731 r39765  
    4040
    4141  // register the image array with ImageOps.c for later getimageByID calls
    42   initImages (image, NULL, Nimage);
     42  initImages (image, NULL, Nimage, FALSE);
    4343
    4444  if (VERBOSE) fprintf (stderr, "finding images\n");
  • branches/czw_branch/20160809/Ohana/src/relastro/src/launch_region_hosts.c

    r39735 r39765  
    8181    strextend (&command, "-region-hosts %s", REGION_FILE);
    8282    strextend (&command, "-region-hostID %d", host->hostID);
     83
    8384    strextend (&command, "-D CATDIR %s", CATDIR);
    8485    strextend (&command, "-region %f %f %f %f", host->RminCat, host->RmaxCat, host->DminCat, host->DmaxCat);
    8586    strextend (&command, "-statmode %s", STATMODE);
    8687    strextend (&command, "-minerror %f", MIN_ERROR);
    87     strextend (&command, "-nloop %d", NLOOP);
    88     strextend (&command, "-threads %d", NTHREADS);
     88
     89    strextend (&command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
     90    strextend (&command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);
     91
     92    strextend (&command, " -D RELASTRO_MIN_DISTANCE_MOD %f",     MIN_DISTANCE_MOD);
     93    strextend (&command, " -D RELASTRO_MAX_DISTANCE_MOD %f",     MAX_DISTANCE_MOD);
     94    strextend (&command, " -D RELASTRO_MAX_DISTANCE_MOD_ERR %f", MAX_DISTANCE_MOD_ERR);
     95
     96    strextend (&command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);
     97    strextend (&command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);
     98
     99    strextend (&command, "-D RELASTRO_DPOS_MAX %f", DPOS_MAX);
     100    strextend (&command, "-D ADDSTAR_RADIUS %f", ADDSTAR_RADIUS);
     101
     102    strextend (&command, "-D USE_ICRF_LOCAL %d",   USE_ICRF_LOCAL);
     103    strextend (&command, "-D USE_ICRF_SHFIT %d",   USE_ICRF_SHFIT);
     104    strextend (&command, "-D USE_ICRF_POLE %d",    USE_ICRF_POLE);
    89105
    90106    switch (FIT_TARGET) {
     
    108124    if (VERBOSE2)           strextend (&command, "-vv");
    109125    if (RESET)              strextend (&command, "-reset");
     126
     127    if (ImagSelect)         strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
     128    if (MaxDensityUse)      strextend (&command, "-max-density %f", MaxDensityValue);
     129    if (FlagOutlier)        strextend (&command, "-clip %d", CLIP_THRESH);
     130    if (ExcludeBogus)       strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
     131
     132    if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1");
     133    if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST);
     134    if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST);
     135    if (PhotFlagSelect)     strextend (&command, "+photflags");
     136    if (PhotFlagBad)        strextend (&command, "+photflagbad %d", PhotFlagBad);
     137    if (PhotFlagPoor)       strextend (&command, "+photflagpoor %d", PhotFlagPoor);
     138
     139    if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
     140      strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
     141    }
     142    if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) {
     143      strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
     144    }
     145
     146    if (TEST_SCALE != 1.0)   strextend (&command, "-testing %f", TEST_SCALE);
     147
     148    if (SKIP_PS1_CHIP)       strextend (&command, "-skip-ps1-chip");
     149    if (SKIP_PS1_STACK)      strextend (&command, "-skip-ps1-stack");
     150    if (SKIP_HSC)            strextend (&command, "-skip-hsc");
     151    if (SKIP_CFH)            strextend (&command, "-skip-cfh");
     152
     153    strextend (&command, "-nloop %d", NLOOP);
     154    strextend (&command, "-threads %d", NTHREADS);
     155   
     156    if (PHOTCODE_RESET_LIST) strextend (&command, "-reset-to-photcode %s", PHOTCODE_RESET_LIST);
     157
    110158    if (UPDATE)             strextend (&command, "-update");
    111159    if (PARALLEL)           strextend (&command, "-parallel");
    112160    if (PARALLEL_MANUAL)    strextend (&command, "-parallel-manual");
    113161    if (PARALLEL_SERIAL)    strextend (&command, "-parallel-serial");
    114     if (PHOTCODE_KEEP_LIST) strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST);
    115     if (PHOTCODE_SKIP_LIST) strextend (&command, "-photcode %s", PHOTCODE_SKIP_LIST);
    116     if (PHOTCODE_RESET_LIST) strextend (&command, "-reset-to-photcode %s", PHOTCODE_RESET_LIST);
    117 
    118     if (MaxDensityUse)      strextend (&command, "-max-density %f", MaxDensityValue);
    119     if (ImagSelect)         strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
    120     if (ExcludeBogus)       strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
    121 
    122     if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
    123       strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
    124     }
    125     if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) {
    126       strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
    127     }
    128 
    129     if (PhotFlagSelect)     strextend (&command, "+photflags");
    130     if (PhotFlagBad)        strextend (&command, "+photflagbad %d", PhotFlagBad);
    131     if (PhotFlagPoor)       strextend (&command, "+photflagpoor %d", PhotFlagPoor);
    132 
     162
     163    strextend (&command, "-chiporder %d", CHIPORDER);
    133164    if (CHIPMAP)            strextend (&command, "-chipmap %d", CHIPMAP);
    134165    if (RESET_IMAGES)       strextend (&command, "-reset-images");
     
    141172    if (LoopWeightGAIA)  {  strextend (&command, "-loop-weights-gaia %s", LoopWeightGAIAstr); }
    142173    if (APPLY_PROPER_MOTION) strextend (&command, "-apply-proper-motion");
    143 
    144     strextend (&command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);
    145     strextend (&command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
    146     strextend (&command, "-D RELASTRO_DPOS_MAX %f", DPOS_MAX);
    147     strextend (&command, "-D ADDSTAR_RADIUS %f", ADDSTAR_RADIUS);
    148 
    149     strextend (&command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);
    150 
    151     strextend (&command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);
    152     strextend (&command, "-D USE_ICRF_LOCAL %d",   USE_ICRF_LOCAL);
    153     strextend (&command, "-D USE_ICRF_SHFIT %d",   USE_ICRF_SHFIT);
    154     strextend (&command, "-D USE_ICRF_POLE %d",    USE_ICRF_POLE);
    155 
    156     if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1");
    157174
    158175    if (TimeSelect) {
  • branches/czw_branch/20160809/Ohana/src/relastro/src/load_catalogs.c

    r39731 r39765  
    178178    strextend (&command, "relastro_client -load-objects %s", table->hosts[i].results);
    179179    strextend (&command, " -hostID %d", table->hosts[i].hostID);
     180    strextend (&command, " -hostdir %s", table->hosts[i].pathname);
     181
    180182    strextend (&command, " -D CATDIR %s", CATDIR);
    181     strextend (&command, " -hostdir %s", table->hosts[i].pathname);
    182183    strextend (&command, " -region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    183184    strextend (&command, " -statmode %s", STATMODE);
    184185    strextend (&command, " -minerror %f", MIN_ERROR);
     186
    185187    strextend (&command, " -D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
     188    strextend (&command, " -D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);
     189
    186190    strextend (&command, " -D RELASTRO_MIN_DISTANCE_MOD %f",     MIN_DISTANCE_MOD);
    187191    strextend (&command, " -D RELASTRO_MAX_DISTANCE_MOD %f",     MAX_DISTANCE_MOD);
    188192    strextend (&command, " -D RELASTRO_MAX_DISTANCE_MOD_ERR %f", MAX_DISTANCE_MOD_ERR);
    189193
     194    strextend (&command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);
     195    strextend (&command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);
     196
    190197    if (FIT_MODE == FIT_PM_ONLY)         strextend (&command, "-pm");
    191198    if (FIT_MODE == FIT_PAR_ONLY)        strextend (&command, "-par");
    192199    if (FIT_MODE == FIT_PM_AND_PAR)      strextend (&command, "-pmpar");
    193200
    194     if (VERBOSE)       strextend (&command, "-v");
    195     if (VERBOSE2)      strextend (&command, "-vv");
    196     if (RESET)         strextend (&command, "-reset");
    197     if (ImagSelect)    strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
    198     if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue);
    199     if (FlagOutlier)   strextend (&command, "-clip %d", CLIP_THRESH);
    200     if (ExcludeBogus)  strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
    201 
    202     if (USE_ICRF_CORRECT) strextend (&command, "-D USE_ICRF_CORRECT %d", USE_ICRF_CORRECT);
    203     if (USE_GALAXY_MODEL) strextend (&command, "-D USE_GALAXY_MODEL %d", USE_GALAXY_MODEL);
    204    
    205     if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
    206       strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
    207     }
    208     if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) {
    209       strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
    210     }
    211 
    212     if (USE_ALL_IMAGES)      strextend (&command, "-use-all-images");
     201    if (VERBOSE)             strextend (&command, "-v");
     202    if (VERBOSE2)            strextend (&command, "-vv");
     203    if (RESET)               strextend (&command, "-reset");
     204                             
     205    if (ImagSelect)          strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
     206    if (MaxDensityUse)       strextend (&command, "-max-density %f", MaxDensityValue);
     207    if (FlagOutlier)         strextend (&command, "-clip %d", CLIP_THRESH);
     208    if (ExcludeBogus)        strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
     209
    213210    if (USE_FIXED_PIXCOORDS) strextend (&command, "-D USE_FIXED_PIXCOORDS 1");
    214211    if (PHOTCODE_KEEP_LIST)  strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST);
     
    218215    if (PhotFlagPoor)        strextend (&command, "+photflagpoor %d", PhotFlagPoor);
    219216
     217    if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
     218      strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
     219    }
     220    if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) {
     221      strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
     222    }
     223
    220224    if (SKIP_PS1_CHIP)       strextend (&command, "-skip-ps1-chip");
    221225    if (SKIP_PS1_STACK)      strextend (&command, "-skip-ps1-stack");
    222226    if (SKIP_HSC)            strextend (&command, "-skip-hsc");
    223227    if (SKIP_CFH)            strextend (&command, "-skip-cfh");
     228
     229    if (USE_ALL_IMAGES)      strextend (&command, "-use-all-images");
    224230
    225231    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
  • branches/czw_branch/20160809/Ohana/src/relastro/src/load_images.c

    r39474 r39765  
    6666  }
    6767
    68   initImages (subset, LineNumber, Nsubset);
     68  initImages (subset, LineNumber, Nsubset, !USE_ALL_IMAGES);
    6969  MARKTIME("  init images: %f sec\n", dtime);
    7070 
  • branches/czw_branch/20160809/Ohana/src/relastro/src/relastro_images.c

    r39747 r39765  
    1616  int finalPassMode = FIT_MODE; // start with the globally-defined fit mode
    1717  FIT_MODE = FIT_AVERAGE;
     18
     19  int RESET_ON_UPDATE = RESET; 
     20  RESET = TRUE; // we need to reset when we load the bright catalog subset
    1821
    1922  /* lock and load the image db table */
     
    164167  if (APPLY_OFFSETS) {
    165168    USE_IRLS = ALLOW_IRLS;  // now that we have fitted the images, choose the user's option
     169    RESET = RESET_ON_UPDATE;
    166170    UpdateObjectOffsets (skylist, 0, NULL);
    167171  }
  • branches/czw_branch/20160809/Ohana/src/relastro/src/relastro_objects.c

    r39457 r39765  
    159159    strextend (&command, "relastro_client -update-objects");
    160160    strextend (&command, "-hostID %d", table->hosts[i].hostID);
     161    strextend (&command, "-hostdir %s", table->hosts[i].pathname);
     162
    161163    strextend (&command, "-D CATDIR %s", CATDIR);
    162     strextend (&command, "-hostdir %s", table->hosts[i].pathname);
    163164    strextend (&command, "-region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    164165    strextend (&command, "-statmode %s", STATMODE);
     166    strextend (&command, "-minerror %f", MIN_ERROR);
     167
     168    strextend (&command, "-D RELASTRO_SIGMA_LIM %f", SIGMA_LIM);
     169    strextend (&command, "-D RELASTRO_SRC_MEAS_TOOFEW %d", SRC_MEAS_TOOFEW);
    165170
    166171    if (FIT_MODE == FIT_PM_ONLY)         { strextend (&command, "-pm"); }
     
    171176    if (VERBOSE2)      { strextend (&command, "-vv"); }
    172177    if (RESET)         { strextend (&command, "-reset"); }
    173     if (UPDATE)        { strextend (&command, "-update"); }
     178
    174179    if (ImagSelect)    { strextend (&command, "-instmag %f %f", ImagMin, ImagMax); }
    175180    if (MaxDensityUse) { strextend (&command, "-max-density %f", MaxDensityValue); }
    176181    if (FlagOutlier)   { strextend (&command, "-clip %d", CLIP_THRESH); }
    177 
    178     if (USE_ALL_IMAGES)      { strextend (&command, "-use-all-images"); }
     182    if (ExcludeBogus)    strextend (&command, "-exclude-bogus %f", ExcludeBogusRadius);
     183
    179184    if (USE_FIXED_PIXCOORDS) { strextend (&command, "-D USE_FIXED_PIXCOORDS 1"); }
    180185    if (PHOTCODE_KEEP_LIST)  { strextend (&command, "+photcode %s", PHOTCODE_KEEP_LIST); }
     
    185190    // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values
    186191
     192    if (DCR_BLUE_COLOR_POS && DCR_BLUE_COLOR_NEG) {
     193      strextend (&command, "-dcr-blue-color %s %s", DCR_BLUE_COLOR_POS, DCR_BLUE_COLOR_NEG);
     194    }
     195    if (DCR_RED_COLOR_POS && DCR_RED_COLOR_NEG) {
     196      strextend (&command, "-dcr-red-color %s %s", DCR_RED_COLOR_POS, DCR_RED_COLOR_NEG);
     197    }
     198
     199    if (UPDATE)        { strextend (&command, "-update"); }
     200    if (USE_ALL_IMAGES)      { strextend (&command, "-use-all-images"); }
     201
    187202    if (MinBadQF > 0.0)          strextend (&command, "-min-bad-psfqf %f", MinBadQF);
    188203    if (MaxMeanOffset != 10.0)   strextend (&command, "-max-mean-offset  %f", MaxMeanOffset);
  • branches/czw_branch/20160809/Ohana/src/relastro/src/relastro_parallel_images.c

    r39580 r39765  
    6161  initMosaics (image, Nimage);
    6262
    63   initImages (image, NULL, Nimage);
     63  initImages (image, NULL, Nimage, FALSE);
    6464
    6565  SkyTable *sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, TRUE, SKY_DEPTH, VERBOSE);
     
    103103
    104104  client_logger_message ("starting the loops: %s\n", myHostName);
     105
     106  RESET = TRUE; // we need to reset when we load the bright catalog subset
     107  FIT_MODE = FIT_AVERAGE; // we need to only fit the average
     108  USE_IRLS = FALSE;  // do not use IRLS yet -- leads to excessive outlier rejections in the loops
    105109
    106110  /* major modes */
Note: See TracChangeset for help on using the changeset viewer.