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 /sys/mwcs/mwgwsampd.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/mwcs/mwgwsampd.x')
-rw-r--r-- | sys/mwcs/mwgwsampd.x | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sys/mwcs/mwgwsampd.x b/sys/mwcs/mwgwsampd.x new file mode 100644 index 00000000..8149d814 --- /dev/null +++ b/sys/mwcs/mwgwsampd.x @@ -0,0 +1,34 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <syserr.h> +include "mwcs.h" + +# MW_GWSAMPD -- Get the sampled WCS curve for an axis. + +procedure mw_gwsampd (mw, axis, pv, wv, npts) + +pointer mw #I pointer to MWCS descriptor +int axis #I axis which gets the wsamp vector +double pv[ARB] #O physical coordinates of points +double wv[ARB] #O world coordinates of points +int npts #I number of data point in curve + +pointer wp +errchk syserrs +string s_name "mw_gwsampd" + +begin + # Get the current WCS. + wp = MI_WCS(mw) + if (wp == NULL) + call syserrs (SYS_MWNOWCS, s_name) + + # Verify that there is a sampled curve for this WCS. + if (WCS_NPTS(wp,axis) <= 0 || WCS_PV(wp,axis) == NULL + || WCS_WV(wp,axis) == NULL) + call syserrs (SYS_MWNOWSAMP, s_name) + + # Copy out the curves. + call amovd (D(mw,WCS_PV(wp,axis)), pv, min(WCS_NPTS(wp,axis), npts)) + call amovd (D(mw,WCS_WV(wp,axis)), wv, min(WCS_NPTS(wp,axis), npts)) +end |