diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/images/lib/rglltran.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/images/lib/rglltran.x')
-rw-r--r-- | pkg/images/lib/rglltran.x | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkg/images/lib/rglltran.x b/pkg/images/lib/rglltran.x new file mode 100644 index 00000000..890cec0b --- /dev/null +++ b/pkg/images/lib/rglltran.x @@ -0,0 +1,42 @@ +include <math.h> +include <pkg/skywcs.h> + +# RG_LLTRANSFORM -- Transform the reference image world coordinates to the +# input image world coordinate system. + +procedure rg_lltransform (cooref, cooin, rxlng, rylat, ixlng, iylat, npts) + +pointer cooref #I pointer to the reference image coordinate structure +pointer cooin #I pointer to the input image coordinate structure +double rxlng[ARB] #I the x refererence image world coordinates (degrees) +double rylat[ARB] #I the y refererence image world coordinates (degrees) +double ixlng[ARB] #O the x refererence image world coordinates (degrees) +double iylat[ARB] #O the y refererence image world coordinates (degrees) +int npts #I the number of coordinates + +int i +double ilng, ilat, olng, olat +int sk_stati() + +begin + if (sk_stati (cooref, S_PLNGAX) < sk_stati (cooref, S_PLATAX)) { + do i = 1, npts { + ilng = DEGTORAD (rxlng[i]) + ilat = DEGTORAD (rylat[i]) + call sk_lltran (cooref, cooin, ilng, ilat, INDEFD, + INDEFD, 0.0d0, 0.0d0, olng, olat) + ixlng[i] = RADTODEG (olng) + iylat[i] = RADTODEG (olat) + } + } else { + do i = 1, npts { + ilng = DEGTORAD (rylat[i]) + ilat = DEGTORAD (rxlng[i]) + call sk_lltran (cooref, cooin, ilng, ilat, INDEFD, + INDEFD, 0.0d0, 0.0d0, olng, olat) + ixlng[i] = RADTODEG (olat) + iylat[i] = RADTODEG (olng) + } + } +end + |