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

Integration with Plots.jl #90

Closed
giordano opened this issue Oct 30, 2017 · 6 comments
Closed

Integration with Plots.jl #90

giordano opened this issue Oct 30, 2017 · 6 comments

Comments

@giordano
Copy link
Member

Besides integration with Images.jl, it may be useful to have integration with Plots.jl. This can be achieved with plot recipes. I recently used them in Measurements.jl, they're pretty cool. If there are WCS coordinates, they could be automatically used as tics on the axes.

@mweastwood
Copy link
Member

Maybe worth waiting for glue modules? I think it would be unfortunate to have Plots.jl be a hard dependency of FITSIO.jl.

JuliaLang/julia#2025 (comment)

@giordano
Copy link
Member Author

giordano commented Oct 30, 2017

You don't have to require Plots.jl, just RecipesBase.jl, which is very lightweight, depends only on Julia.

Anyway I'm not going to implement this feature soon, this is just a proposal :-)

@mweastwood
Copy link
Member

Oh ok, that's much less of an onerous dependency.

@kbarbary
Copy link
Member

Sounds cool, but I think this sort of thing should go in a separate or different package. I think it is good organization to limit FITSIO.jl to (serialized FITS format on disk or in memory) <--> (arrays, tables and metadata), and have other packages depend on FITSIO for these transformations when needed. That is, it should go in a separate package for the same reason that it wouldn't go in HDF5.jl.

For plotting specifically: the FITS format happens to be able to encode array data and WCS transformations, but you might want to plot data with a WCS solution without ever serializing to FITS. Then it is pretty weird to have this functionality in FITSIO: it really only depends on arrays and WCS.jl.

In Python, plotting WCS coordinates can be done with wcsaxes which is pretty well separated from FITS I/O (and for a while, was its own separate package outside astropy).

But, a Julia package to enable plots with WCS coordinates would be awesome!

@giordano
Copy link
Member Author

giordano commented Nov 1, 2017

I think this sort of thing should go in a separate or different package

I agree. I just wanted to propose a new feature related to this package ;-)

the FITS format happens to be able to encode array data and WCS transformations, but you might want to plot data with a WCS solution without ever serializing to FITS.

You mean that one may want to do something like

plot(::Matrix, ::WCSTransform)

? This should be fairly easy to accomplish with a recipe like

@recipe function f(A::Matrix, wcs::WCSTransform)
...
end

Yesterday another plotting package joined the game: https://discourse.julialang.org/t/prerelease-makie-interactive-plotting/6811. The situation currently is very fluid with regard to plotting in Julia, but if MakiE.jl will ever take over Plots.jl there is the possibility that plot recipes for the current Plots.jl will still work in the future

@giordano
Copy link
Member Author

I've just created the package AstroImages.jl, which should provide integration of astronomical images with popular images and plotting packages. This is very basic, at the moment it provides only a FileIO.load method to read an extension from a FITS file and a new type, AstroImage, to convert the extension to Matrix{Gray}.

I'm going to close this issue in favor of JuliaAstro/AstroImages.jl#2

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

3 participants