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

Conversion between FITSHeader and String #115

Open
aquatiko opened this issue May 22, 2019 · 3 comments
Open

Conversion between FITSHeader and String #115

aquatiko opened this issue May 22, 2019 · 3 comments

Comments

@aquatiko
Copy link
Member

aquatiko commented May 22, 2019

How can we convert a FITSHeader in a String format and vice-versa?
It would be great to modify a Header by making a WCSTransform object, making the changes and then saving that to original FITS file.
Using to_header from WCS.jl, we can get the header in string format but how can I write that to a FITSHeader?

@giordano
Copy link
Member

Rather than converting a FITSHeader to a String, I think it could be useful a function that constructs a WCSTransform from the relevant keys of a FITSHeader. This function would live in WCS.jl, which however doesn't currently depend on FITSIO.jl

@aquatiko
Copy link
Member Author

Do you mean, supplying specific fields present in WCS Header to a function along with a FITSHeader object?
I think that would be a easier workaround as we can use setproperty!() of WCS.jl and pass a symbol to set those fields to some empty initialised WCSTransform object.

@giordano
Copy link
Member

The FITSHeader looks like a dictionary, I was thinking to

  • look up the relevant WCS keys in FITSHeader
  • feed them into WCSTransform(...)

However, this is a high-level functionality that it's not even clear where it should live (see my message above), I think this is a very low-priority issue, even though an interesting one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants