Skip to content

Commit ab1a81d

Browse files
committed
Tests added
1 parent 6a253fb commit ab1a81d

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ uuid = "d1dcc2e6-806e-11e9-2897-3f99785db2ae"
33
authors = ["Mosè Giordano"]
44
version = "0.1.0"
55

6+
[deps]
7+
FITSIO = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb"
8+
WCS = "15f3aee2-9e10-537f-b834-a6fb8bdb944d"
9+
610
[compat]
711
julia = "^1.0.0"
812

REQUIRE

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/parsers.jl

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
"""
2+
parse_input_data(input_data::ImageHDU)
3+
parse_input_data(input_data::String; hdu_in = nothing)
4+
parse_input_data(input_data::FITS; hdu_in = nothing)
5+
26
Parse input data and returns an Array and WCS object.
7+
8+
# Arguments
9+
- `input_data`: image to reproject which can be name of a FITS file,
10+
an ImageHDU or a FITS file.
11+
- `hdu_in`: used to set HDU to use when more than one HDU is present.
312
"""
413
function parse_input_data(input_data::ImageHDU)
514
return read(input_data), WCS.from_header(read_header(input_data, String))[1]
@@ -28,7 +37,17 @@ end
2837

2938

3039
"""
31-
Parse output projection and returns a WCS object and Shape of output
40+
parse_output_projection(output_projection::WCSTransform; shape_out = nothing)
41+
parse_output_projection(output_projection::ImageHDU; shape_out = nothing)
42+
parse_output_projection(output_projection::String; hdu_number = nothing)
43+
44+
Parse output projection and returns a WCS object and shape of output.
45+
46+
# Arguments
47+
- `output_projection`: WCS information about the image to be reprojected which can be
48+
name of a FITS file, an ImageHDU or WCSTransform.
49+
- `shape_out`: shape of the output image.
50+
- `hdu_number`: specifies HDU number when file name is given as input.
3251
"""
3352
function parse_output_projection(output_projection::WCSTransform; shape_out = nothing)
3453
if isnothing(shape_out)

0 commit comments

Comments
 (0)