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/twodspec/apextract/apshow.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/twodspec/apextract/apshow.x')
-rw-r--r-- | noao/twodspec/apextract/apshow.x | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/noao/twodspec/apextract/apshow.x b/noao/twodspec/apextract/apshow.x new file mode 100644 index 00000000..16f4d504 --- /dev/null +++ b/noao/twodspec/apextract/apshow.x @@ -0,0 +1,46 @@ +include "apertures.h" + +# AP_SHOW -- List the apertures to a text file. + +procedure ap_show (file, aps, naps) + +char file[ARB] # Aperture file +pointer aps[ARB] # Aperture pointers +int naps # Number of apertures + +pointer ap +int i, apaxis, fd, open() +errchk open + +begin + if (naps == 0) + return + + # Open the output file. Return if an error occurs. + fd = open (file, APPEND, TEXT_FILE) + + call fprintf (fd, "# APERTURES\n\n%4s %4s %7s %7s %7s %s\n") + call pargstr ("##ID") + call pargstr ("BEAM") + call pargstr ("CENTER") + call pargstr ("LOW") + call pargstr ("HIGH") + call pargstr ("TITLE") + for (i = 1; i <= naps; i = i + 1) { + ap = aps[i] + apaxis = AP_AXIS(ap) + call fprintf (fd, "%4d %4d %7.2f %7.2f %7.2f") + call pargi (AP_ID(ap)) + call pargi (AP_BEAM(ap)) + call pargr (AP_CEN(ap, apaxis)) + call pargr (AP_LOW(ap, apaxis)) + call pargr (AP_HIGH(ap, apaxis)) + if (AP_TITLE(ap) != NULL) { + call fprintf (fd, " %s") + call pargstr (Memc[AP_TITLE(ap)]) + } + call fprintf (fd, "\n") + } + + call close (fd) +end |