IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30525


Ignore:
Timestamp:
Feb 8, 2011, 3:58:35 PM (15 years ago)
Author:
eugene
Message:

plug a leak; update objects after image calibrations are applied to measures

Location:
branches/eam_branches/ipp-20101205/Ohana/src/relastro
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/include/relastro.h

    r30524 r30525  
    302302void fixImageRaw (Catalog *catalog, int Ncatalog, off_t im);
    303303void FlagOutliers(Catalog *catalog);
    304 int MeasFilterTest(Measure *measure);
     304int MeasFilterTest(Measure *measure, int applySigmaLim);
    305305
    306306int sun_ecliptic (double jd, double *lambda, double *beta, double *epsilon);
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/src/ImageOps.c

    r30510 r30525  
    146146  free (clist);
    147147  free (mlist);
     148  free (Nlist);
     149  free (NLIST);
    148150}
    149151
     
    708710     
    709711      // skip measurements based on user selected criteria
    710       if (!MeasFilterTest(&catalog[0].measure[m])) continue;
     712      if (!MeasFilterTest(&catalog[0].measure[m], FALSE)) continue;
    711713      R[N] = catalog[0].measure[m].dR;
    712714      D[N] = catalog[0].measure[m].dD;
     
    734736
    735737      // skip measurements based on user selected criteria
    736       if (!MeasFilterTest(&catalog[0].measure[m])) continue;
     738      if (!MeasFilterTest(&catalog[0].measure[m], FALSE)) continue;
    737739     
    738740      x = catalog[0].measure[m].dR - statsR.median;
     
    805807     
    806808      // skip measurements based on user selected criteria
    807       if (!MeasFilterTest(&catalog[0].measure[m])) continue;
     809      if (!MeasFilterTest(&catalog[0].measure[m], FALSE)) continue;
    808810      R[N] = catalog[0].measure[m].dR;
    809811      D[N] = catalog[0].measure[m].dD;
     
    827829    for (k = 0; k < catalog[0].average[j].Nmeasure; k++, m++) {
    828830      //skip bad measurements
    829       if (!MeasFilterTest(&catalog[0].measure[m])) continue; 
     831      if (!MeasFilterTest(&catalog[0].measure[m], FALSE)) continue; 
    830832      x = catalog[0].measure[m].dR - statsR.median;
    831833      y = catalog[0].measure[m].dD - statsD.median;
     
    859861    for (k = 0; k < catalog[0].average[j].Nmeasure; k++, m++) {
    860862      //skip bad measurements
    861       if (!MeasFilterTest(&catalog[0].measure[m])) continue; 
     863      if (!MeasFilterTest(&catalog[0].measure[m], FALSE)) continue; 
    862864      x = catalog[0].measure[m].dR - statsR.median;
    863865      y = catalog[0].measure[m].dD - statsD.median;
     
    890892
    891893/** Determine whether a measurement should be included in the analysis, based on supplied filter criteria */
    892 int MeasFilterTest(Measure *measure) {
     894// we only optionally apply the sigma limit: for object averages, this should not be used (should it?)
     895int MeasFilterTest(Measure *measure, int applySigmaLim) {
    893896  int found, k;
    894897  long mask;
     
    936939
    937940  /* select measurements by measurement error */
    938   if ((SIGMA_LIM > 0) && (measure[0].dM > SIGMA_LIM)) {
     941  if (applySigmaLim && (SIGMA_LIM > 0) && (measure[0].dM > SIGMA_LIM)) {
    939942    return FALSE;
    940943  }
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/src/UpdateObjectOffsets.c

    r27581 r30525  
    4040    UpdateMeasures (&catalog, 1);
    4141
     42    UpdateObjects (&catalog, 1);
     43
    4244    freeImageBins (1);
    4345
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/src/UpdateObjects.c

    r30509 r30525  
    103103
    104104        //does the measurement pass the supplied filtering constraints?
    105         if (!MeasFilterTest(&catalog[i].measure[m])) {
     105        if (!MeasFilterTest(&catalog[i].measure[m], FALSE)) {
    106106          catalog[i].measure[m].dbFlags &= ~ID_MEAS_USED_OBJ;
    107107          continue;
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/src/args.c

    r30524 r30525  
    1313    remove_argument (N, &argc, argv);
    1414    FIT_TARGET = TARGET_OBJECTS;
    15 
    16     // check for object fitting modes (not valid for images)
    17     if ((N = get_argument (argc, argv, "-pm"))) {
    18         remove_argument (N, &argc, argv);
    19         FIT_MODE = FIT_PM_ONLY;
    20     }
    21     if ((N = get_argument (argc, argv, "-par"))) {
    22         remove_argument (N, &argc, argv);
    23         FIT_MODE = FIT_PAR_ONLY;
    24     }
    25     if ((N = get_argument (argc, argv, "-pmpar"))) {
    26         remove_argument (N, &argc, argv);
    27         FIT_MODE = FIT_PM_AND_PAR;
    28     }
    29   }
     15  }
     16
     17  // check for object fitting modes
     18  if ((N = get_argument (argc, argv, "-pm"))) {
     19    remove_argument (N, &argc, argv);
     20    FIT_MODE = FIT_PM_ONLY;
     21  }
     22  if ((N = get_argument (argc, argv, "-par"))) {
     23    remove_argument (N, &argc, argv);
     24    FIT_MODE = FIT_PAR_ONLY;
     25  }
     26  if ((N = get_argument (argc, argv, "-pmpar"))) {
     27    remove_argument (N, &argc, argv);
     28    FIT_MODE = FIT_PM_AND_PAR;
     29  }
     30
    3031  if ((N = get_argument (argc, argv, "-high-speed"))) {
    3132    // XXX include a parallax / no-parallax option
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/src/bcatalog.c

    r30478 r30525  
    4545      offset = catalog[0].average[i].measureOffset + j;
    4646     
    47       // filter objects based on user supplied criteria
    48       if (!MeasFilterTest(&catalog[0].measure[offset])) {
     47      // filter objects based on user supplied criteria, including SIGMA_LIM
     48      if (!MeasFilterTest(&catalog[0].measure[offset], TRUE)) {
    4949        catalog[0].measure[offset].dbFlags &= ~ID_MEAS_USED_CHIP;
    5050        continue;
  • branches/eam_branches/ipp-20101205/Ohana/src/relastro/src/relastroVisual.c

    r30523 r30525  
    451451  for(i = 0; i < Nmeasure; i++, m++) {
    452452    meas = catalog[0].measure[m];
    453     if (!MeasFilterTest(&meas)) continue;
     453    if (!MeasFilterTest(&meas, FALSE)) continue;
    454454    xmin = MIN(xmin, meas.dR);
    455455    xmax = MAX(xmax, meas.dR);
Note: See TracChangeset for help on using the changeset viewer.