aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/apextract/apinfo.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /noao/twodspec/apextract/apinfo.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/twodspec/apextract/apinfo.x')
-rw-r--r--noao/twodspec/apextract/apinfo.x96
1 files changed, 96 insertions, 0 deletions
diff --git a/noao/twodspec/apextract/apinfo.x b/noao/twodspec/apextract/apinfo.x
new file mode 100644
index 00000000..372860ae
--- /dev/null
+++ b/noao/twodspec/apextract/apinfo.x
@@ -0,0 +1,96 @@
+include "apertures.h"
+
+# AP_INFO -- Print information about an aperture.
+
+procedure ap_info (ap)
+
+pointer ap # Aperture pointer
+
+int n, ic_geti(), strlen()
+real ic_getr()
+pointer sp, str1, str2
+
+begin
+ call smark (sp)
+
+ if (AP_IC(ap) != NULL) {
+ call salloc (str1, SZ_LINE, TY_CHAR)
+ call salloc (str2, SZ_LINE, TY_CHAR)
+
+ n = 0
+ call ic_gstr (AP_IC(ap), "function", Memc[str1], SZ_LINE)
+ call sprintf (Memc[str2], SZ_LINE, "background: func=%s ord=%d")
+ call pargstr (Memc[str1])
+ call pargi (ic_geti (AP_IC(ap), "order"))
+ n = strlen (Memc[str2])
+ call printf ("%s")
+ call pargstr (Memc[str2])
+
+ call ic_gstr (AP_IC(ap), "sample", Memc[str1], SZ_LINE)
+ if (Memc[str1] != '*') {
+ call sprintf (Memc[str2], SZ_LINE, " sample=\"%s\"")
+ call pargstr (Memc[str1])
+ n = n + strlen (Memc[str2])
+ if (n > 80) {
+ call printf ("\n\t")
+ n = 8 + strlen (Memc[str2])
+ }
+ call printf ("%s")
+ call pargstr (Memc[str2])
+ }
+ if (ic_geti (AP_IC(ap), "naverage") != 1) {
+ call sprintf (Memc[str2], SZ_LINE, " nav=%d")
+ call pargi (ic_geti (AP_IC(ap), "naverage"))
+ n = n + strlen (Memc[str2])
+ if (n > 80) {
+ call printf ("\n\t")
+ n = 8 + strlen (Memc[str2])
+ }
+ call printf ("%s")
+ call pargstr (Memc[str2])
+ }
+ if (ic_geti (AP_IC(ap), "niterate") > 0) {
+ call sprintf (Memc[str2], SZ_LINE, " nit=%d")
+ call pargi (ic_geti (AP_IC(ap), "niterate"))
+ n = n + strlen (Memc[str2])
+ if (n > 80) {
+ call printf ("\n\t")
+ n = 8 + strlen (Memc[str2])
+ }
+ call printf ("%s")
+ call pargstr (Memc[str2])
+ call sprintf (Memc[str2], SZ_LINE, " low=%3.1f")
+ call pargr (ic_getr (AP_IC(ap), "low"))
+ n = n + strlen (Memc[str2])
+ if (n > 80) {
+ call printf ("\n\t")
+ n = 8 + strlen (Memc[str2])
+ }
+ call printf ("%s")
+ call pargstr (Memc[str2])
+ call sprintf (Memc[str2], SZ_LINE, " high=%3.1f")
+ call pargr (ic_getr (AP_IC(ap), "high"))
+ n = n + strlen (Memc[str2])
+ if (n > 80) {
+ call printf ("\n\t")
+ n = 8 + strlen (Memc[str2])
+ }
+ call printf ("%s")
+ call pargstr (Memc[str2])
+ if (ic_getr (AP_IC(ap), "grow") > 0) {
+ call sprintf (Memc[str2], SZ_LINE, " grow=%d")
+ call pargr (ic_getr (AP_IC(ap), "grow"))
+ n = n + strlen (Memc[str2])
+ if (n > 80) {
+ call printf ("\n\t")
+ n = 8 + strlen (Memc[str2])
+ }
+ call printf ("%s")
+ call pargstr (Memc[str2])
+ }
+ }
+ call printf ("\n")
+ }
+
+ call sfree (sp)
+end