Changeset 19823
- Timestamp:
- Oct 2, 2008, 8:08:31 AM (18 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 43 edited
-
addstar/src/FilterStars.c (modified) (1 diff)
-
addstar/src/ReadImageHeader.c (modified) (1 diff)
-
addstar/src/grefstars.c (modified) (1 diff)
-
delstar/src/gimages.c (modified) (1 diff)
-
fixcat/src/aregion.c (modified) (1 diff)
-
gastro/src/gfit.c (modified) (1 diff)
-
gastro/src/gfitpoly.c (modified) (1 diff)
-
gastro/src/greference.c (modified) (1 diff)
-
gastro/src/gstars.c (modified) (1 diff)
-
gastro2/src/gstars2.c (modified) (1 diff)
-
gastro2/src/polyfit.c (modified) (1 diff)
-
getstar/src/ReadImageHeader.c (modified) (1 diff)
-
getstar/src/args.c (modified) (1 diff)
-
libdvo/src/coordops.c (modified) (2 diffs)
-
libdvo/src/skydb.c (modified) (1 diff)
-
libdvo/src/skyregion_ops.c (modified) (1 diff)
-
libohana/include/ohana.h (modified) (1 diff)
-
libohana/src/time.c (modified) (1 diff)
-
mosastro/src/LoadStars.c (modified) (1 diff)
-
mosastro/src/transforms.c (modified) (2 diffs)
-
opihi/cmd.astro/cplot.c (modified) (1 diff)
-
opihi/cmd.astro/czplot.c (modified) (1 diff)
-
opihi/cmd.astro/drizzle.c (modified) (1 diff)
-
opihi/cmd.astro/getvel.c (modified) (1 diff)
-
opihi/cmd.astro/polar.c (modified) (1 diff)
-
opihi/cmd.astro/rotcurve.c (modified) (1 diff)
-
opihi/dimm/telescope.c (modified) (1 diff)
-
opihi/dvo/ImageOps.c (modified) (1 diff)
-
opihi/dvo/aregion.c (modified) (1 diff)
-
opihi/dvo/catalog.c (modified) (3 diffs)
-
opihi/dvo/find_regions.c (modified) (1 diff)
-
opihi/dvo/gstar.c (modified) (1 diff)
-
opihi/dvo/images.c (modified) (2 diffs)
-
opihi/dvo/imbox.c (modified) (1 diff)
-
opihi/dvo/imdense.c (modified) (1 diff)
-
opihi/dvo/paverage.c (modified) (1 diff)
-
opihi/dvo/pmeasure.c (modified) (1 diff)
-
opihi/dvo/procks.c (modified) (2 diffs)
-
opihi/dvo/skycat.c (modified) (1 diff)
-
opihi/dvo/skycoverage.c (modified) (1 diff)
-
opihi/dvo/subpix.c (modified) (1 diff)
-
skycalc/src/moon_interference.c (modified) (1 diff)
-
uniphot/src/update.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/src/FilterStars.c
r16810 r19823 28 28 29 29 XY_to_RD (&stars[N].R, &stars[N].D, stars[N].X, stars[N].Y, &image[0].coords); 30 while (stars[N].R < 0.0) stars[N].R += 360.0; 31 while (stars[N].R >= 360.0) stars[N].R -= 360.0; 30 stars[N].R = ohana_normalize_angle (stars[N].R); 32 31 stars[N].found = -1; 33 32 stars[N].code = image[0].photcode; -
trunk/Ohana/src/addstar/src/ReadImageHeader.c
r19130 r19823 76 76 } else { 77 77 /* force image to lie in 0-360 range */ 78 while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0; 79 while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0; 78 image[0].coords.crval1 = ohana_normalize_angle (image[0].coords.crval1); 80 79 } 81 80 -
trunk/Ohana/src/addstar/src/grefstars.c
r17439 r19823 25 25 dparse (&stars[N].M, 3, line); 26 26 dparse (&stars[N].dM, 4, line); 27 while (stars[N].R < 0.0) stars[N].R += 360.0; 28 while (stars[N].R >= 360.0) stars[N].R -= 360.0; 27 stars[N].R = ohana_normalize_angle (stars[N].R); 29 28 stars[N].t = 0; 30 29 stars[N].code = photcode; -
trunk/Ohana/src/delstar/src/gimages.c
r19065 r19823 39 39 Shutdown ("ERROR: no astrometric solution in header"); 40 40 } 41 while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0;42 while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0;41 42 image[0].coords.crval1 = ohana_normalize_angle (image[0].coords.crval1); 43 43 44 44 /* CERROR in data file is in pixels, convert to 20*arcsec */ 45 45 image[0].cerror = tmp * 50.0 * image[0].coords.cdelt1 * 3600.0; 46 while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0;47 while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0;48 46 49 47 /* get other header info */ -
trunk/Ohana/src/fixcat/src/aregion.c
r4810 r19823 38 38 int i, NBigDec, NLINES, done, nregion; 39 39 40 while (ra < 0) { ra += 360.0; } 41 while (ra >= 360.0) { ra -= 360.0; } 40 ra = ohana_normalize_angle (ra); 42 41 43 42 if (dec >= 86.25) { -
trunk/Ohana/src/gastro/src/gfit.c
r16058 r19823 437 437 } 438 438 439 while (coords[0].crval1 < 0) coords[0].crval1 += 360.0; 440 while (coords[0].crval1 > 360.0) coords[0].crval1 -= 360.0; 439 coords[0].crval1 = ohana_normalize_angle (coords[0].crval1); 441 440 442 441 *DR = sqrt (SQ(dX*coords[0].cdelt1*3600.0) + SQ(dY*coords[0].cdelt1*3600.0)); -
trunk/Ohana/src/gastro/src/gfitpoly.c
r16058 r19823 288 288 } 289 289 290 while (coords[0].crval1 < 0) coords[0].crval1 += 360.0; 291 while (coords[0].crval1 > 360.0) coords[0].crval1 -= 360.0; 290 coords[0].crval1 = ohana_normalize_angle (coords[0].crval1); 292 291 293 292 { -
trunk/Ohana/src/gastro/src/greference.c
r8514 r19823 18 18 /* get stars from the USNO catalog for the given region */ 19 19 if (!strcmp (REFCAT, "USNO") || !strcmp (REFCAT, "BOTH")) { 20 while (catstats.RA[0] > 360.0) catstats.RA[0] -= 360.0; 21 while (catstats.RA[0] < 0.0) catstats.RA[0] += 360.0; 22 while (catstats.RA[1] > 360.0) catstats.RA[1] -= 360.0; 23 while (catstats.RA[1] < 0.0) catstats.RA[1] += 360.0; 20 catstats.RA[0] = ohana_normalize_angle (catstats.RA[0]); 21 catstats.RA[1] = ohana_normalize_angle (catstats.RA[1]); 24 22 25 23 /* if RA crosses 0,360 boundary, do 2 passes */ -
trunk/Ohana/src/gastro/src/gstars.c
r16040 r19823 142 142 coords[0].crval1 = (DEG_RAD * atan2 (T2, T1)) + PR; 143 143 coords[0].crval2 = (DEG_RAD * asin (T3)); 144 while (coords[0].crval1 < 0) coords[0].crval1 += 360.0; 145 while (coords[0].crval1 > 360.0) coords[0].crval1 -= 360.0; 144 coords[0].crval1 = ohana_normalize_angle (coords[0].crval1); 146 145 147 146 if (VERBOSE) fprintf (stderr, " after polar alignment: %9.4f %9.4f\n", coords[0].crval1, coords[0].crval2); -
trunk/Ohana/src/gastro2/src/gstars2.c
r15487 r19823 113 113 Target[0].coords.crval1 = (DEG_RAD * atan2 (T2, T1)) + PR; 114 114 Target[0].coords.crval2 = (DEG_RAD * asin (T3)); 115 while (Target[0].coords.crval1 < 0) Target[0].coords.crval1 += 360.0; 116 while (Target[0].coords.crval1 > 360.0) Target[0].coords.crval1 -= 360.0; 115 Target[0].coords.crval1 = ohana_normalize_angle (Target[0].coords.crval1); 117 116 118 117 if (VERBOSE) fprintf (stderr, " after polar alignment: %9.4f %9.4f\n", Target[0].coords.crval1, Target[0].coords.crval2); -
trunk/Ohana/src/gastro2/src/polyfit.c
r16058 r19823 375 375 } 376 376 377 while (coords[0].crval1 < 0) coords[0].crval1 += 360.0; 378 while (coords[0].crval1 > 360.0) coords[0].crval1 -= 360.0; 377 coords[0].crval1 = ohana_normalize_angle (coords[0].crval1); 379 378 380 379 /* test for valid solution */ -
trunk/Ohana/src/getstar/src/ReadImageHeader.c
r19065 r19823 58 58 } else { 59 59 /* force image to lie in 0-360 range */ 60 while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0; 61 while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0; 60 image[0].coords.crval1 = ohana_normalize_angle (image[0].coords.crval1); 62 61 } 63 62 -
trunk/Ohana/src/getstar/src/args.c
r15543 r19823 96 96 // XXX we will have issues at 0,360 boundary... 97 97 // see code in dvo/pmeasure for fixes 98 while (REGION.Rmin > 360) REGION.Rmin -= 360.0; 99 while (REGION.Rmin < 0) REGION.Rmin += 360.0; 100 while (REGION.Rmax > 360) REGION.Rmax -= 360.0; 101 while (REGION.Rmax < 0) REGION.Rmax += 360.0; 98 REGION.Rmin = ohana_normalize_angle (REGION.Rmin); 99 REGION.Rmax = ohana_normalize_angle (REGION.Rmax); 100 102 101 if (REGION.Dmax < REGION.Dmin) { 103 102 SWAP (REGION.Dmax, REGION.Dmin); -
trunk/Ohana/src/libdvo/src/coordops.c
r17419 r19823 134 134 *dec = DEG_RAD*delta; 135 135 136 /* rationalize ra range 0 - 360.0 */ 137 while (*ra < 0.0) *ra += 360.0; 138 while (*ra > 360.0) *ra -= 360.0; 136 *ra = ohana_normalize_angle (*ra); 139 137 140 138 return (TRUE); … … 168 166 *dec = delta + coords[0].crval2; 169 167 170 /* rationalize ra range 0 - 360.0 */ 171 while (*ra < 0.0) *ra += 360.0; 172 while (*ra > 360.0) *ra -= 360.0; 168 *ra = ohana_normalize_angle (*ra); 173 169 174 170 return (TRUE); -
trunk/Ohana/src/libdvo/src/skydb.c
r5241 r19823 99 99 SkyRegion *list, *new, *sub; 100 100 101 while (c1.r > 360.0) c1.r -= 360.0; 102 while (c1.r < 0.0) c1.r += 360.0; 103 while (c2.r > 360.0) c2.r -= 360.0; 104 while (c2.r < 0.0) c2.r += 360.0; 101 c1.r = ohana_normalize_angle (c1.r); 102 c2.r = ohana_normalize_angle (c2.r); 105 103 106 104 /* check on c1.r > c2.r : cross boundary */ -
trunk/Ohana/src/libdvo/src/skyregion_ops.c
r14401 r19823 206 206 SkyList *list, *extra; 207 207 208 /* rationalize Rmin, Rmax */ 209 while (Rmin < 0.0) Rmin += 360; 210 while (Rmin > 360.0) Rmin -= 360; 211 while (Rmax < 0.0) Rmax += 360; 212 while (Rmax > 360.0) Rmax -= 360; 208 Rmin = ohana_normalize_angle (Rmin); 209 Rmax = ohana_normalize_angle (Rmax); 213 210 214 211 /* handle 0,360 boundary requests */ -
trunk/Ohana/src/libohana/include/ohana.h
r16121 r19823 203 203 double ohana_lst PROTO((double jd, double longitude)); 204 204 int ohana_str_to_radec PROTO((double *ra, double *dec, char *str1, char *str2)); 205 double ohana_normalize_angle PROTO((double angle)); 205 206 206 207 int hstgsc_hms_to_deg PROTO((double *h0, double *h1, double *d0, double *d1, char *string)); -
trunk/Ohana/src/libohana/src/time.c
r14590 r19823 434 434 return (sid_g); 435 435 } 436 437 double ohana_normalize_angle (double angle) { 438 439 double result; 440 441 // take an input angle and force the domain to be 0.0 - 360.0 442 // there are a few ways to do this: 443 444 // option 1: This is a potentially very slow method, also subject to round off errors 445 # if (0) 446 while (angle > 360.0) angle -= 360.0; 447 while (angle < 0.0) angle += 360.0; 448 # endif 449 450 // option 2: take sin & cos, apply atan2 (y, x) 451 # if (1) 452 double x, y; 453 454 x = cos(angle*RAD_DEG); 455 y = sin(angle*RAD_DEG); 456 457 result = atan2 (y, x); 458 if (result < 0.0) result += 360.0; 459 # endif 460 461 # if (0) 462 // option 3: 463 int nCircle = angle / 360.0; 464 result -= 360.0*nCircle; 465 if (result < 0.0) result += 360.0; 466 # endif 467 468 return (result); 469 } -
trunk/Ohana/src/mosastro/src/LoadStars.c
r7080 r19823 33 33 continue; 34 34 } 35 while (chip[Nchip].coords.crval1 < 0) chip[Nchip].coords.crval1 += 360.0; 36 while (chip[Nchip].coords.crval1 > 360.0) chip[Nchip].coords.crval1 -= 360.0; 35 chip[Nchip].coords.crval1 = ohana_normalize_angle (chip[Nchip].coords.crval1); 37 36 38 37 itmp = 0; -
trunk/Ohana/src/mosastro/src/transforms.c
r3401 r19823 5 5 for (i = 0; i < Nstars; i++) { 6 6 XY_to_RD (&stars[i].R, &stars[i].D, stars[i].X, stars[i].Y, coords); 7 while (stars[i].R < 0.0) stars[i].R += 360.0; 8 while (stars[i].R >= 360.0) stars[i].R -= 360.0; 7 stars[i].R = ohana_normalize_angle (stars[i].R); 9 8 } 10 9 } … … 28 27 for (i = 0; i < Nstars; i++) { 29 28 XY_to_RD (&stars[i].R, &stars[i].D, stars[i].P, stars[i].Q, coords); 30 while (stars[i].R < 0.0) stars[i].R += 360.0; 31 while (stars[i].R >= 360.0) stars[i].R -= 360.0; 29 stars[i].R = ohana_normalize_angle (stars[i].R); 32 30 } 33 31 } -
trunk/Ohana/src/opihi/cmd.astro/cplot.c
r14066 r19823 41 41 Npts = 0; 42 42 for (i = 0; i < Xvec.Nelements; i++, r++, d++) { 43 *r = ohana_normalize_angle (*r); 43 44 while (*r < Rmin) *r += 360.0; 44 45 while (*r > Rmax) *r -= 360.0; -
trunk/Ohana/src/opihi/cmd.astro/czplot.c
r13479 r19823 49 49 for (i = 0; i < Zvec.Nelements; i++, in++, out++, r++, d++, x++, y++) { 50 50 *out = MIN (1.0, MAX (0.01, (*in - min) / range)); 51 while (*r < Rmin) *r += 360.0; 52 while (*r > Rmax) *r -= 360.0; 51 *r = ohana_normalize_angle (*r); 53 52 fRD_to_XY (x, y, *r, *d, &graphmode.coords); 54 53 } -
trunk/Ohana/src/opihi/cmd.astro/drizzle.c
r8427 r19823 221 221 *phi = DEG_RAD*atan2(y,x) + rot_phi; 222 222 223 while (*phi < 0.0) *phi += 360.0; 224 while (*phi > 360.0) *phi -= 360.0; 223 *phi = ohana_normalize_angle(*phi); 225 224 return (TRUE); 226 225 } -
trunk/Ohana/src/opihi/cmd.astro/getvel.c
r7917 r19823 43 43 dV *= 0.001; 44 44 45 while (L >= 360) {L -= 360.0;} 46 while (L < 0.0) {L += 360.0;} 45 L = ohana_normalize_angle (L); 47 46 gprint (GP_ERR, "L: %f\n", L); 48 47 -
trunk/Ohana/src/opihi/cmd.astro/polar.c
r7917 r19823 55 55 y = (j - Yo) * dN + No; 56 56 r = hypot(x, y); 57 t = DEG_RAD*atan2 (y, x); 58 while (t < 360.0) {t += 360.0;} 59 while (t > 360.0) {t -= 360.0;} 57 t = ohana_normalize_angle(DEG_RAD*atan2 (y, x)); 60 58 X = (t - Lo) / dL + xo; 61 59 Y = (r - Do) / dD + yo; -
trunk/Ohana/src/opihi/cmd.astro/rotcurve.c
r7917 r19823 70 70 gfits_scan (&out[0].header, "CRPIX2", "%lf", 1, &Yo); 71 71 72 while (L >= 360) {L -= 360.0;}73 while (L < 0.0) {L += 360.0;} 72 L = ohana_normalize_angle (L); 73 74 74 X = (L - Lo) / dL + Xo; 75 75 if ((X >= Nx) || (X < 0)) { -
trunk/Ohana/src/opihi/dimm/telescope.c
r7917 r19823 63 63 } 64 64 65 ra = atof (argv[2]);65 ra = ohana_normalize_angle(atof (argv[2])); 66 66 dec = atof (argv[3]); 67 while (ra < 360.0) ra += 360.0;68 while (ra > 360.0) ra -= 360.0;69 67 70 68 status = gotoRD (ra, dec); -
trunk/Ohana/src/opihi/dvo/ImageOps.c
r18375 r19823 65 65 if ((j == 0) && (r < Rmin)) flipped = TRUE; 66 66 if ((j == 0) && (r > Rmax)) flipped = TRUE; 67 r = ohana_normalize_angle (r); 67 68 while (flipped && (r < Rmid)) r+= 360.0; 68 69 while (flipped && (r > Rmid)) r-= 360.0; -
trunk/Ohana/src/opihi/dvo/aregion.c
r7917 r19823 9 9 int i, NBigDec, NLINES, done; 10 10 11 while (ra < 0) { ra += 360.0; } 12 while (ra >= 360.0) { ra -= 360.0; } 11 ra = ohana_normalize_angle (ra); 13 12 14 13 if (dec >= 86.25) { -
trunk/Ohana/src/opihi/dvo/catalog.c
r13479 r19823 344 344 if (LimExclude && (Zvec.elements[N] > 0.99)) continue; 345 345 if (Zvec.elements[N] < 0.011) continue; 346 catalog.average[i].R = ohana_normalize_angle (catalog.average[i].R); 346 347 while (catalog.average[i].R < Rmin) catalog.average[i].R += 360.0; 347 348 while (catalog.average[i].R > Rmax) catalog.average[i].R -= 360.0; … … 359 360 if (Zvec.elements[N] == 0.01) 360 361 continue; 362 catalog.average[i].R = ohana_normalize_angle (catalog.average[i].R); 361 363 while (catalog.average[i].R < Rmin) catalog.average[i].R += 360.0; 362 364 while (catalog.average[i].R > Rmax) catalog.average[i].R -= 360.0; … … 374 376 if (Zvec.elements[N] == 0.01) 375 377 continue; 378 catalog.average[i].R = ohana_normalize_angle (catalog.average[i].R); 376 379 while (catalog.average[i].R < Rmin) catalog.average[i].R += 360.0; 377 380 while (catalog.average[i].R > Rmax) catalog.average[i].R -= 360.0; -
trunk/Ohana/src/opihi/dvo/find_regions.c
r7917 r19823 27 27 nregion = 0; 28 28 29 while (Ra < 0) Ra += 360.0; 30 while (Ra >= 360) Ra -= 360.0; 29 Ra = ohana_normalize_angle (Ra); 31 30 32 31 minDec = Dec - radius; -
trunk/Ohana/src/opihi/dvo/gstar.c
r19534 r19823 75 75 Radius = atof (argv[3]); 76 76 77 while (Ra < 0.0) Ra += 360.0; 78 while (Ra > 360.0) Ra -= 360.0; 77 Ra = ohana_normalize_angle (Ra); 79 78 80 79 /* load sky from correct table */ -
trunk/Ohana/src/opihi/dvo/images.c
r15999 r19823 179 179 status = XY_to_RD (&r[j], &d[j], x[j], y[j], &image[i].coords); 180 180 if (!status) break; 181 r[j] = ohana_normalize_angle (r[j]); 181 182 while (r[j] < Rmin) { r[j] += 360.0; } 182 183 while (r[j] > Rmax) { r[j] -= 360.0; } … … 216 217 status = XY_to_RD (&r[j], &d[j], x[jp], y[jp], &image[i].coords); 217 218 if (!status) continue; 219 r[j] = ohana_normalize_angle (r[j]); 218 220 while (r[j] < Rmin) { r[j] += 360.0; } 219 221 while (r[j] > Rmax) { r[j] -= 360.0; } -
trunk/Ohana/src/opihi/dvo/imbox.c
r19130 r19823 70 70 for (j = 0; j < 4; j++) { 71 71 XY_to_RD (&r, &d, x[j], y[j], &coords); 72 r = ohana_normalize_angle (r); 72 73 while ((j == 0) && (r < Rmin)) { flipped = TRUE; r += 360.0; } 73 74 while ((j == 0) && (r > Rmax)) { flipped = TRUE; r -= 360.0; } -
trunk/Ohana/src/opihi/dvo/imdense.c
r13479 r19823 42 42 if (!FindMosaicForImage (image, Nimage, i)) continue; 43 43 XY_to_RD (&r, &d, x, y, &image[i].coords); 44 r = ohana_normalize_angle (r); 44 45 while (r < Rmin) r += 360.0; 45 46 while (r > Rmax) r -= 360.0; -
trunk/Ohana/src/opihi/dvo/paverage.c
r13479 r19823 117 117 for (i = 0; i < catalog.Naverage; i++) { 118 118 if (IDclip && (average[i].code != IDchoice)) continue; 119 average[i].R = ohana_normalize_angle (average[i].R); 119 120 while (average[i].R < Rmin) average[i].R += 360.0; 120 121 while (average[i].R > Rmax) average[i].R -= 360.0; -
trunk/Ohana/src/opihi/dvo/pmeasure.c
r16856 r19823 187 187 for (i = 0; i < catalog.Naverage; i++) { 188 188 if (IDclip && (catalog.average[i].code != IDchoice)) continue; 189 catalog.average[i].R = ohana_normalize_angle (catalog.average[i].R); 189 190 while (catalog.average[i].R < Rmin) catalog.average[i].R += 360.0; 190 191 while (catalog.average[i].R > Rmax) catalog.average[i].R -= 360.0; -
trunk/Ohana/src/opihi/dvo/procks.c
r13479 r19823 103 103 if (SpeedClip && ((rocks[i].Y[0] < S0) || (rocks[i].Y[0] > S1))) continue; 104 104 for (j = 0; j < 3; j++) { 105 rocks[i].ra[j]= ohana_normalize_angle (rocks[i].ra[j]); 105 106 while (rocks[i].ra[j] < Rmin) rocks[i].ra[j] += 360.0; 106 107 while (rocks[i].ra[j] > Rmax) rocks[i].ra[j] -= 360.0; … … 129 130 if (rocks[i].t[j] > t1) { N1 = j; t1 = rocks[i].t[j]; } 130 131 } 132 rocks[i].ra[N0]= ohana_normalize_angle (rocks[i].ra[N0]); 133 rocks[i].ra[N1]= ohana_normalize_angle (rocks[i].ra[N1]); 131 134 while (rocks[i].ra[N0] < Rmin) rocks[i].ra[N0] += 360.0; 132 135 while (rocks[i].ra[N0] > Rmax) rocks[i].ra[N0] -= 360.0; -
trunk/Ohana/src/opihi/dvo/skycat.c
r13479 r19823 110 110 int RD_to_XYpic (double *x, double *y, double r, double d, Coords *coords, double Rmin, double Rmax, double Rmid, int *leftside) { 111 111 112 while (r < Rmin) { r += 360.0; } 113 while (r > Rmax) { r -= 360.0; } 112 r = ohana_normalize_angle (r); 114 113 115 114 if (*leftside == -1) { -
trunk/Ohana/src/opihi/dvo/skycoverage.c
r14590 r19823 128 128 for (Xi = x[0] + 0.5*dPix; Xi < x[1]; Xi += dPix) { 129 129 XY_to_RD (&r, &d, Xi, Yi, &image[i].coords); 130 while (r < 0.0) { r += 360.0; } 131 while (r > 360.0) { r -= 360.0; } 130 r = ohana_normalize_angle (r); 132 131 status = RD_to_XY (&Xs, &Ys, r, d, &coords); 133 132 if (status) { -
trunk/Ohana/src/opihi/dvo/subpix.c
r16810 r19823 27 27 } 28 28 if (!ohana_str_to_radec (&Ra, &Dec, argv[1], argv[2])) return (FALSE); 29 if (Ra < 0) Ra += 360.0;30 if (Ra > 360.0) Ra -= 360.0; 29 Ra = ohana_normalize_angle (Ra); 30 31 31 Radius = atof (argv[3]); 32 32 -
trunk/Ohana/src/skycalc/src/moon_interference.c
r2496 r19823 771 771 772 772 *az *= DEG_IN_RADIAN; /* done with taking trig functions of it ... */ 773 while(*az < 0.) *az += 360.; /* force 0 -> 360 */ 774 while(*az >= 360.) *az -= 360.; 773 *az = ohana_normalize_angle (*az); 775 774 776 775 return(x); -
trunk/Ohana/src/uniphot/src/update.c
r15743 r19823 62 62 gfits_scan (&catalog.header, "DEC0", "%lf", 1, &Dmin); 63 63 gfits_scan (&catalog.header, "DEC1", "%lf", 1, &Dmax); 64 while (Rmin < 0.0) { Rmin += 360.0; } 65 while (Rmin > 360.0) { Rmin -= 360.0; } 66 while (Rmax < 0.0) { Rmax += 360.0; } 67 while (Rmax > 360.0) { Rmax -= 360.0; } 64 65 Rmin = ohana_normalize_angle (Rmin); 66 Rmax = ohana_normalize_angle (Rmax); 68 67 69 68 coords.crval1 = 0.5*(Rmin + Rmax);
Note:
See TracChangeset
for help on using the changeset viewer.
