aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/fitsio/ftgi1b.f
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/tbtables/fitsio/ftgi1b.f
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'pkg/tbtables/fitsio/ftgi1b.f')
-rw-r--r--pkg/tbtables/fitsio/ftgi1b.f26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkg/tbtables/fitsio/ftgi1b.f b/pkg/tbtables/fitsio/ftgi1b.f
new file mode 100644
index 00000000..c0d1e587
--- /dev/null
+++ b/pkg/tbtables/fitsio/ftgi1b.f
@@ -0,0 +1,26 @@
+C----------------------------------------------------------------------
+ subroutine ftgi1b(ounit,nvals,incre,chbuff,status)
+
+C Read an array of Integer*1 bytes from the input FITS file.
+
+ integer nvals,incre,ounit,status,i,offset
+ character*1 chbuff(nvals)
+
+C ounit i fortran unit number
+C nvals i number of pixels in the i2vals array
+C incre i byte increment between values
+C chbuff c*1 array of input byte values
+C status i output error status
+
+ if (incre .le. 1)then
+ call ftgcbf(ounit,0,nvals,chbuff,status)
+ else
+C offset is the number of bytes to move between each value
+ offset=incre-1
+ call ftgcbf(ounit,0,1,chbuff,status)
+ do 10 i=2,nvals
+ call ftmoff(ounit,offset,.false.,status)
+ call ftgcbf(ounit,0,1,chbuff(i),status)
+10 continue
+ end if
+ end