- Timestamp:
- May 2, 2018, 12:30:58 PM (8 years ago)
- Location:
- trunk/Ohana/src/relastro
- Files:
-
- 8 edited
-
Makefile (modified) (2 diffs)
-
include/relastro.h (modified) (1 diff)
-
src/UpdateChips.c (modified) (1 diff)
-
src/UpdateStacks.c (modified) (2 diffs)
-
src/args.c (modified) (2 diffs)
-
src/launch_region_hosts.c (modified) (1 diff)
-
src/relastro_images.c (modified) (2 diffs)
-
src/relastro_parallel_images.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relastro/Makefile
r40405 r40415 52 52 $(SRC)/UpdateChips.$(ARCH).o \ 53 53 $(SRC)/UpdateStacks.$(ARCH).o \ 54 $(SRC)/UpdateStacksWithFit.$(ARCH).o \55 54 $(SRC)/UpdateMosaic.$(ARCH).o \ 56 55 $(SRC)/UpdateObjects.$(ARCH).o \ … … 110 109 $(SRC)/relastroVisual.$(ARCH).o 111 110 112 #$(SRC)/write_coords.$(ARCH).o \ 111 #$(SRC)/write_coords.$(ARCH).o 112 #$(SRC)/UpdateStacksWithFit.$(ARCH).o 113 113 114 114 $(RELASTRO): $(INC)/relastro.h -
trunk/Ohana/src/relastro/include/relastro.h
r40414 r40415 368 368 369 369 int FIT_STACKS; 370 int IMSTATS_ONLY; 370 371 int REPAIR_STACKS; 371 372 int USE_IMAGE_COORDS_FOR_REPAIR; -
trunk/Ohana/src/relastro/src/UpdateChips.c
r39926 r40415 116 116 // note that Nraw & Nref must be equal: if not, we made a programming error in one of these two functions. 117 117 assert (Nraw == Nref); 118 119 if (IMSTATS_ONLY) { 120 int Nstat; 121 float dLsig, dMsig, dRsig; 122 GetScatterRawRef(&dLsig, &dMsig, &dRsig, &Nstat, raw, ref, Nraw, IMFIT_SYS_SIGMA_LIM); 123 124 // XXX: I need to convert dLsig, dMsig from degrees to pixels 125 dLsig *= 3600.0; 126 dMsig *= 3600.0; 127 128 image[i].dXpixSys = dLsig; 129 image[i].dYpixSys = dMsig; 130 image[i].nFitAstrom = Nstat; 131 continue; 132 } 118 133 119 134 // save these in case of failure -
trunk/Ohana/src/relastro/src/UpdateStacks.c
r39926 r40415 11 11 off_t Nskip = 0; 12 12 off_t Nmeas = 0; 13 off_t NnewFit = 0; 14 off_t NoldFit = 0; 13 15 14 16 // measure the scatter for each stack … … 43 45 assert (Nraw == Nref); 44 46 45 int Nstat; 46 float dLsig, dMsig, dRsig; 47 GetScatterRawRef(&dLsig, &dMsig, &dRsig, &Nstat, raw, ref, Nraw, IMFIT_SYS_SIGMA_LIM); 47 // the natural default for stacks is to NOT re-fit 48 if (FIT_STACKS == FALSE) { 49 int Nstat; 50 float dLsig, dMsig, dRsig; 51 GetScatterRawRef(&dLsig, &dMsig, &dRsig, &Nstat, raw, ref, Nraw, IMFIT_SYS_SIGMA_LIM); 48 52 49 // XXX: I need to convert dLsig, dMsig from degrees to pixels50 dLsig *= 3600.0;51 dMsig *= 3600.0;53 // XXX: I need to convert dLsig, dMsig from degrees to pixels 54 dLsig *= 3600.0; 55 dMsig *= 3600.0; 52 56 53 image[i].dXpixSys = dLsig; 54 image[i].dYpixSys = dMsig; 55 image[i].nFitAstrom = Nstat; 57 image[i].dXpixSys = dLsig; 58 image[i].dYpixSys = dMsig; 59 image[i].nFitAstrom = Nstat; 60 continue; 61 } 62 63 // save these in case of failure 64 Coords oldCoords; 65 SaveCoords (&oldCoords, &image[i].coords); 66 67 float dXpixSys = image[i].dXpixSys; 68 float dYpixSys = image[i].dYpixSys; 69 int nFitAstr = image[i].nFitAstrom; 70 71 // FitChip does iterative, clipped fitting 72 if (!FitChip (raw, ref, Nraw, &image[i])) { 73 if (VERBOSE) fprintf (stderr, "reject fit for image %s ("OFF_T_FMT") : Nstars: "OFF_T_FMT", Nused %d of %d\n", image[i].name, i, Nraw, image[i].nFitAstrom, image[i].nstar); 74 75 // restore status quo ante (replace truMap with tmpMap) 76 RestoreCoords (&image[i].coords, &oldCoords, &image[i]); 77 image[i].dXpixSys = dXpixSys; 78 image[i].dYpixSys = dYpixSys; 79 image[i].nFitAstrom = nFitAstr; 80 81 NoldFit ++; 82 free (raw); 83 free (ref); 84 continue; 85 } 86 87 AstromOffsetMapFree (oldCoords.offsetMap); 88 89 // Apply the modified coords back to the measure.R,D. Note that raw.R,D, ref.L,M, etc 90 // are all automatically updated in this block because they are re-generated from 91 // image.coords on each pass. 92 setImageRaw (catalog, Ncatalog, i, raw, Nraw, MODE_MOSAIC); 93 94 NnewFit ++; 95 free (raw); 96 free (ref); 56 97 } 57 98 -
trunk/Ohana/src/relastro/src/args.c
r40414 r40415 91 91 remove_argument (N, &argc, argv); 92 92 CATCH_UP = TRUE; 93 } 94 95 // only update the fit statistics (systematic floor) 96 IMSTATS_ONLY = FALSE; 97 if ((N = get_argument (argc, argv, "-imstats-only"))) { 98 remove_argument (N, &argc, argv); 99 IMSTATS_ONLY = FALSE; 93 100 } 94 101 … … 896 903 remove_argument (N, &argc, argv); 897 904 CHECK_MEASURE_TO_IMAGE = TRUE; 905 } 906 907 // only update the fit statistics (systematic floor) 908 IMSTATS_ONLY = FALSE; 909 if ((N = get_argument (argc, argv, "-imstats-only"))) { 910 remove_argument (N, &argc, argv); 911 IMSTATS_ONLY = FALSE; 898 912 } 899 913 -
trunk/Ohana/src/relastro/src/launch_region_hosts.c
r40414 r40415 155 155 156 156 if (FIT_STACKS) strextend (&command, "-fit-stacks"); 157 if (IMSTATS_ONLY) strextend (&command, "-imstats-only"); 157 158 158 159 strextend (&command, "-nloop %d", NLOOP); -
trunk/Ohana/src/relastro/src/relastro_images.c
r40414 r40415 87 87 } 88 88 89 if (FIT_STACKS) { 90 // model astrometry for stacks 91 UpdateStacksWithFit (catalog, Ncatalog); 92 } else { 93 // measure scatter for stacks 94 UpdateStacks (catalog, Ncatalog); 95 } 89 // measure scatter for stacks 90 UpdateStacks (catalog, Ncatalog); 96 91 MARKTIME("UpdateStacks: %f sec\n", dtime); 97 92 … … 108 103 case SET_STACKS: 109 104 // we just want to fit the selected stacks to the mean positions 110 if (FIT_STACKS) { 111 // model astrometry for stacks 112 UpdateStacksWithFit (catalog, Ncatalog); 113 } else { 114 // measure scatter for stacks 115 UpdateStacks (catalog, Ncatalog); 116 } 105 UpdateStacks (catalog, Ncatalog); 117 106 MARKTIME("update stacks : %f sec\n", dtime); 118 107 break; -
trunk/Ohana/src/relastro/src/relastro_parallel_images.c
r40414 r40415 150 150 } 151 151 152 if (FIT_STACKS) { 153 // model astrometry for stacks 154 UpdateStacksWithFit (catalog, Ncatalog); 155 } else { 156 // measure scatter for stacks 157 UpdateStacks (catalog, Ncatalog); 158 } 152 // measure astrometry or scatter [default] for stacks 153 UpdateStacks (catalog, Ncatalog); 159 154 LOGRTIME("UpdateStacks on %s, host %d: %f sec\n", myHostName, REGION_HOST_ID, dtime); 160 155 … … 167 162 share_mean_pos (catalog, Ncatalog, regionHosts, 0); 168 163 slurp_mean_pos (catalog, Ncatalog, regionHosts, 0); 169 if (FIT_STACKS) { 170 // model astrometry for stacks 171 UpdateStacksWithFit (catalog, Ncatalog); 172 } else { 173 // measure scatter for stacks 174 UpdateStacks (catalog, Ncatalog); 175 } 164 UpdateStacks (catalog, Ncatalog); 176 165 share_image_pos (regionHosts, 0); 177 166 slurp_image_pos (catalog, Ncatalog, regionHosts, 0);
Note:
See TracChangeset
for help on using the changeset viewer.
