IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38697


Ignore:
Timestamp:
Aug 31, 2015, 2:56:43 PM (11 years ago)
Author:
eugene
Message:

modify the weight for tycho and 2mass initially

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

Legend:

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

    r38695 r38697  
    494494int UpdateObjects (Catalog *catalog, int Ncatalog, int Nloop);
    495495int UpdateSimple (Catalog *catalog, int Ncatalog);
    496 int UpdateChips (Catalog *catalog, int Ncatalog);
     496int UpdateChips (Catalog *catalog, int Ncatalog, int Nloop);
    497497int UpdateMosaic (Catalog *catalog, int Ncatalog);
    498498int UpdateMeasures (Catalog *catalog, int Ncatalog);
     
    727727FitStats *FitStatsInit (int Nmax, int Nboot);
    728728int FitAstromResultSetPM (FitAstromResult *fit, int Nfit, Average *average);
    729 void AstromErrorSetLoop (int N);
     729void AstromErrorSetLoop (int Nloop, int isImageMode);
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/GetAstromError.c

    r38675 r38697  
    77
    88static int Nloop = -1;
     9static int isImage = FALSE;
    910
    1011// Nloop is used to modify the per detection errors
    11 void AstromErrorSetLoop (int N) {
     12void AstromErrorSetLoop (int N, int isImageMode) {
    1213  Nloop = N;
     14  isImage = isImageMode;
    1315}
    1416
     
    6466  dPtotal = MAX (dPtotal, MIN_ERROR);
    6567
    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)) {
     68  // early on, we want 2MASS and Tycho to have a very high weight.  This will force images
     69  // to match the 2MASS / Tycho / ICRS reference frame.  As Nloop gets higher, the weight
     70  // needs to drop to allow the ps1 measurements to drive the solution
     71  int is2MASS = (measure[0].photcode >= 2011) && (measure[0].photcode <= 2013);
     72  int isTycho = (measure[0].photcode >= 2020) && (measure[0].photcode <= 2021);
     73
     74  // serious hack: if the object has 2MASS, we set this internal bit and adjust the
     75  // weight to ensure the image is tied down to the 2mass frame
     76
     77  // we only adjust the weight if we are applying the galaxy model
     78  int modifyWeight = isImage && (measure[0].dbFlags & ID_MEAS_POOR_PHOTOM);
     79  modifyWeight |= is2MASS;
     80  modifyWeight |= isTycho;
     81  modifyWeight &= USE_GALAXY_MODEL;
     82
     83  if (modifyWeight && is2MASS) {
    7084    switch (Nloop) {
    7185      case 0:
     
    8599    }
    86100  }
    87   if ((measure[0].photcode >= 2020) && (measure[0].photcode <= 2021)) {
     101  if (modifyWeight && isTycho) {
    88102    switch (Nloop) {
    89103      case 0:
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/ImageOps.c

    r38695 r38697  
    752752    ref[i].D = catalog[c].average[n].D;
    753753   
     754    // if we are applying the galaxy model, move the reference position...
    754755    if (USE_GALAXY_MODEL) {
    755756      // apply proper-motion from average position to measure epoch:
     
    774775    ref[i].ColorBlue = NAN;
    775776    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     }
    780777
    781778    if ((DCR_BLUE_NSEC_POS >= 0) && (DCR_BLUE_NSEC_NEG >= -1)) {
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/UpdateChips.c

    r38664 r38697  
    2929// update astrometry of all chips relative to the average positions
    3030// if NTHREADS is non-zero, call the threaded version of this function
    31 int UpdateChips (Catalog *catalog, int Ncatalog) {
     31int UpdateChips (Catalog *catalog, int Ncatalog, int Nloop) {
    3232
    3333  off_t Nskip, Nmosaic, NnewFit, NoldFit;
     
    3939  double *Ro, *Do;
    4040  char *mode;
     41
     42  AstromErrorSetLoop (Nloop, TRUE);
    4143
    4244  if (NTHREADS) {
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/UpdateObjects.c

    r38675 r38697  
    2121  FitStats *fitStatsStack = FitStatsInit (NmeasureMax, N_BOOTSTRAP_SAMPLES);
    2222
    23   AstromErrorSetLoop (Nloop);
     23  AstromErrorSetLoop (Nloop, FALSE);
    2424
    2525  int i;
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/relastro_images.c

    r38695 r38697  
    7373      if (RESET_IMAGES) UpdateMeasures (catalog, Ncatalog);
    7474      for (i = 0; i < NLOOP; i++) {
    75         UpdateObjects (catalog, Ncatalog, (i > 0)); // calculate <R>,<D>; if (i > 0), apply Galaxy Motion Model (if desired)
    76         UpdateChips (catalog, Ncatalog);   // measure.X,Y -> R,D, fit image.coords
     75        UpdateObjects (catalog, Ncatalog, i); // calculate <R>,<D>; if (i > 0), apply Galaxy Motion Model (if desired)
     76        UpdateChips (catalog, Ncatalog, i);   // measure.X,Y -> R,D, fit image.coords
    7777        MARKTIME("update chips: %f sec\n", dtime);
    7878      }
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/relastro_parallel_images.c

    r38688 r38697  
    120120      }
    121121      for (i = 0; i < NLOOP; i++) {
    122         UpdateObjects (catalog, Ncatalog, (i > 0));
     122        UpdateObjects (catalog, Ncatalog, i);
    123123        LOGRTIME("UpdateObjects loop %d on %s, host %d: %f sec\n", i, myHostName, REGION_HOST_ID, dtime);
    124124
     
    128128        LOGRTIME("slurp_mean_pos loop %d on %s, host %d: %f sec\n", i, myHostName, REGION_HOST_ID, dtime);
    129129
    130         UpdateChips (catalog, Ncatalog);
     130        UpdateChips (catalog, Ncatalog, i);
    131131        LOGRTIME("UpdateChips loop %d on %s, host %d: %f sec\n", i, myHostName, REGION_HOST_ID, dtime);
    132132
Note: See TracChangeset for help on using the changeset viewer.