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

Parser added #2

Merged
merged 6 commits into from
Jun 13, 2019
Merged

Parser added #2

merged 6 commits into from
Jun 13, 2019

Conversation

aquatiko
Copy link
Member

@aquatiko aquatiko commented May 28, 2019

Port from: https://github.com/astropy/reproject/blob/master/reproject/utils.py
Not a direct port, optimised some methods due to Julia's flexibility.

  • Function
  • Tests
  • Extended Documentation

@aquatiko aquatiko changed the title Parser added [WIP] Parser added May 28, 2019
src/parser.jl Outdated Show resolved Hide resolved
src/parser.jl Outdated Show resolved Hide resolved
src/parser.jl Outdated Show resolved Hide resolved
src/parser.jl Outdated Show resolved Hide resolved
@aquatiko aquatiko changed the title [WIP] Parser added Parser added Jun 3, 2019
@aquatiko
Copy link
Member Author

aquatiko commented Jun 4, 2019

@giordano this PR is completed. Ready for review and merging!!

src/Reproject.jl Outdated Show resolved Hide resolved
src/Reproject.jl Outdated Show resolved Hide resolved
src/Reproject.jl Outdated Show resolved Hide resolved
src/parsers.jl Outdated Show resolved Hide resolved
src/parsers.jl Outdated Show resolved Hide resolved
src/parsers.jl Outdated Show resolved Hide resolved
@aquatiko
Copy link
Member Author

aquatiko commented Jun 9, 2019

I have made the changes and I'm planning to use it in this way:

function reproject(input_data, output_projection, shape_out = nothing, order = 1, hdu_in = 1, hdu_out = 1, return_footprint = true)
    if input_data isa ImageHDU        # write order functionality, footprint too
        array_in, wcs_out = parse_input_data(input_data)
    else
        array_in, wcs_out = parse_input_data(input_data, hdu_in)
    end
    
    if input_data isa FITS || input_data isa String
        wcs_in, shape_out = parse_output_projection(output_projection, hdu_out)
    else
        wcs_in, shape_out = parse_output_projection(output_projection, shape_out)
    end
end

This way allowed some scope of refactoring, let me know your thoughts on this. Once this is merged, I will push the main body of reproject in a PR.

Copy link
Member

@giordano giordano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few minor comments

src/parsers.jl Outdated Show resolved Hide resolved
src/parsers.jl Show resolved Hide resolved
@giordano giordano merged commit 06254c7 into JuliaAstro:master Jun 13, 2019
@aquatiko aquatiko deleted the parsers branch June 13, 2019 10:08
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

Successfully merging this pull request may close these issues.

2 participants