Skip to content

Commit 325f0b2

Browse files
committed
improved README
1 parent 3df57d5 commit 325f0b2

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

Images/input.png

27.5 KB
Loading

Images/output.png

47.3 KB
Loading

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,69 @@ Implementation in [Julia](https://julialang.org/) of the
77
[`reproject`](https://github.com/astropy/reproject) package by Thomas
88
Robitaille, part of the Astropy project.
99

10+
This package can be used to reproject Astronomical Images from one world coordinate to another. By reproject we mean re-gridding of images using interpolation (i.e changing the pixel resolution, orientation, coordinate system).
11+
12+
Installation
13+
-------
14+
15+
`Reproject.jl` is avilable for Julia 1.0 and later versions and can be installed with [Julia built-in package manager](https://docs.julialang.org/en/v1/stdlib/Pkg/).
16+
`julia> Pkg.add("Reproject")`
17+
18+
Usage
19+
-------
20+
21+
After installing the package, you can start using it with
22+
23+
```
24+
julia> using Reproject
25+
julia> result = reproject(input_data, output_projection)
26+
```
27+
28+
This returns a tuple of reprojected Image and footprint.
29+
30+
31+
Reprojecting Images
32+
-------
33+
34+
To reproject Astronomical Images, primary requirements are Image data (2D Matrix), world cordinate frame of input Image and required output frame in which it needs to be reprojected.
35+
36+
The Image data and input frame is given together as an [ImageHDU](http://juliaastro.github.io/FITSIO.jl/latest/index.html) or [FITS](https://github.com/JuliaAstro/FITSIO.jl) file or name of the FITS file in `input_data`. A keyword argument `hdu_in` can be given while using FITS or FITS file name to specify specific HDU in FITS file.
37+
38+
The `output_projection` is the output world coordinate frame and needs to be a a [WCSTransform](https://github.com/JuliaAstro/WCS.jl) or an [ImageHDU](http://juliaastro.github.io/FITSIO.jl/latest/index.html) or [FITS](https://github.com/JuliaAstro/FITSIO.jl) file or name of the FITS file. A keyword argument `hdu_out` can be given while using FITS or FITS file name to specify specific HDU in FITS file.
39+
WCS information is extracted from header when ImageHDU or FITS file is given as `output_projection`.
40+
41+
Order of Interpolation can be specified by keyword `order` (i.e 0, 1(default), 2).
42+
The dimensions of output Image can be given by keyword `shape_out`. This can be used to change resolution.
43+
44+
45+
Example
46+
-------
47+
```
48+
julia> using Reproject, FITSIO
49+
50+
julia> input_data = FITS("gc_msx_e.fits)
51+
52+
julia> output_projection = FITS("gc_2mass_k.fits")
53+
54+
julia> result = reproject(input_data, output_projection, shape_out = (1000,1000), order = 2, hdu_in = 1, hdu_out = 1)
55+
```
56+
**Input Image:**
57+
<img name="community" src="Images/input.png"/>
58+
59+
**Output:**
60+
<img name="community" src="Images/output.png"/>
61+
62+
Test files can be obtained from [here](https://astropy.stsci.edu/data/).
63+
64+
Related Packages
65+
-------
66+
Check out [AstroImages.jl](https://github.com/JuliaAstro/AstroImages.jl), which use this package to form coloured RGB image from 2D CCD Astromonical Images.
67+
1068
License
1169
-------
1270

1371
The `reproject` package is released under the terms of the BSD 3-Clause "New" or
1472
"Revised" License. The `Reproject.jl` package received written permission to be
1573
released under the MIT "Expat" License.
74+
75+
The authors of this package are [aquatiko](https://github.com/aquatiko) and [giordano](https://github.com/giordano).

0 commit comments

Comments
 (0)