iraf-community / iraf

IRAF - Image Reduction and Analysis Facility
https://iraf-community.github.io
Other
154 stars 53 forks source link

Revert to CFITSIO for table i/o #379

Closed olebole closed 2 months ago

olebole commented 8 months ago

Taken from NOIRLABs IRAF, 5d4c168b549bf2b41a2e7dfe0e5e2de86328b9ba, 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.

olebole commented 2 months ago

As NOIRLab IRAF now moved cfitsio to a central place (vendor$) (see 226cf879eca254cb5b0320a129e49b8c6822d455), 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.

:grimacing: