Changeset 40905
- Timestamp:
- Oct 3, 2019, 3:54:22 PM (7 years ago)
- Location:
- branches/eam_branches/ohana.20190329/src/opihi/cmd.astro
- Files:
-
- 2 edited
-
cdensify.c (modified) (2 diffs)
-
cdhistogram.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20190329/src/opihi/cmd.astro/cdensify.c
r39294 r40905 39 39 } 40 40 41 int binning = 1; 42 if ((N = get_argument (argc, argv, "-binning"))) { 43 remove_argument (N, &argc, argv); 44 binning = atoi(argv[N]); 45 remove_argument (N, &argc, argv); 46 } 47 41 48 int PSFTYPE = IS_DOT; 42 49 if ((N = get_argument (argc, argv, "-psf"))) { … … 80 87 Ymax = graphmode.ymax; 81 88 Ymin = graphmode.ymin; 82 dX = (Xmax - Xmin) / (Xpix - 1); 83 dY = (Ymax - Ymin) / (Ypix - 1); 89 90 // (dX, dY) are the pixel scale of the output image (output pixels / input pixels) 91 92 dX = binning * (Xmax - Xmin) / (Xpix - 1); 93 dY = binning * (Ymax - Ymin) / (Ypix - 1); 84 94 85 95 CHECKVAL(Xmin); -
branches/eam_branches/ohana.20190329/src/opihi/cmd.astro/cdhistogram.c
r39233 r40905 13 13 int kapa; 14 14 Graphdata graphmode; 15 16 int binning = 1; 17 if ((N = get_argument (argc, argv, "-binning"))) { 18 remove_argument (N, &argc, argv); 19 binning = atoi(argv[N]); 20 remove_argument (N, &argc, argv); 21 } 15 22 16 23 range = NULL; … … 79 86 Ymax = graphmode.ymax; 80 87 Ymin = graphmode.ymin; 81 dX = (Xmax - Xmin) / (Xpix - 1); 82 dY = (Ymax - Ymin) / (Ypix - 1); 88 89 // (dX, dY) are the pixel scale of the output image (output pixels / input pixels) 90 91 dX = binning * (Xmax - Xmin) / (Xpix - 1); 92 dY = binning * (Ymax - Ymin) / (Ypix - 1); 83 93 84 94 CHECKVAL(Xmin); … … 90 100 CHECKVAL(dY); 91 101 92 int Nx = (Xmax - Xmin) / dX+ 1;93 int Ny = (Ymax - Ymin) / dY+ 1;102 int Nx = abs((Xmax - Xmin) / dX) + 1; 103 int Ny = abs((Ymax - Ymin) / dY) + 1; 94 104 95 105 Coords newcoords = graphmode.coords;
Note:
See TracChangeset
for help on using the changeset viewer.
