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 #379

Closed
wants to merge 4 commits into from

Conversation

olebole
Copy link
Member

@olebole olebole commented Mar 5, 2024

Taken from NOIRLABs IRAF, 5d4c168, author @mjfitzpatrick

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.

This PR however has a number of disadvantages: first the cfitsio version is quite old, so that many platforms are unsupported. Then, cfitsio is platform dependent and therefore should be part of the HSI and not part of an application package. And finally, cfitsio is used in other packages (st4gem, fitsutil), and it is probably not a good idea to have the same code (maybe in different versions) several times.

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
Copy link
Member Author

olebole commented Aug 28, 2024

As NOIRLab IRAF now moved cfitsio to a central place (vendor$) (see 226cf87), this one is outdated and will be closed.

Although there is an issue to discuss this (iraf-v218!12), they prefer not to answer there. Yet another communication highlight with NOIRLab.

😬

@olebole olebole closed this Aug 28, 2024
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.

None yet

2 participants