Skip to content

JuliaAstro/CCDReduction.jl

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

CCDReduction.jl

Build Status PkgEval Codecov License

Stable Dev

A package for performing CCD data reduction and processing.

Usage

For in-depth API infromation and usage examples, please see the documentation. You'll recognize most of the familiar reduction operations allow us to quickly and easily operate on data.

using CCDReduction

noise = randn(512, 512)
bias_frame = reshape(1:262144, 512, 512) |> collect
img = reshape(1:262144, 512, 512) .+ noise

subtract_bias(img, bias_frame)

In addition to working on array-like data, we can directly load from a FITSIO.ImageHDU or from a filename

using FITSIO

# make fits file
bias_frame = reshape(1:262144, 512, 512) |> collect
FITS("master_bias.fits", "w") do f
    write(f, bias_frame)
end
img = 10 .* randn(512, 512)
debiased = subtract_bias(img, "master_bias.fits")

Finally, we can use function chaining (or tools like Underscores.jl) for creating a simple processing pipeline!

using Underscores

# 5 science frames
imgs = (10 .* randn(512, 524) for _ in 1:5)

# create pipeline using Underscores.jl
pipeline(img) = @_ img |>
    subtract_overscan(__, (:, 513:524)) |>
    trim(__, (:, 513:524)) |>
    subtract_bias(__, "master_bias.fits")

# apply pipeline to images using broadcast syntax
calib_imgs = pipeline.(imgs)

License

This work is distributed under the MIT license. See LICENSE for more information.

About

A package for performing CCD data reduction.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages