Skip to content

Commit

Permalink
revert to CFITSIO for table i/o
Browse files Browse the repository at this point in the history
The libtbtables.a was changed in v2.16 to use SPP fitsio from earlier uses
of the fortran version under the assumption that they were equivalent.
However, there is a bug in the fortran version of ftdrow() when called
by the TDIFFER task in which the output table doesn't have its NAXIS2
value properly updated for FITS tables causing the task to exit.  The
cfitsio code acknowledges the value may not be correct and so uses an
internal data structure value for the 'nrows' rather than the keyword,
but equivalent functionality does not exist in the fortran version.  A
similar problem exists when inserting rows but this is not called from
any existing NTTOOLS tasks.

This change fixes a bug in the GEMINI.GSEEING task which is the only
task known to call TDIFFER.
  • Loading branch information
mjfitzpatrick authored and olebole committed Sep 10, 2024
1 parent 72de533 commit 5e5a21b
Show file tree
Hide file tree
Showing 2 changed files with 805 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pkg/tbtables/mkpkg
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ update:


libtbtables.a:
$set XFLAGS = "-Inolibc $(XFLAGS)"
$set XFLAGS = "-Inolibc -I$(iraf)include $(XFLAGS)"

tbagt.x <mach.h> <tbset.h> tbtables.h
tbapt.x <tbset.h> tbtables.h
Expand Down Expand Up @@ -235,7 +235,13 @@ libtbtables.a:
tbnparse.x <ctype.h> <ctotok.h> <tbset.h>
@selector

$echo "NOTE: SPP FITSIO will be used for FITS tables."
tbfhp_f.x <tbset.h> tbtables.h tblfits.h
@fitsio
$ifdef (SPPFITSIO)
$echo "NOTE: SPP FITSIO will be used for FITS tables."
tbfhp_f.x <tbset.h> tbtables.h tblfits.h
@fitsio
$else
$echo "NOTE: CFITSIO will be used for FITS tables."
tbfxff.c fitsio_spp.h underscore.h
tbfhp.x <tbset.h> tbtables.h tblfits.h
$endif
;
Loading

0 comments on commit 5e5a21b

Please sign in to comment.