Changeset 25636
- Timestamp:
- Sep 28, 2009, 5:48:38 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/Ohana/src/opihi/dvo/skycoverage.c
r21153 r25636 16 16 Coords coords; 17 17 int typehash; 18 int PhotcodeSelect; 19 PhotCode *PhotcodeValue; 18 20 19 21 WITH_MOSAIC = FALSE; … … 43 45 remove_argument (N, &argc, argv); 44 46 ByName = TRUE; 47 } 48 49 PhotcodeValue = NULL; 50 PhotcodeSelect = FALSE; 51 if ((N = get_argument (argc, argv, "-photcode"))) { 52 if (!InitPhotcodes ()) return (FALSE); 53 PhotcodeSelect = TRUE; 54 remove_argument (N, &argc, argv); 55 PhotcodeValue = GetPhotcodebyName (argv[N]); 56 if (PhotcodeValue == NULL) { 57 gprint (GP_ERR, "photcode not found in photcode table\n"); 58 return (FALSE); 59 } 60 remove_argument (N, &argc, argv); 45 61 } 46 62 … … 85 101 86 102 if (argc != 4) { 87 gprint (GP_ERR, "USAGE: skycoverage (buffer) (pixscale) (Npts) [-time start range] [-name name]\n"); 103 gprint (GP_ERR, "USAGE: skycoverage (buffer) (pixscale) (Npts)\n"); 104 gprint (GP_ERR, " options: [-time start range] [-trange start stop] [-name name] [-photcode name] [+mosaic] [-mosaic] [-ra-center RA]\n"); 88 105 gprint (GP_ERR, " (buffer) saves bitmapped AIT plot\n"); 89 106 gprint (GP_ERR, " (pixscale) specifies the pixel size in degrees\n"); … … 128 145 for (xs = 0; xs < Nx; xs++) { 129 146 status = XY_to_RD (&r, &d, (double)(xs), (double)(ys), &coords); 130 status &= (r > 0);131 status &= (r < 360);147 status &= (r >= 0); 148 status &= (r <= 360); 132 149 if (status) { 133 150 V[ys*Nx + xs] = 2; … … 141 158 if (ByName && strcmp (name, image[i].name)) continue; 142 159 if (TimeSelect && ((image[i].tzero < tzero) || (image[i].tzero+image[i].trate*image[i].NY > tzero + trange))) continue; 160 161 if (PhotcodeSelect) { 162 if (PhotcodeValue[0].type == PHOT_DEP) { 163 if (PhotcodeValue[0].code != image[i].photcode) continue; 164 } else { 165 if (PhotcodeValue[0].code != GetPhotcodeEquivCodebyCode (image[i].photcode)) continue; 166 } 167 } 168 143 169 if (!FindMosaicForImage (image, Nimage, i)) continue; 144 170 … … 167 193 XY_to_RD (&r, &d, Xi, Yi, &image[i].coords); 168 194 r = ohana_normalize_angle (r); 195 if (r - RaCenter > +180.0) r -= 360.0; 196 if (r - RaCenter < -180.0) r += 360.0; 169 197 status = RD_to_XY (&Xs, &Ys, r, d, &coords); 170 198 if (Xs < 0) continue;
Note:
See TracChangeset
for help on using the changeset viewer.
