GithubHelp home page GithubHelp logo

astroimages.jl's Introduction

AstroImages.jl

Build Status Code Coverage
Build Status
Build Status

Introduction

AstroImage.jl allows you to plot images from an astronomical FITS file using the popular Images.jl and Plots.jl Julia packages. AstroImage.jl uses FITSIO.jl to read FITS files.

Installation

AstroImage.jl is available for Julia 0.7 and later versions, and can be installed with Julia built-in package manager. This packages is not yet registered, after entering into the package manager by pressing ] run the command

pkg> add https://github.com/JuliaAstro/AstroImages.jl

Usage

After installing the package, you can start using it with

julia> using AstroImages

Reading extensions from FITS file

You can load and read the the first extension of a FITS file with the load function, from FileIO.jl:

julia> load("file.fits")
1300×1200 Array{UInt16,2}:
[...]

The second argument of this load method is the number of the extension to read. Read the third extension of the file with:

julia> load("file.fits", 3)
1300×1200 Array{UInt16,2}:
[...]

AstroImage type

The package provides a new type, AstroImage to integrate FITS images with Julia packages for plotting and image processing. The AstroImage function has the same syntax as load. This command:

julia> img = AstroImage("file.fits")
AstroImages.AstroImage{UInt16,ColorTypes.Gray}[...]

will read the first extension from the file.fits file and wrap its content in a Matrix{Gray}, that can be easily used with Images.jl and related packages.

If you are working in a Jupyter notebook, an AstroImage object is automatically rendered as a PNG image.

Plotting an AstroImage

An AstroImage object can be plotted with Plots.jl package. Just use

julia> using Plots

julia> plot(img)

and the image will be displayed as a heatmap using your favorite backend.

License

The AstroImages.jl package is licensed under the MIT "Expat" License. The original author is Mosè Giordano.

astroimages.jl's People

Contributors

giordano avatar irahulcse avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.