aboutsummaryrefslogtreecommitdiff
path: root/pkg/images/tv/tvmark/mkmag.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 /pkg/images/tv/tvmark/mkmag.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/images/tv/tvmark/mkmag.x')
-rw-r--r--pkg/images/tv/tvmark/mkmag.x20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/images/tv/tvmark/mkmag.x b/pkg/images/tv/tvmark/mkmag.x
new file mode 100644
index 00000000..956f50b4
--- /dev/null
+++ b/pkg/images/tv/tvmark/mkmag.x
@@ -0,0 +1,20 @@
+include <imhdr.h>
+
+# MK_MAG -- Procedure to compute the x and y magnification factors.
+
+procedure mk_mag (im, iw, xmag, ymag)
+
+pointer im # pointer to the frame buffer
+pointer iw # pointer to the wcs structure
+real xmag, ymag # x and y magnifications
+
+real xll, yll, xur, yur
+
+begin
+ # Compute the x and y magnification.
+ call iw_fb2im (iw, 1.0, 1.0, xll, yll)
+ call iw_fb2im (iw, real (IM_LEN(im,1)), real (IM_LEN(im,2)), xur, yur)
+
+ xmag = abs (xur - xll) / (IM_LEN(im,1) - 1)
+ ymag = abs (yur - yll) / (IM_LEN(im,2) - 1)
+end