IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39287 for trunk


Ignore:
Timestamp:
Dec 17, 2015, 8:53:07 PM (11 years ago)
Author:
eugene
Message:

adding FitPosPMfixed_IRLS

Location:
trunk/Ohana/src/relastro/src
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relastro/src/FitPM.c

    r38986 r39287  
    1313
    1414  for (i = 0; i < Npoints; i++) {
     15    if (points[i].mask) continue; // respect the mask if set
     16    fit->Nfit ++;
     17
    1518    /* handle case where dX or dY = 0.0 */
    1619    wx = 1.0 / SQ(points[i].dX);
     
    6467  fit->dp  = 0.0;
    6568 
    66   fit->Nfit = Npoints;
    67 
    6869  return (TRUE);
    6970}
  • trunk/Ohana/src/relastro/src/ImageOps.c

    r39262 r39287  
    11951195}
    11961196
     1197# define SUPER_VERBOSE 0
     1198
    11971199/** Determine whether a measurement should be included in the analysis, based on supplied filter criteria */
    11981200// we only optionally apply the sigma limit: for object averages, this should not be used (should it?)
     
    12031205  float mag;
    12041206
    1205   if (!finite(measure[0].R) || !finite(measure[0].D)) return FALSE;
    1206   if (!finite(measure[0].M)) return FALSE; //XXX is this necessary for all relastro tasks?
    1207   if (!finite(measure[0].dM)) return FALSE; //XXX is this necessary for all relastro tasks?
     1207  if (!finite(measure[0].R) || !finite(measure[0].D)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 1\n"); return FALSE; };
     1208  if (!finite(measure[0].M)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 2\n"); return FALSE; }; //XXX is this necessary for all relastro tasks?
     1209  if (!finite(measure[0].dM)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 3\n"); return FALSE; }; //XXX is this necessary for all relastro tasks?
    12081210 
    12091211  /* select measurements by photcode, or equiv photcode, if specified */
     
    12141216      if (photcodesKeep[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE;
    12151217    }
    1216     if (!found) return FALSE;
     1218    if (!found) { if (SUPER_VERBOSE) fprintf (stderr, "filter 4\n"); return FALSE; };
    12171219  }
    12181220 
     
    12231225      if (photcodesSkip[k][0].code == GetPhotcodeEquivCodebyCode(measure[0].photcode)) found = TRUE;
    12241226    }
    1225     if (found) return FALSE;
     1227    if (found) { if (SUPER_VERBOSE) fprintf (stderr, "filter 5\n"); return FALSE; };
    12261228  } 
    12271229 
    12281230  if ((MinBadQF > 0.0) && isGPC1chip(measure[0].photcode)) {
    1229     if (!isfinite(measure[0].psfQF)) return FALSE;
    1230     if (measure[0].psfQF < MinBadQF) return FALSE;
     1231    if (!isfinite(measure[0].psfQF)) { if (SUPER_VERBOSE) fprintf (stderr, "filter 6\n"); return FALSE; };
     1232    if (measure[0].psfQF < MinBadQF) { if (SUPER_VERBOSE) fprintf (stderr, "filter 7\n"); return FALSE; };
    12311233  }
    12321234
    12331235  /* select measurements by time */
    12341236  if (TimeSelect) {
    1235     if (measure[0].t < TSTART) return FALSE;
    1236     if (measure[0].t > TSTOP) return FALSE;
     1237    if (measure[0].t < TSTART) { if (SUPER_VERBOSE) fprintf (stderr, "filter 8\n"); return FALSE; };
     1238    if (measure[0].t > TSTOP) { if (SUPER_VERBOSE) fprintf (stderr, "filter 9\n"); return FALSE; };
    12371239  }
    12381240 
     
    12431245    } else {
    12441246      code = GetPhotcodebyCode (measure[0].photcode);
    1245       if (!code) return FALSE;
     1247      if (!code) { if (SUPER_VERBOSE) fprintf (stderr, "filter 10\n"); return FALSE; };
    12461248      mask = code[0].astromBadMask;
    12471249    }
    1248     if (mask & measure[0].photFlags) return FALSE;
     1250    if (mask & measure[0].photFlags) { if (SUPER_VERBOSE) fprintf (stderr, "filter 11\n"); return FALSE; };
    12491251  }
    12501252
    12511253  /* select measurements by measurement error */
    12521254  if (applySigmaLim && (SIGMA_LIM > 0) && (measure[0].dM > SIGMA_LIM)) {
    1253     return FALSE;
     1255    { if (SUPER_VERBOSE) fprintf (stderr, "filter 12\n"); return FALSE; };
    12541256  }
    12551257 
     
    12571259  if (ImagSelect) {
    12581260    mag = PhotInst (measure, MAG_CLASS_PSF);
    1259     if (mag < ImagMin || mag > ImagMax) return FALSE;
     1261    if (mag < ImagMin || mag > ImagMax) { if (SUPER_VERBOSE) fprintf (stderr, "filter 13\n"); return FALSE; };
    12601262  }
    12611263 
  • trunk/Ohana/src/relastro/src/UpdateObjects.c

    r39246 r39287  
    211211
    212212    if (average[0].flags & ID_STAR_USE_PAR) {
     213      // get the best pm fit and chisq given the set of points (mask is respected)
    213214      if (!FitPM (&fitPM, fitStats->fitdataPM, fitStats->points, fitStats->Npoints)) {
    214215        myAbort ("oops");
  • trunk/Ohana/src/relastro/src/bcatalog.c

    r39225 r39287  
    6161  }
    6262
     63  int myNskip1 = 0, myNskip2 = 0, myNskip3 = 0, myNskip4 = 0, myNskip5 = 0, myNskip6 = 0;
     64
    6365  /* exclude stars not in range or with too few measurements */
    6466  for (i = 0; i < catalog[0].Naverage; i++) {
    6567    if (catalog[0].average[i].Nmeasure <= SRC_MEAS_TOOFEW) {
     68      myNskip1 ++;
    6669      continue;
    6770    }
     
    108111        REALLOCATE (subcatalog[0].secfilt, SecFilt, NAVERAGE*Nsecfilt);
    109112      }
     113      myNskip2 ++;
    110114      continue;
    111115    }
     
    146150          Nskip1 ++;
    147151        }
     152        myNskip3 ++;
    148153        continue;
    149154      }
     
    159164          Nskip2 ++;
    160165        }
     166        myNskip4 ++;
    161167        continue;
    162168      }
     
    180186            free (date);
    181187          }
     188          myNskip5 ++;
    182189          continue;
    183190        }
     
    220227    if (Nm <= SRC_MEAS_TOOFEW) {
    221228      Nmeasure -= Nm;
     229      myNskip6 ++;
    222230      continue;
    223231    }
     
    230238    }
    231239  }
     240  fprintf (stderr, "skips: %d %d %d %d %d %d\n", myNskip1, myNskip2, myNskip3, myNskip4, myNskip5, myNskip6);
    232241  REALLOCATE (subcatalog[0].average,  Average,     MAX (Naverage, 1));
    233242  REALLOCATE (subcatalog[0].measureT, MeasureTiny, MAX (Nmeasure, 1));
     
    244253    LimitDensityCatalog_ByNmeasureGrid (subcatalog, catalog);
    245254  } else {
    246     if (VERBOSE2) {
     255    if (VERBOSE) {
    247256      char *basename = filebasename (catalog[0].filename);
    248257      fprintf (stderr, "subset of "OFF_T_FMT" ("OFF_T_FMT" total) stars, "OFF_T_FMT" ("OFF_T_FMT" total) measures for catalog %s\n",
  • trunk/Ohana/src/relastro/src/fitpm.c

    r39248 r39287  
    1414# define N_STARS 3000
    1515# define N_POINTS 100
    16 # define N_OUTLIERS 100
     16# define N_OUTLIERS 5
    1717# define N_BOOTSTRAP 100
    1818
Note: See TracChangeset for help on using the changeset viewer.