Dorado Documentation Overview

(Digitized Observatory Resources for Automated Data Operations)


Made at YorkObservatory Powered by Astropy Badge Documentation Status Last Commit GitHub issues GitHub release (latest by date including pre-releases) PyPI - Status PyPI PyPI - Format PyPI - License PyPI - Downloads


Digitized Observatory Resources for Automated Data Operations (DORADO) is a python based expansion of astropy (and affiliated packages) that aims to be a simple and common framework for data reduction tailored for life at the Allan I. Carswell Observatory at York university, Toronto, Ontario, Canada

☣⚠ DORADO is in beta ⚠☣

DORADO is in beta and as such is highly experimental and still a work in progress. While still in active development DORADO may still be used and experimented with; but a stable channel will not be created until DORADO enters a beta phase in the future.

Use of DORADO while in beta will not result in any risk to your computer or hardware, but may affect stability of software that are written with DORADO or the quality of data that is produced using DORADO.

During the beta, documentation and code commenting may be subpar as many things will being changing regularly with new code being written and rewritten and in-line testing appearing temporarily.

Getting started with dorado:

import dorado

# Do some stuff

# Get a fits file formated date string for the current observing night.
night = dorado.get_night()

# Your data directory
directory = 'C:/Data/'

# You can name your target object
target = 'dorado'

# Create a working directory
dorado.mkwrkdir(directory, night)

# Catalogue input data from the data directory
bias_list, flats_list, lights_list = dorado.checkdir(directory, night)

# Read the data in
data_series = dorado.get_series(directory, night, lights_list, unit = None)
flats_series = dorado.get_series(directory, night, flats_list, unit = None)
bias_series = dorado.get_series(directory, night, bias_list, unit = None)

# Produce master reduction images
bias = dorado.mastBias(directory, night, bias_list)
flat = mastFlat(directory, night, flats_list, bias)

# Calibrate data series
series = dorado.reduce_series(directory, night, lights_list, flat, bias, target)

# You now have a working directory full of calibrated images
# It was that easy!


Install dorado by running: pip install dorado.


The dorado project on PyPI .


Dorado aims to be as lightweight as possible and utilize as little dependencies as it can.

Currently DORADO relies on:

  1. numpy

  2. matplotlib

  3. astropy


  5. scipy

  6. scikit-image

  7. astroquery


dorado Package



checkdir returns lists

file_string(directory, imname)

file_string takes a directory filestring and image filename and combines them into a single filestring.

get_im(directory, imname)

get_im intakes a filename and directory of a fits image and returns the data and header of the image.


get_night obtains a timestring for the most recent(previous) night.

get_series(directory, imlist[, unit])

plate_solve takes fits image file data and the corresponding file string to the data and calls to obtain and then integrate WCS into the HDU.

mad_std(data[, axis, func, ignore_nan])

Calculate a robust standard deviation using the median absolute deviation (MAD).

mastBias(directory, bias[, caldir])

mastBias takes a datadirectory string, a list of bias images to construct a master bias image.

mastFlat(directory, flats, bias[, caldir])

mastFlat takes a datadirectory string, a list of flats and a master bias image to construct a master flatfield image.


mkwrkdir creates standard data processing working directories.


norm_flat takes a flatfield image and normalizes it for use in reduction.

plate_solve(data, image_file_path[, …])

plate_solve takes fits image file data and the corresponding file string to the data and calls to obtain and then integrate WCS into the HDU.

plt_bias(image_data[, cmap_str])

plt_eye(data[, num_sigma])

plt_eye takes image data for plotting and computes the optimal colourbar range.

plt_fits(image_data[, cmap_str, num_sigma])

plt_flat(image_data[, cmap_str])

plt_stars(data, x, y, r[, num_sigma])

reduce_series(imdir, imlist, flat, bias, target)

plate_solve takes fits image file data and the corresponding file string to the data and calls to obtain and then integrate WCS into the HDU.

series_arith(series, operator, operand)

series_arith allows one to perform mathematical(algebraic) on a series of images.


sky_est makes a crude estimate of an images sky value based on a median method.


stack_im stacks a series of images into a single frame.



Run the tests for the package.

theMask(data, lx, hx, ly, hy)

theMask takes an image and bound parameters to mask the outter edges of the image in the case of imperfections.

write_series(directory, series, target[, expath])

write_series intakes a series of CCD images, a target name for filestring creation and a data directory path and writes the series to the directory.

zoom(input, zoom[, output, order, mode, …])

Zoom an array.


CCDData(*args, **kwd)

A class describing basic CCD data.


Table([data, masked, names, dtype, meta, …])

A class to represent tables of heterogeneous data.

Class Inheritance Diagram

Inheritance diagram of dorado.fournax.fitt.Fournax


In the near future examples, tutorials, and pre-made use scripts will be located here. The first release of Dorado should ship with an example pipeline and data formatting tutorial.


We love contributions! dorado is open source, built on open source, and we’d love to have you hang out in our community.

Imposter syndrome disclaimer: We want your help. No, really.

There may be a little voice inside your head that is telling you that you’re not ready to be an open source contributor; that your skills aren’t nearly good enough to contribute. What could you possibly offer a project like this one?

We assure you - the little voice in your head is wrong. If you can write code at all, you can contribute code to open source. Contributing to open source projects is a fantastic way to advance one’s coding skills. Writing perfect code isn’t the measure of a good developer (that would disqualify all of us!); it’s trying to create something, making mistakes, and learning from those mistakes. That’s how we all improve, and we are happy to help others learn.

Being an open source contributor doesn’t just mean writing code, either. You can help out by writing documentation, tests, or even giving feedback about the project (and yes - that includes giving feedback about the contribution process). Some of these contributions may be the most valuable to the project as a whole, because you’re coming to the project with fresh eyes, so you can see the errors and assumptions that seasoned contributors have glossed over.


This disclaimer was originally written by Adrienne Lowe for a PyCon talk, and was adapted by dorado based on its use in the README file for the MetPy project.


If you have any questions or would like to contribute to DORADO, please contact @mucephie at <>. If you are interested in the Allan I. Carswell observatory at York university, you can find more information at our website.


This project is Copyright (c) Mucephie and licensed under the terms of the BSD 3-Clause license. This package is based upon the Astropy package template which is licensed under the BSD 3-clause license. See the licenses folder for more information.