IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38675


Ignore:
Timestamp:
Aug 11, 2015, 9:00:49 AM (11 years ago)
Author:
eugene
Message:

trying to get 2mass correction right

Location:
branches/eam_branches/ipp-20150625/Ohana/src/relastro
Files:
4 edited

Legend:

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

    r38655 r38675  
    725725FitStats *FitStatsInit (int Nmax, int Nboot);
    726726int FitAstromResultSetPM (FitAstromResult *fit, int Nfit, Average *average);
     727void AstromErrorSetLoop (int N);
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/GetAstromError.c

    r38599 r38675  
    55static float BrightMo[] = {-15.6, -16.8, -17.0, -16.7, -16.0};
    66static float BrightMs[] = {1.3, 1.3, 1.3, 1.8, 2.0};
     7
     8static int Nloop = -1;
     9
     10// Nloop is used to modify the per detection errors
     11void AstromErrorSetLoop (int N) {
     12  Nloop = N;
     13}
    714
    815float GetAstromErrorTiny (MeasureTiny *measure, int mode) {
     
    5562    dPtotal = hypot(dPtotal, dPbright);
    5663  }
     64  dPtotal = MAX (dPtotal, MIN_ERROR);
    5765
    58   dPtotal = MAX (dPtotal, MIN_ERROR);
     66  // early on, we want 2MASS to have a very high weight.  This will force images to match
     67  // the 2MASS reference frame.  As Nloop gets higher, the weight needs to drop to allow
     68  // the ps1 measurements to drive the solution
     69  if ((measure[0].photcode >= 2011) && (measure[0].photcode <= 2013)) {
     70    switch (Nloop) {
     71      case 0:
     72      case 1:
     73        dPtotal = dPtotal / 100.0;
     74        break;
     75      case 2:
     76      case 3:
     77        dPtotal = dPtotal / 30.0;
     78        break;
     79      case 4:
     80      case 5:
     81        dPtotal = dPtotal / 10.0;
     82        break;
     83      default:
     84        break;
     85    }
     86  }
     87  if ((measure[0].photcode >= 2020) && (measure[0].photcode <= 2021)) {
     88    switch (Nloop) {
     89      case 0:
     90      case 1:
     91        dPtotal = dPtotal / 200.0;
     92        break;
     93      case 2:
     94      case 3:
     95        dPtotal = dPtotal / 100.0;
     96        break;
     97      case 4:
     98      case 5:
     99        dPtotal = dPtotal / 50.0;
     100        break;
     101      default:
     102        break;
     103    }
     104  }
     105
    59106  return (dPtotal);
    60107}
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/ImageOps.c

    r38605 r38675  
    774774    ref[i].ColorBlue = NAN;
    775775    ref[i].ColorRed = NAN;
     776
     777    if (USE_GALAXY_MODEL && (measure[0].dbFlags & ID_MEAS_POOR_PHOTOM)) {
     778      ref[0].dPos = ref[0].dPos / 100.0;
     779    }
    776780
    777781    if ((DCR_BLUE_NSEC_POS >= 0) && (DCR_BLUE_NSEC_NEG >= -1)) {
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/UpdateObjects.c

    r38655 r38675  
    2020  FitStats *fitStatsChips = FitStatsInit (NmeasureMax, N_BOOTSTRAP_SAMPLES);
    2121  FitStats *fitStatsStack = FitStatsInit (NmeasureMax, N_BOOTSTRAP_SAMPLES);
     22
     23  AstromErrorSetLoop (Nloop);
    2224
    2325  int i;
     
    464466  // I've already allocated fit->points (and fit->sample) with space for fit->NpointsAlloc entries
    465467
     468  int has2MASS = FALSE;
     469
    466470  int Npoints = fit->Npoints = 0;
    467471  FitAstromPoint *points = fit->points;
     
    555559    Npoints++;
    556560
     561    if ((measure[0].photcode >= 2011) && (measure[0].photcode <= 2013)) {
     562      has2MASS = TRUE;
     563    }
     564
    557565    myAssert (Npoints <= fit->NpointsAlloc, "oops");
    558566  } // loop over measurements : average[0].Nmeasure
     567
     568  // XXX flag measurements from stars with 2MASS
     569  for (k = 0; k < average[0].Nmeasure; k++) {
     570    // reset the bit to note that a detection was used (or not)
     571    if (has2MASS) {
     572      measure[k].dbFlags &= ~ID_MEAS_POOR_PHOTOM;
     573    } else {
     574      measure[k].dbFlags |=  ID_MEAS_POOR_PHOTOM;
     575    }
     576  }
    559577
    560578  fit->Npoints = Npoints;
Note: See TracChangeset for help on using the changeset viewer.