- Timestamp:
- Apr 4, 2011, 11:07:41 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/Ohana/src/opihi/dvo/skycoverage.c
r29540 r31144 5 5 int skycoverage (int argc, char **argv) { 6 6 7 int WITH_MOSAIC, SOLO_MOSAIC ;7 int WITH_MOSAIC, SOLO_MOSAIC, ShowDensity; 8 8 off_t i, Nimage; 9 9 int N, status, TimeSelect, ByName, xs, ys; … … 60 60 } 61 61 62 ShowDensity = FALSE; 63 if ((N = get_argument (argc, argv, "-density"))) { 64 remove_argument (N, &argc, argv); 65 ShowDensity = TRUE; 66 } 67 62 68 ByName = FALSE; 63 69 if ((N = get_argument (argc, argv, "-name"))) { … … 141 147 if (argc != 3) { 142 148 gprint (GP_ERR, "USAGE: skycoverage (buffer) (Npts)\n"); 143 gprint (GP_ERR, " options: [-scale pixscale] [-center ra dec] [-size Nx Nx] [-proj projection] [-time start range] [-trange start stop] [-name name] [-photcode name] [+mosaic] [-mosaic] \n");149 gprint (GP_ERR, " options: [-scale pixscale] [-center ra dec] [-size Nx Nx] [-proj projection] [-time start range] [-trange start stop] [-name name] [-photcode name] [+mosaic] [-mosaic] [-density]\n"); 144 150 gprint (GP_ERR, " (buffer) saves bitmapped image\n"); 145 151 gprint (GP_ERR, " (Npts) gives the number of test points per image in each dimension\n"); … … 148 154 gprint (GP_ERR, " -size (Nx) (Ny) : specifies the size of the image [360/scale, 180/scale]\n"); 149 155 gprint (GP_ERR, " -proj (projection) : specifies the projection choice [AIT]\n"); 156 gprint (GP_ERR, " -density : create image with relative density (else binary on/off)\n"); 150 157 gprint (GP_ERR, " note: we need 64800 / (pixscale)^2 pixels to represent the sky\n"); 151 158 return (FALSE); … … 186 193 187 194 V = (float *)buf[0].matrix.buffer; 188 bzero (V, Nx*Ny*sizeof(float));189 195 190 196 for (ys = 0; ys < Ny; ys++) { … … 194 200 status &= (r <= 360); 195 201 if (status) { 196 V[ys*Nx + xs] = 2; 202 V[ys*Nx + xs] = ShowDensity ? 0 : 2; 203 } else { 204 V[ys*Nx + xs] = ShowDensity ? -1 : 0; 197 205 } 198 206 } … … 249 257 xs = (int)Xs; 250 258 ys = (int)Ys; 251 V[ys*Nx + xs] = 1; 259 if (ShowDensity) { 260 V[ys*Nx + xs] += 1; 261 } else { 262 V[ys*Nx + xs] = 1; 263 } 252 264 } 253 265 }
Note:
See TracChangeset
for help on using the changeset viewer.
