Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to CFITSIO for table i/o using a re-usable cfitsio library #384

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

olebole
Copy link
Member

@olebole olebole commented Mar 16, 2024

This is an alternative to #379: it switches to cfitsio for tbtable, but installs cfitsio in vendor (where it was until 2.17.1). This has a few advantages:

  • cfitsio as a system dependent package is not part of pkg (general application packages),
  • cfitsio can be easily updated,
  • cfitsio may be used in other packages (st4gem, fitsutil), providing a single source.

This is also for discussion with @noirlab-iraf-admin resp. @mjfitzpatrick for clarification with NOIRLab IRAF. Original statement to switch to cfitsio in tbtable by @mjfitzpatrick in 5d4c168 :

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.

@olebole olebole changed the title Revert to CFITSIO for table i/o using a shareable cfitsio library Revert to CFITSIO for table i/o using a re-usable cfitsio library Mar 16, 2024
@olebole olebole marked this pull request as draft March 31, 2024 17:59
olebole and others added 4 commits September 10, 2024 12:49
This partially reverts commit d4b7ce0.
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.
@olebole olebole marked this pull request as ready for review October 10, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants