CCDReduction.jl

A package for performing CCD data reduction.
Author JuliaAstro
Popularity
7 Stars
Updated Last
5 Months Ago
Started In
February 2020

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.

Used By Packages

No packages found.