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/tbtables/fitsio/ftgics.f | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/tbtables/fitsio/ftgics.f')
-rw-r--r-- | pkg/tbtables/fitsio/ftgics.f | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkg/tbtables/fitsio/ftgics.f b/pkg/tbtables/fitsio/ftgics.f new file mode 100644 index 00000000..fc41266e --- /dev/null +++ b/pkg/tbtables/fitsio/ftgics.f @@ -0,0 +1,47 @@ +C------------------------------------------------------------------------------ + subroutine ftgics(iunit,xrval,yrval,xrpix,yrpix,xinc,yinc,rot, + & type,status) + +C read the values of the celestial coordinate system keywords. +C These values may be used as input to the subroutines that +C calculate celestial coordinates. (FTXYPX, FTWLDP) + +C This routine assumes that the CHDU contains an image +C with the RA type coordinate running along the first axis +C and the DEC type coordinate running along the 2nd axis. + + double precision xrval,yrval,xrpix,yrpix,xinc,yinc,rot + integer iunit,status,tstat + character*(*) type + character comm*20,ctype*8 + + if (status .gt. 0)return + + call ftgkyd(iunit,'CRVAL1',xrval,comm,status) + call ftgkyd(iunit,'CRVAL2',yrval,comm,status) + + call ftgkyd(iunit,'CRPIX1',xrpix,comm,status) + call ftgkyd(iunit,'CRPIX2',yrpix,comm,status) + + call ftgkyd(iunit,'CDELT1',xinc,comm,status) + call ftgkyd(iunit,'CDELT2',yinc,comm,status) + + call ftgkys(iunit,'CTYPE1',ctype,comm,status) + + if (status .gt. 0)then + call ftpmsg('FTGICS could not find all the required'// + & 'celestial coordinate Keywords.') + status=505 + return + end if + + type=ctype(5:8) + + tstat=status + call ftgkyd(iunit,'CROTA2',rot,comm,status) + if (status .gt. 0)then +C CROTA2 is assumed to = 0 if keyword is not present + status=tstat + rot=0. + end if + end |