-
Notifications
You must be signed in to change notification settings - Fork 9
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
New Features and Improvements to AstroImages #30
Merged
Merged
Changes from 139 commits
Commits
Show all changes
181 commits
Select commit
Hold shift + click to select a range
1bf197c
Begin pulling in code for other image packages to support headers.
sefffal 9f80446
Add colormap support to `render`
sefffal ba8459d
Initial implementation of auto-updating the WCSTransform when headers…
sefffal 29df5c8
Fix plot recipes after struct changes
sefffal 34360e4
Added `percent` limit helper. Maybe this should go in PlotUtils?
sefffal b675ff3
Allow `percent` to work with `plot` as well as `imshow`
sefffal 056207e
Filling out abstract array interface
sefffal 73d4272
ds9 stretches and imshow edge cases
sefffal c332a39
Add default stretch option
sefffal b72b7b0
Add back additional file loading methods
sefffal 65d126e
Rename `imshow` to `imview`
sefffal 5972a7c
Improve documentation
sefffal f0d7b7f
Better support for `reproject`
sefffal 7ca7ea6
Performance fix for vector indexing
sefffal 2879636
Work around issue introduced for displaying subranges
sefffal b175aef
Fix for retrieving single elements from an image that happen to be mi…
sefffal 80f7484
Added docstrings
sefffal 747b748
Remove duplicate recipe
sefffal 0c3cf72
export load and save from FileIO
sefffal f86fcc7
Typo
sefffal 8d237d6
Move from accessing fields directly to getfield to allow future heade…
sefffal 18df410
Add missing WCS-relevant headers
sefffal 3ef9cd0
Temporary patches to other packages for smoother usage
sefffal ade4206
Verify cmap is valid before setting it as default
sefffal 5920089
WIP on plot recipes
sefffal b02cacc
Fix getindex for AstroImage of non numerical data
sefffal b4f0bc8
RGB images should also stay as AstroImages and share headers
sefffal 5d1453c
Forward wcs_stale in calls to similar
sefffal 4161bdd
WIP plot recipes
sefffal 72edafc
Allow compose to work with regular arrays in addition to AstroImages
sefffal 38887ad
Improvements to plot recipes
sefffal 65bf3ce
WIP wcs axes in plots
sefffal 9e9bd1a
Overhaul of WCS ticks
sefffal 07fdbe0
Refactor to create WCS Grid struct
sefffal 747af1a
edge cases 1
sefffal 4be5a04
corner cases 2
sefffal b8454c7
WCSGrid improvements
sefffal e48625c
Address more corner cases
sefffal 2d9d378
More corner cases
sefffal a7b00ae
Adaptively add more grid lines
sefffal 52b78b0
Add easy `plot(img, grid=true)` to show WCSGrid
sefffal bbaf300
Plot formatting improvements
sefffal 1d629c0
Organize exports
sefffal 0fa711b
Fixed plot recipes for images with unequal sized axes
sefffal ba8729d
Improved grid annotations
sefffal e7f478a
RIght align gridlabels
sefffal 21a5299
Add error hint for imview
sefffal 2209269
Organize code
sefffal e8eb678
Experiment on tracking axes
sefffal 3a4a061
Improving wcs grid calculation code
sefffal 42512f6
Merge branches 'master' and 'master' of https://github.com/sefffal/As…
sefffal 0fc7d9e
Prelim work on tracking indices and slices
sefffal 8096796
Fix copy & similar
sefffal fbb0d3d
WIP in adapting DimensionalData
sefffal b6a2164
Continued WIP migrating to DimensionalData
sefffal a1e3d54
Delete empty file
sefffal 4177b7b
Export some symbols from DimensionalData
sefffal 522ebd0
Store settings in RefValue not Ref (typestability)
sefffal f6f7a28
Prototype automatic display of complex images
sefffal 2d62d96
Fleshed out pix_to_world implementation
sefffal 2c7eeef
WIP adapting plot recipes
sefffal 3998477
WIP on world_to_pix
sefffal 32f0a12
WIP move to implot recipe
sefffal 43cc672
Fixes for WCS plotting with new DimensionalData approach
sefffal 886d1fd
Allow grid to adapt to fit enough ticks
sefffal a90b27b
Better handling of empty or all non-finite/missing images
sefffal 2a3f28c
Set title using refdims
sefffal c2a3826
Improved WCS header support
sefffal ddaaf06
Better handling of empty HDUs
sefffal 8ec98bb
Cleanup imports
sefffal 44441f2
Support for saving AstroImages, arrays, and tables to FITS.
sefffal 2476fad
Interactive cube manipulation
sefffal bc0be85
Fix cmap
sefffal 991a1c9
Detect additional WCS headers
sefffal 5740516
Auto display images with missing data
sefffal a4ca804
Remove interactive cube functionality
sefffal 75e3789
Reduce dependencies
sefffal 0936a47
Fix imview of complex images
sefffal 2973ba5
Support cmap=nothing again
sefffal 9c9db60
Begin work on docs
sefffal abeff6f
Restructure code layout for methods that extend other packages
sefffal 3472912
Colorbar support
sefffal 6f93c35
Keep AstroImage wrapper after FFT operations
sefffal 86e1c55
Improved plotting support with complex images to match imview
sefffal 6b33e54
Default to more ticks
sefffal 52f254e
default complex colorbar titles
sefffal f4c2934
Sorted out layouts for combinations of colorbar={true,false} and elty…
sefffal dbb93f1
Fixed logic for colorbar title
sefffal 41804d4
Allow grid to adapt to fill user's xlims and ylims
sefffal 30d464a
Disable equal aspectratios when...
sefffal 69f1325
Fix `percent` on matrices
sefffal 519b98b
Support for standalone labelled dims...
sefffal dd21ea2
Improved polquiver
sefffal 28eff9a
Tweaks to polquiver
sefffal 39da97a
Standardize dimensions during loading
sefffal ffe5f77
Add contrast & bias adjustments after stretch and clip
sefffal 36d9034
Fix coordinate offset from 1 based arrays
sefffal 257c9de
Change percent to a callable struct instead of a closure
sefffal 78f25c4
Ensure overplotting implot works as expected
sefffal 53d8e5e
Support arbitrary color gradients in addition to named colorschemes
sefffal df520f3
Automatically downscale images before plotting,but maintain correct c…
sefffal dfbb9f7
Support rendering cubes, vectors using imview. Useful for animations.
sefffal bc7c66f
Improved support for plotly
sefffal 918db4f
For empty HDUs return a zero dim array of missing.
sefffal 747fcc8
Removed WCS Axes concept in favour of tracking the order of dims insi…
sefffal 68eb2c7
remove wcsdims flag
sefffal 2efd538
Standardize variable names
sefffal 24713ac
Fix readme
sefffal b91c7ea
Update docs/Project.toml
sefffal 80603d3
Update src/wcs.jl
sefffal 0774e71
Update src/io.jl
sefffal 67d9edf
Update src/plot-recipes.jl
sefffal c396595
Merge branch 'master' of https://github.com/sefffal/AstroImages.jl
sefffal ee42cbf
!!! admonitions.
sefffal e90afa3
Clean up clampednormedview
sefffal c73adb2
Cleanup Zscale struct
sefffal 5c9d590
Typo
sefffal 4e57573
Add precompile and clean up exports
sefffal 95e2e34
Additional precompile directives
sefffal 6e94d7d
Begin adapting tests and fixing breakages
sefffal 2c51c02
Fixes for categorical (e.g. pol.) dimensions
sefffal 3972fd1
Allow turning grid off with `grid=false`
sefffal 574c51a
Fix precompile
sefffal a48b4c3
Support multiple wcs
sefffal 9ebb74c
Cleanup exports
sefffal a65be92
Fix ffts with non-default parameters
sefffal 3767528
Adjust project requirements
sefffal 6204824
Add explicit writefits function for use without FileIO
sefffal 3510ec9
Fallbacks for more FITS keywords encountered in the wild
sefffal fea17c7
Explicit aspect_ratio=1 for backends that do not have this as a defau…
sefffal 6aa1533
Add `recenter` function
sefffal 5628d29
Symbols aren't iterable
sefffal 9fbf3a4
Trust WCS naxis over length of dims for WCS computations
sefffal 66db70c
Use steps of dims for images.pixelspacing
sefffal e4d9f0f
Add compat for Interpolations.
sefffal c4fba11
Revert previous
sefffal ded071c
Bump version number and add author
sefffal 9500c95
Reproject holding back interpolations
sefffal f1a5a7a
Skip reproject dependency
sefffal c6aad34
Fix for empty HDU header access
sefffal 5e9caa1
one -> oneunit
sefffal 5442bfa
one -> oneunit
sefffal 4a4baba
Drop dep on ImageTransformations; swap ImageCore for ImageBase
sefffal 25a9077
Update src/ccd2rgb.jl
sefffal 1c92df9
Update src/AstroImages.jl
sefffal 43f751f
Add platescale option to implot
sefffal 6e8d890
Support rendering to an arbitrary colorant or named color.
sefffal e7e7d07
Add composecolors
sefffal 443bb3b
Merge branch 'master' of https://github.com/sefffal/AstroImages.jl
sefffal 25d0f59
For cmap=nothing, use a completely linear grayscale colormap instead …
sefffal e2ce839
Begin adding tests
sefffal 2d5fff2
Migrate to Github actions
sefffal a978932
Fix test dependencies
sefffal cb916f6
Attempt 2 to fix test dependencies
sefffal b161d0c
Resolve syntax error in Julia 1.6 by sticking to .& instead of .&&
sefffal 091e6a5
Stop exporting Between
sefffal 2647d7a
Improve CI & docs according to @giordano's suggestions
sefffal 7de1b7f
CI typo
sefffal 077c1df
Use DemoCards.jl for examples
sefffal 84efb96
Fix set_cmap!
sefffal a507739
cleanup
sefffal edc9357
docs WIP
sefffal d2431f5
Add keyword argument version of DimensionalData.rebuild
sefffal edba8f0
Docs WIP
sefffal bbcff54
Cleanup
sefffal a967da6
Update README
sefffal e9dfae0
Project.toml cleanup
sefffal 990c782
Drop `arraydata` in favour of Base.parent for consistency with Dimens…
sefffal 8d25e20
Need to keep UUIDs until registered with FileIO
sefffal e0fb31e
Turn on deploy
sefffal ac1771f
Drop accidental electron display dep
sefffal dd6e349
Turn on docs push_preview
sefffal 2d524f3
Silence printlng from runtests.jl
sefffal e2e2081
Add doc strings
sefffal d3ae34f
Docs WIP
sefffal 30b5938
WIP docs
sefffal e8359ec
First crack at a logo
sefffal b89f09d
Docs WIP
sefffal cc218a5
Docs WIP
sefffal e9a5d0a
Docs WIP
sefffal 383299f
Address review comments
sefffal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,7 @@ Manifest.toml | |
|
||
# test files | ||
/test/data | ||
|
||
|
||
# built docs | ||
/docs/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,39 @@ | ||
name = "AstroImages" | ||
uuid = "fe3fc30c-9b16-11e9-1c73-17dabf39f4ad" | ||
authors = ["Mosè Giordano", "Rohit Kumar"] | ||
version = "0.2.0" | ||
authors = ["Mosè Giordano", "Rohit Kumar", "William Thompson"] | ||
version = "0.3.0" | ||
|
||
[deps] | ||
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c" | ||
AstroAngles = "5c4adb95-c1fc-4c53-b4ea-2a94080c53d2" | ||
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4" | ||
DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0" | ||
FITSIO = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb" | ||
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" | ||
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1" | ||
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0" | ||
Interact = "c601a237-2ae4-5e1e-952c-7a85b0c7eef1" | ||
ImageAxes = "2803e5a7-5153-5ecf-9a86-9b4c37f5f5ac" | ||
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534" | ||
ImageMetadata = "bc367c6b-8a6b-528e-b4bd-a4b897500b49" | ||
ImageShow = "4e3cecfd-b093-5904-9786-8bbb286a6a31" | ||
ImageTransformations = "02fcd773-0e25-5acc-982a-7f6622650795" | ||
MappedArrays = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" | ||
PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043" | ||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" | ||
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" | ||
Reproject = "d1dcc2e6-806e-11e9-2897-3f99785db2ae" | ||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" | ||
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" | ||
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" | ||
WCS = "15f3aee2-9e10-537f-b834-a6fb8bdb944d" | ||
MappedArrays = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" | ||
|
||
[compat] | ||
julia = "^1.0.0" | ||
Reproject = "^0.3.0" | ||
DimensionalData = "^0.20" | ||
julia = "^1.6.0" | ||
|
||
[extras] | ||
JLD = "4138dd39-2aa7-5051-a626-17a0bb65d9c8" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
Widgets = "cc8bc4a8-27d6-5769-a93b-9d913e69aa62" | ||
JLD = "4138dd39-2aa7-5051-a626-17a0bb65d9c8" | ||
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" | ||
|
||
[targets] | ||
test = ["Test", "Random", "Widgets", "JLD", "SHA"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
|
||
[compat] | ||
Documenter = "0.27" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Documenter, AstroImages | ||
makedocs( | ||
sitename="AstroImages.jl", | ||
pages = [ | ||
"Home" => "index.md", | ||
"Tour" => "tour.md", | ||
"Tutorials" => [ | ||
"Getting Started" => "getting-started.md" | ||
], | ||
"API" => "api.md", | ||
], | ||
format = Documenter.HTML( | ||
prettyurls = get(ENV, "CI", nothing) == "true" | ||
), | ||
workdir=".." | ||
) | ||
|
||
|
||
# deploydocs( | ||
# repo = "github.com/sefffal/AstroImages.jl.git", | ||
# devbranch = "main" | ||
# ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# API Documentation | ||
|
||
|
||
```@docs | ||
load | ||
save | ||
AstroImage | ||
AstroImageVec | ||
AstroImageMat | ||
arraydata | ||
header | ||
Comment | ||
History | ||
wcs | ||
pix_to_world | ||
pix_to_world! | ||
world_to_pix | ||
world!_to_pix | ||
X | ||
Y | ||
Z | ||
Dim | ||
At | ||
Near | ||
Between | ||
.. | ||
dims | ||
refdims | ||
clampednormedview | ||
WCSGrid | ||
ccd2rgb | ||
composechannels | ||
reset! | ||
zscale | ||
percent | ||
logstretch | ||
powstretch | ||
sqrtstretch | ||
squarestretch | ||
asinhstretch | ||
sinhstretch | ||
powerdiststretch | ||
imview | ||
implot | ||
copyheader | ||
shareheader | ||
ImageCore.normedview | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Getting Started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Home | ||
|
||
AstroImages.jl is a Julia package for loading, manipulating, visualizing, and saving astronomical images. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Package Tour | ||
|
||
To follow along, download the images from the [Fits Liberator](https://esahubble.org/projects/fits_liberator/eagledata/) page and unzip them. | ||
|
||
```@meta | ||
DocTestSetup = quote | ||
using AstroImages | ||
end | ||
``` | ||
|
||
```@repl | ||
using AstroImages | ||
``` | ||
|
||
Let's start by loading a FITS file. | ||
```@repl | ||
using AstroImages | ||
eagle_656 = load("fits/656nmos.fits") | ||
save("eagle-1.png") # hide | ||
``` | ||
![eagle](eagle-1.png) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you need it,
Reproject.jl
v0.3.1 allows the latest version ofInterpolations.jl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @giordano! I had just run into that issue.
One thing I am wondering is whether it might be better to have the opposite relationship, with Reproject.jl depending on AstroImages.
What are your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reproject.jl
was meant to be a small self-contained low-level package for rotating images (much like its Python counterpart). How are you dealing with the rotations?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now there is nothing that rotates or otherwise transforms images, except for the RGB composite functions that first call reproject.
I was considering separating this out to look something like:
where
composechannels
is a shortcut for0.3 imview(img1, cmap=:reds) .+ 0.3 imview(img1, cmap=:greens) .+ ...
One thing that doesn't yet work is reprojecting one slice of a cube, but it should be possible with all the information now tracked by the
AstroImage
struct.