Changeset 39735 for branches/czw_branch/20160809/Ohana
- Timestamp:
- Oct 6, 2016, 12:43:41 PM (10 years ago)
- Location:
- branches/czw_branch/20160809/Ohana/src/relastro
- Files:
-
- 5 edited
-
include/relastro.h (modified) (2 diffs)
-
src/GetAstromError.c (modified) (4 diffs)
-
src/UpdateObjects.c (modified) (5 diffs)
-
src/args.c (modified) (2 diffs)
-
src/launch_region_hosts.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20160809/Ohana/src/relastro/include/relastro.h
r39731 r39735 298 298 } CheckMeasureResult; 299 299 300 # define ID_MEAS_OBJECT_HAS_2MASS ID_MEAS_POOR_PHOTOM300 // # define ID_MEAS_OBJECT_HAS_2MASS ID_MEAS_POOR_PHOTOM 301 301 302 302 /* global variables set in parameter file */ … … 420 420 421 421 float *LoopWeight2MASS; 422 char *LoopWeight2MASSstr; 423 422 424 float *LoopWeightTycho; 423 char *LoopWeight2MASSstr;424 425 char *LoopWeightTychostr; 426 427 float *LoopWeightGAIA; 428 char *LoopWeightGAIAstr; 425 429 426 430 int ImagSelect; -
branches/czw_branch/20160809/Ohana/src/relastro/src/GetAstromError.c
r39457 r39735 69 69 // to match the 2MASS / Tycho / ICRS reference frame. As Nloop gets higher, the weight 70 70 // needs to drop to allow the ps1 measurements to drive the solution 71 int isGAIA = USE_GALAXY_MODEL && !isImage && (measure[0].photcode == 1030); 71 72 int is2MASS = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2011) && (measure[0].photcode <= 2013); 72 73 int isTycho = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2020) && (measure[0].photcode <= 2021); 74 75 int hasGAIA = USE_GALAXY_MODEL && isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_GAIA); 73 76 int has2MASS = USE_GALAXY_MODEL && isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_2MASS); 77 int hasTycho = USE_GALAXY_MODEL && isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_TYCHO); 74 78 75 79 // modest hack: if the object has 2MASS or Tycho, we set this internal bit and adjust the … … 79 83 dPtotal = dPtotal / LoopWeight2MASS[Nloop]; 80 84 } 85 if (hasGAIA && LoopWeightGAIA && (Nloop >= 0)) { 86 dPtotal = dPtotal / LoopWeightGAIA[Nloop]; 87 } 88 if (hasTycho && LoopWeightTycho && (Nloop >= 0)) { 89 dPtotal = dPtotal / LoopWeightTycho[Nloop]; 90 } 91 81 92 if (is2MASS && LoopWeight2MASS && (Nloop >= 0)) { 82 93 dPtotal = dPtotal / LoopWeight2MASS[Nloop]; 94 } 95 if (isGAIA && LoopWeightGAIA && (Nloop >= 0)) { 96 dPtotal = dPtotal / LoopWeightGAIA[Nloop]; 83 97 } 84 98 if (isTycho && LoopWeightTycho && (Nloop >= 0)) { … … 143 157 // to match the 2MASS / Tycho / ICRS reference frame. As Nloop gets higher, the weight 144 158 // needs to drop to allow the ps1 measurements to drive the solution 159 int isGAIA = USE_GALAXY_MODEL && !isImage && (measure[0].photcode == 1030); 145 160 int is2MASS = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2011) && (measure[0].photcode <= 2013); 146 161 int isTycho = USE_GALAXY_MODEL && !isImage && (measure[0].photcode >= 2020) && (measure[0].photcode <= 2021); 162 163 int hasGAIA = USE_GALAXY_MODEL && isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_GAIA); 147 164 int has2MASS = USE_GALAXY_MODEL && isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_2MASS); 165 int hasTycho = USE_GALAXY_MODEL && isImage && (measure[0].dbFlags & ID_MEAS_OBJECT_HAS_TYCHO); 148 166 149 167 // modest hack: if the object has 2MASS or Tycho, we set this internal bit and adjust the … … 153 171 dPtotal = dPtotal / LoopWeight2MASS[Nloop]; 154 172 } 173 if (hasGAIA && LoopWeightGAIA && (Nloop >= 0)) { 174 dPtotal = dPtotal / LoopWeightGAIA[Nloop]; 175 } 176 if (hasTycho && LoopWeightTycho && (Nloop >= 0)) { 177 dPtotal = dPtotal / LoopWeightTycho[Nloop]; 178 } 179 155 180 if (is2MASS && LoopWeight2MASS) { 156 181 dPtotal = dPtotal / LoopWeight2MASS[Nloop]; 182 } 183 if (isGAIA && LoopWeightGAIA && (Nloop >= 0)) { 184 dPtotal = dPtotal / LoopWeightGAIA[Nloop]; 157 185 } 158 186 if (isTycho && LoopWeightTycho) { -
branches/czw_branch/20160809/Ohana/src/relastro/src/UpdateObjects.c
r39731 r39735 11 11 12 12 typedef enum { 13 SELECT_MEAS_HAS_DATA = 1, 14 SELECT_MEAS_HAS_STACK = 2, 15 SELECT_MEAS_HAS_2MASS = 4, 13 SELECT_MEAS_HAS_DATA = 0x01, 14 SELECT_MEAS_HAS_STACK = 0x02, 15 SELECT_MEAS_HAS_2MASS = 0x04, 16 SELECT_MEAS_HAS_GAIA = 0x08, 17 SELECT_MEAS_HAS_TYCHO = 0x10, 16 18 } SelectMeasureStatus; 17 19 … … 666 668 667 669 int has2MASS = FALSE; 670 int hasGAIA = FALSE; 671 int hasTycho = FALSE; 668 672 int hasStack = FALSE; 669 673 if (stackEntry) *stackEntry = -1; … … 774 778 Npoints++; 775 779 776 if ((measure[k].photcode >= 2011) && (measure[k].photcode <= 2013)) {777 has2MASS = TRUE;778 }780 hasGAIA = (measure[k].photcode == 1030); 781 has2MASS = ((measure[k].photcode >= 2011) && (measure[k].photcode <= 2013)); 782 hasTycho = ((measure[k].photcode >= 2020) && (measure[k].photcode <= 2021)); 779 783 780 784 myAssert (Npoints <= fit->NpointsAlloc, "oops"); … … 796 800 measure[k].dbFlags &= ~ID_MEAS_OBJECT_HAS_2MASS; 797 801 } 802 if (hasGAIA) { 803 measure[k].dbFlags |= ID_MEAS_OBJECT_HAS_GAIA; 804 } else { 805 measure[k].dbFlags &= ~ID_MEAS_OBJECT_HAS_GAIA; 806 } 807 if (hasTycho) { 808 measure[k].dbFlags |= ID_MEAS_OBJECT_HAS_TYCHO; 809 } else { 810 measure[k].dbFlags &= ~ID_MEAS_OBJECT_HAS_TYCHO; 811 } 798 812 } 799 813 … … 803 817 if (hasStack) status |= SELECT_MEAS_HAS_STACK; 804 818 if (has2MASS) status |= SELECT_MEAS_HAS_2MASS; 819 if (hasGAIA) status |= SELECT_MEAS_HAS_GAIA; 820 if (hasTycho) status |= SELECT_MEAS_HAS_TYCHO; 805 821 return status; 806 822 } -
branches/czw_branch/20160809/Ohana/src/relastro/src/args.c
r39731 r39735 651 651 } 652 652 LoopWeightTycho = NULL; 653 LoopWeightTychostr = NULL; 653 654 if ((N = get_argument (argc, argv, "-loop-weights-tycho"))) { 654 655 remove_argument (N, &argc, argv); 655 656 LoopWeightTychostr = strcreate(argv[N]); 656 657 LoopWeightTycho = ParseLoopWeights (argv[N]); 658 remove_argument (N, &argc, argv); 659 } 660 LoopWeightGAIA = NULL; 661 LoopWeightGAIAstr = NULL; 662 if ((N = get_argument (argc, argv, "-loop-weights-gaia"))) { 663 remove_argument (N, &argc, argv); 664 LoopWeightGAIAstr = strcreate(argv[N]); 665 LoopWeightGAIA = ParseLoopWeights (argv[N]); 657 666 remove_argument (N, &argc, argv); 658 667 } … … 674 683 FREE (LoopWeight2MASSstr); 675 684 FREE (LoopWeightTychostr); 685 FREE (LoopWeightGAIAstr); 676 686 677 687 FREE (PHOTCODE_SKIP_LIST); -
branches/czw_branch/20160809/Ohana/src/relastro/src/launch_region_hosts.c
r39731 r39735 139 139 if (LoopWeight2MASS) { strextend (&command, "-loop-weights-2mass %s", LoopWeight2MASSstr); } 140 140 if (LoopWeightTycho) { strextend (&command, "-loop-weights-tycho %s", LoopWeightTychostr); } 141 if (LoopWeightGAIA) { strextend (&command, "-loop-weights-gaia %s", LoopWeightGAIAstr); } 141 142 if (APPLY_PROPER_MOTION) strextend (&command, "-apply-proper-motion"); 142 143
Note:
See TracChangeset
for help on using the changeset viewer.
