Skip to content

Conversation

@aquatiko
Copy link
Contributor

@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
@aquatiko aquatiko changed the title [WIP] Parser added Parser added Jun 3, 2019
@aquatiko
Copy link
Contributor Author

aquatiko commented Jun 4, 2019

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

@aquatiko
Copy link
Contributor 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

@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