diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /noao/astutil/astradius.dat | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/astutil/astradius.dat')
-rw-r--r-- | noao/astutil/astradius.dat | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/noao/astutil/astradius.dat b/noao/astutil/astradius.dat new file mode 100644 index 00000000..62b9c6a5 --- /dev/null +++ b/noao/astutil/astradius.dat @@ -0,0 +1,27 @@ +# Print images which are within a given radius in the sky. + +# Get parameters. +racenter = clget ("astradius.racenter") +deccenter = clget ("astradius.deccenter") +epcenter = clget ("astradius.epcenter") +radius = clget ("astradius.radius") +ra = imget(clget("keywpars.ra")) +dec = imget(clget("keywpars.dec")) + +epoch = imget(clget("keywpars.epoch")) +if (str(epoch) == "" || real(epoch) == 0.) + date = imget(clget("keywpars.date_obs")) + ut = imget(clget("keywpars.ut")) + epoch = epoch (date, ut) +endif + +# Precess image coordinates to center epoch and compute separation. +radec = precess (ra, dec, epoch, epcenter) +ra1 = ra_precess (ra, dec, epoch, epcenter) +dec1 = dec_precess (ra, dec, epoch, epcenter) +sep = arcsep (racenter, deccenter, ra1, dec1) + +# Print result if within radius. +if (sep < real (radius)) + printf ("%-15s %s\n", $I, imget ("title")) +endif |