Changeset 38697
- Timestamp:
- Aug 31, 2015, 2:56:43 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150625/Ohana/src/relastro
- Files:
-
- 7 edited
-
include/relastro.h (modified) (2 diffs)
-
src/GetAstromError.c (modified) (3 diffs)
-
src/ImageOps.c (modified) (2 diffs)
-
src/UpdateChips.c (modified) (2 diffs)
-
src/UpdateObjects.c (modified) (1 diff)
-
src/relastro_images.c (modified) (1 diff)
-
src/relastro_parallel_images.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150625/Ohana/src/relastro/include/relastro.h
r38695 r38697 494 494 int UpdateObjects (Catalog *catalog, int Ncatalog, int Nloop); 495 495 int UpdateSimple (Catalog *catalog, int Ncatalog); 496 int UpdateChips (Catalog *catalog, int Ncatalog );496 int UpdateChips (Catalog *catalog, int Ncatalog, int Nloop); 497 497 int UpdateMosaic (Catalog *catalog, int Ncatalog); 498 498 int UpdateMeasures (Catalog *catalog, int Ncatalog); … … 727 727 FitStats *FitStatsInit (int Nmax, int Nboot); 728 728 int FitAstromResultSetPM (FitAstromResult *fit, int Nfit, Average *average); 729 void AstromErrorSetLoop (int N );729 void AstromErrorSetLoop (int Nloop, int isImageMode); -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/GetAstromError.c
r38675 r38697 7 7 8 8 static int Nloop = -1; 9 static int isImage = FALSE; 9 10 10 11 // Nloop is used to modify the per detection errors 11 void AstromErrorSetLoop (int N ) {12 void AstromErrorSetLoop (int N, int isImageMode) { 12 13 Nloop = N; 14 isImage = isImageMode; 13 15 } 14 16 … … 64 66 dPtotal = MAX (dPtotal, MIN_ERROR); 65 67 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) { 70 84 switch (Nloop) { 71 85 case 0: … … 85 99 } 86 100 } 87 if ( (measure[0].photcode >= 2020) && (measure[0].photcode <= 2021)) {101 if (modifyWeight && isTycho) { 88 102 switch (Nloop) { 89 103 case 0: -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/ImageOps.c
r38695 r38697 752 752 ref[i].D = catalog[c].average[n].D; 753 753 754 // if we are applying the galaxy model, move the reference position... 754 755 if (USE_GALAXY_MODEL) { 755 756 // apply proper-motion from average position to measure epoch: … … 774 775 ref[i].ColorBlue = NAN; 775 776 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 }780 777 781 778 if ((DCR_BLUE_NSEC_POS >= 0) && (DCR_BLUE_NSEC_NEG >= -1)) { -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/UpdateChips.c
r38664 r38697 29 29 // update astrometry of all chips relative to the average positions 30 30 // if NTHREADS is non-zero, call the threaded version of this function 31 int UpdateChips (Catalog *catalog, int Ncatalog ) {31 int UpdateChips (Catalog *catalog, int Ncatalog, int Nloop) { 32 32 33 33 off_t Nskip, Nmosaic, NnewFit, NoldFit; … … 39 39 double *Ro, *Do; 40 40 char *mode; 41 42 AstromErrorSetLoop (Nloop, TRUE); 41 43 42 44 if (NTHREADS) { -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/UpdateObjects.c
r38675 r38697 21 21 FitStats *fitStatsStack = FitStatsInit (NmeasureMax, N_BOOTSTRAP_SAMPLES); 22 22 23 AstromErrorSetLoop (Nloop );23 AstromErrorSetLoop (Nloop, FALSE); 24 24 25 25 int i; -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/relastro_images.c
r38695 r38697 73 73 if (RESET_IMAGES) UpdateMeasures (catalog, Ncatalog); 74 74 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.coords75 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 77 77 MARKTIME("update chips: %f sec\n", dtime); 78 78 } -
branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/relastro_parallel_images.c
r38688 r38697 120 120 } 121 121 for (i = 0; i < NLOOP; i++) { 122 UpdateObjects (catalog, Ncatalog, (i > 0));122 UpdateObjects (catalog, Ncatalog, i); 123 123 LOGRTIME("UpdateObjects loop %d on %s, host %d: %f sec\n", i, myHostName, REGION_HOST_ID, dtime); 124 124 … … 128 128 LOGRTIME("slurp_mean_pos loop %d on %s, host %d: %f sec\n", i, myHostName, REGION_HOST_ID, dtime); 129 129 130 UpdateChips (catalog, Ncatalog );130 UpdateChips (catalog, Ncatalog, i); 131 131 LOGRTIME("UpdateChips loop %d on %s, host %d: %f sec\n", i, myHostName, REGION_HOST_ID, dtime); 132 132
Note:
See TracChangeset
for help on using the changeset viewer.
