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/tbfiga.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/tbtables/tbfiga.x')
-rw-r--r-- | pkg/tbtables/tbfiga.x | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/pkg/tbtables/tbfiga.x b/pkg/tbtables/tbfiga.x new file mode 100644 index 00000000..cdcea1a5 --- /dev/null +++ b/pkg/tbtables/tbfiga.x @@ -0,0 +1,57 @@ +include "tbtables.h" + +# This file contains tbfiga and tbfisa for getting or setting the TDIM +# keyword in a FITS file. +# +# Phil Hodge, 6-Jul-1995 Subroutine created +# Phil Hodge, 5-Aug-1999 Use COL_NELEM instead of tbalen to get array length. + +# tbfiga -- get dimension of array and length of each axis + +procedure tbfiga (tp, cp, ndim, axlen, maxdim) + +pointer tp # i: pointer to table descriptor +pointer cp # i: pointer to column descriptor +int ndim # o: dimension of array +int axlen[maxdim] # o: length of each axis +int maxdim # i: size of axlen array +#-- +int status # zero is OK +errchk tbferr + +begin + if (!TB_IS_OPEN(tp)) { + ndim = 1 + axlen[1] = COL_NELEM(cp) + return + } + + status = 0 + + call fsgtdm (TB_FILE(tp), COL_NUMBER(cp), maxdim, ndim, axlen, status) + if (status != 0) + call tbferr (status) +end + +# tbfisa -- set dimension of array and length of each axis + +procedure tbfisa (tp, cp, ndim, axlen) + +pointer tp # i: pointer to table descriptor +pointer cp # i: pointer to column descriptor +int ndim # i: dimension of array +int axlen[ARB] # i: length of each axis +#-- +int status # zero is OK +errchk tbferr + +begin + if (!TB_IS_OPEN(tp)) + return + + status = 0 + + call fsptdm (TB_FILE(tp), COL_NUMBER(cp), ndim, axlen, status) + if (status != 0) + call tbferr (status) +end |