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
set FitsFactory.useHierarch to true #125
Conversation
This is not completely true ;) the settings can also be used on a per thread basis. that is almost compatible to per-call basis. This way the backward compatibility can be saved ;) |
Maybe @mbtaylor could comment on that. My primary interest to bring this up here is to keep Topcat fully usable with the standard |
Change the static setting that determines whether the nom.tam.fits libraries recognise the ESO HIERARCH convention for hierarchical FITS keywords (https://fits.gsfc.nasa.gov/registry/hierarch_keyword.html) from false (which is how it is configured by default) to true. This setting is required to make the hierarchical variant of the WideFits convention work (see uk.ac.starlink.fits.WideFits). There's no way in the nom.tam.fits API to configure HIERARCH-use on a per-call basis, so we have to modify the static setting. This will affect other nom.tam.fits-dependent code using this library. An alternative would be to set this only when the hierarch convention is potentially or actually in use, but that gets messier, since it would still affect other code running in the same JVM, but in less predictable ways. So following this change, STIL FITS handling will pick up HIERARCH per-table headers which it previously ignored.
the compatibility part is for @TomMcGlynn |
The original topcat/starjava codebase is using an old version of nom.tam.fits that does not have the per-thread setting for useHierarch, so I can't put that in the upstream code. I could do something similar by setting the useHierarch value in a synchronized block where it's needed and restoring it to its previous behaviour at the end of the block, but I haven't done that. The per-thread setting could in principle be used to address this in Ole's Debian version without changing the static default of that flag. However, you'd need to make sure the per-thread setting is set appropriately where required. TOPCAT uses lots of threads, including for things like loading FITS files, so you couldn't just do something like set it at the start of the application and assume that thread will be used for all subsequent access to FITS files. At a quick look, I only see the |
Sorry for the delay ... I was on a very long trip -> offline for a few Months ;-) |
I have incorporated the fixes from this pull request into an unofficial 1.1.5.3-AK2 release on my fork. Also, in case you have any further fixes, I'll plan to keep regularly integrating pull requests made to the base repo, at least until the base repo is actively mainained again. (I could no longer bear that so many good fixes were unheeded here...) |
@attipaci Whow: this sounds that this repo is back to life, right? This is very appreciated. Thank you so much for your activity! 💯 |
This is a forwarding followup of the short discussion in commit fd527d6 from @mbtaylor:
I looks that there is no real drawback when enabling this.