IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38701


Ignore:
Timestamp:
Sep 3, 2015, 6:19:19 AM (11 years ago)
Author:
eugene
Message:

cleanup the weighting rules to explicitly handle 2mass, tycho, and images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/GetAstromError.c

    r38697 r38701  
    6969  // to match the 2MASS / Tycho / ICRS reference frame.  As Nloop gets higher, the weight
    7070  // 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);
     71  int is2MASS  = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2011) && (measure[0].photcode <= 2013);
     72  int isTycho  = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2020) && (measure[0].photcode <= 2021);
     73  int has2MASS = USE_GALAXY_MODEL &&  isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_2MASS);
    7374
    7475  // serious hack: if the object has 2MASS, we set this internal bit and adjust the
    7576  // weight to ensure the image is tied down to the 2mass frame
    7677
    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) {
     78  if (has2MASS) {
    8479    switch (Nloop) {
    8580      case 0:
     81        dPtotal = dPtotal / 1000.0;
     82        break;
    8683      case 1:
     84        dPtotal = dPtotal / 300.0;
     85        break;
     86      case 2:
    8787        dPtotal = dPtotal / 100.0;
    8888        break;
    89       case 2:
    9089      case 3:
    9190        dPtotal = dPtotal / 30.0;
    9291        break;
    9392      case 4:
     93        dPtotal = dPtotal / 10.0;
     94        break;
    9495      case 5:
    9596        dPtotal = dPtotal / 10.0;
     
    99100    }
    100101  }
    101   if (modifyWeight && isTycho) {
     102  if (is2MASS) {
     103    switch (Nloop) {
     104      case 0:
     105        dPtotal = dPtotal / 1000.0;
     106        break;
     107      case 1:
     108        dPtotal = dPtotal / 300.0;
     109        break;
     110      case 2:
     111        dPtotal = dPtotal / 100.0;
     112        break;
     113      case 3:
     114        dPtotal = dPtotal / 30.0;
     115        break;
     116      case 4:
     117        dPtotal = dPtotal / 10.0;
     118        break;
     119      case 5:
     120        dPtotal = dPtotal / 10.0;
     121        break;
     122      default:
     123        break;
     124    }
     125  }
     126  if (isTycho) {
    102127    switch (Nloop) {
    103128      case 0:
Note: See TracChangeset for help on using the changeset viewer.