IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40246


Ignore:
Timestamp:
Dec 6, 2017, 5:55:50 AM (9 years ago)
Author:
eugene
Message:

enable -only-stacks-and-warps for relastro_parallel_regions

Location:
branches/eam_branches/ohana.20170822/src/relphot/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20170822/src/relphot/src/launch_region_hosts.c

    r39511 r40246  
    5858    strextend (&command, "-cloud-limit %f", CLOUD_TOLERANCE);
    5959
    60     if (VERBOSE)             strextend (&command, "-v");
    61     if (VERBOSE2)            strextend (&command, "-vv");
    62     if (RESET)               strextend (&command, "-reset");
    63     if (RESET_ZEROPTS)       strextend (&command, "-reset-zpts");
    64     if (!KEEP_UBERCAL)       strextend (&command, "-reset-ubercal");
    65     if (DophotSelect)        strextend (&command, "-dophot %d", DophotValue);
    66     if (ImagSelect)          strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
    67     if (MaxDensityUse)       strextend (&command, "-max-density %f", MaxDensityValue);
    68     if (SyntheticPhotometry) strextend (&command, "-synthphot");
    69     if (USE_BASIC_CHECK)     strextend (&command, "-basic-image-search");
     60    if (VERBOSE)                    strextend (&command, "-v");
     61    if (VERBOSE2)                   strextend (&command, "-vv");
     62    if (RESET)                      strextend (&command, "-reset");
     63    if (RESET_ZEROPTS)              strextend (&command, "-reset-zpts");
     64    if (!KEEP_UBERCAL)              strextend (&command, "-reset-ubercal");
     65    if (DophotSelect)               strextend (&command, "-dophot %d", DophotValue);
     66    if (ImagSelect)                 strextend (&command, "-instmag %f %f", ImagMin, ImagMax);
     67    if (MaxDensityUse)              strextend (&command, "-max-density %f", MaxDensityValue);
     68    if (SyntheticPhotometry)        strextend (&command, "-synthphot");
     69    if (USE_BASIC_CHECK)            strextend (&command, "-basic-image-search");
    7070
    71     if (UPDATE)              strextend (&command, "-update");
    72     if (MOSAIC_ZEROPT)       strextend (&command, "-mosaic");
    73     if (FREEZE_IMAGES)       strextend (&command, "-imfreeze");
    74     if (FREEZE_MOSAICS)      strextend (&command, "-mosfreeze");
    75     if (PARALLEL)            strextend (&command, "-parallel");
    76     if (PARALLEL_MANUAL)     strextend (&command, "-parallel-manual");
    77     if (PARALLEL_SERIAL)     strextend (&command, "-parallel-serial");
     71    if (UPDATE)                     strextend (&command, "-update");
     72    if (MOSAIC_ZEROPT)              strextend (&command, "-mosaic");
     73    if (FREEZE_IMAGES)              strextend (&command, "-imfreeze");
     74    if (FREEZE_MOSAICS)             strextend (&command, "-mosfreeze");
     75    if (CALIBRATE_STACKS_AND_WARPS) strextend (&command, "-only-stacks-and-warps");
     76
     77    if (PARALLEL)                   strextend (&command, "-parallel");
     78    if (PARALLEL_MANUAL)            strextend (&command, "-parallel-manual");
     79    if (PARALLEL_SERIAL)            strextend (&command, "-parallel-serial");
    7880
    7981    // XXX deprecate this if we are happy with the new version
  • branches/eam_branches/ohana.20170822/src/relphot/src/liststats.c

    r39648 r40246  
    194194# define WEIGHT_THRESHOLD 0.3
    195195
    196 int fit_least_squares (double *fit, double *y, double *dy, double *wgt, double *wt, int Npts);
     196int fit_least_squares (double *fit, double *err, double *y, double *dy, double *wgt, double *wt, int Npts);
    197197double VectorFractionInterpolate (double *values, float fraction, int Npts);
    198198double weight_cauchy (double x);
     
    253253   
    254254    double oldValue = value;
    255     if (!fit_least_squares (&value, dataset->flxlist, dataset->errlist, dataset->wgtlist, dataset->wtvals, Npoints)) {
     255    if (!fit_least_squares (&value, NULL, dataset->flxlist, dataset->errlist, dataset->wgtlist, dataset->wtvals, Npoints)) {
    256256      value = oldValue;
    257257      break;
     
    330330    }
    331331
    332     if (!fit_least_squares (&value, dataset->ysample, dataset->dysample, dataset->wtsample, NULL, Nkeep)) continue;
     332    if (!fit_least_squares (&value, NULL, dataset->ysample, dataset->dysample, dataset->wtsample, NULL, Nkeep)) continue;
    333333
    334334    dataset->bvalue[Nboot] = value;
     
    342342  stats->error = (Shi - Slo) / 2.0;
    343343
     344  // bootstrap can sometimes yield an excessively-optimistic result for the error.  Do not let
     345  // the reported error be smaller than the formal error
     346  double errvalue;
     347  if (fit_least_squares (&value, &errvalue, dataset->ykeep, dataset->dykeep, dataset->wtkeep, NULL, Nkeep)) {
     348    stats->error = MAX (stats->error, errvalue);
     349  }
     350
    344351  return TRUE;
    345352}
    346353
    347354// wgt is externally-supplied weight, wt is optional
    348 int fit_least_squares (double *fit, double *y, double *dy, double *wgt, double *wt, int Npts) {
     355int fit_least_squares (double *fit, double *err, double *y, double *dy, double *wgt, double *wt, int Npts) {
    349356
    350357  int i;
     
    364371  }
    365372  if (S0 == 0.0) return FALSE;
    366   *fit = S1 / S0;
     373  *fit = S1  / S0;
     374  if (err) { *err = 1.0 / S0; }
    367375  return TRUE;
    368376}
  • branches/eam_branches/ohana.20170822/src/relphot/src/relphot_images.c

    r40235 r40246  
    4242  MARKTIME("-- load images: %f sec\n", dtime);
    4343
    44   checkImages("load images");
     44  // checkImages("load images");
    4545
    4646  /* unlock, if we can (else, unlocked below) */
     
    4848
    4949  // load the flat correction table (if defined)
     50  // we no longer need to do this: the flatcorrection is now saved in measure.Mflat
    5051# if (0)
    5152  char flatcorrfile[256];
     
    6263    /* add in a loop over the catalogs calling dvo_catalog_chipcoords */
    6364
    64     checkImages("load catalog");
     65    // checkImages("load catalog");
    6566
    6667    /* match measurements with images, mosaics */
     
    8182
    8283    setExclusions (catalog, Ncatalog, TRUE);
    83     checkImages("set Exclu");
     84    // checkImages("set Exclu");
    8485
    8586    global_stats (catalog, Ncatalog, flatcorr, 0);
     
    114115      }
    115116      if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog);
    116       checkImages("start loop");
     117      // checkImages("start loop");
    117118
    118119      setMrel  (catalog, Ncatalog, flatcorr); // threaded
    119120      if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog);
    120       checkImages("set Mrel");
     121      // checkImages("set Mrel");
    121122
    122123      if (PLOTSTUFF) {
     
    124125      }
    125126      setMcal  (catalog, FALSE, flatcorr);
    126       checkImages("set Mcal");
     127      // checkImages("set Mcal");
    127128      if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog);
    128129
  • branches/eam_branches/ohana.20170822/src/relphot/src/relphot_parallel_images.c

    r39643 r40246  
    3636  client_logger_message ("loaded images\n");
    3737
    38   // once we have read this table, we should remove it for repeat runs
    39   // unlink (IMAGE_TABLE); // XXX a bit risky, add some protection?
    40 
    4138  makeMosaics (image, Nimage, TRUE);
    4239
     
    4441
    4542  // load the flat correction table (if defined)
     43  // we no longer need to do this: the flatcorrection is now saved in measure.Mflat
    4644# if (0)
    4745  char flatcorrfile[256];
     
    150148  client_logger_message ("all hosts are done the loops\n");
    151149
    152   /* set Mcal & Mmos for bad images */
    153   setMcal  (catalog, TRUE, flatcorr);
    154   setMmos  (catalog, TRUE, flatcorr);
     150  /* set Mcal & Mmos for bad images (for stack_and_warps, force images to be measured) */
     151  int onlyPoorImages = !CALIBRATE_STACKS_AND_WARPS;
     152  setMcal  (catalog, onlyPoorImages, flatcorr);
     153  setMmos  (catalog, onlyPoorImages, flatcorr);
    155154  MARKTIME("-- finalize Mcal values: %f sec\n", dtime);
    156155
  • branches/eam_branches/ohana.20170822/src/relphot/src/setMrelCatalog.c

    r40245 r40246  
    569569
    570570    float psfQFbest = 0.0;
     571    float SNbest = 0.0;
    571572
    572573    off_t stackBestMeasure = -1;
Note: See TracChangeset for help on using the changeset viewer.