Gunagala

Introduction

Gungala is a Python package for modelling the performance of astronomical instruments, including SNR/ETC/sensitivity limit calculations and generation of simulated data.

This package is not intended for rigorous, end-to-end simulations of telescope and instrument systems. Instead gunagala implements parameterised models of instrument components in order to enable rapid, efficient evaluation of instrument performance. Anticipated uses include exposure time calculators, selection of commercial off the shelf components and exploration of the design parameter space for custom components.

Gunagala includes a library of performance parameters for a number of existing commercial off the shelf instrument components (e.g. CCD cameras, optical filters, telescopes and camera lenses) and the user can easily add new/custom components either through YAML based config files or programmatically in Python.

Gunagala is named as a gesture of respect to the traditional custodians of the land on which Siding Spring Observatory sits, the Kamilaroi people of northern New South Wales. Gunagala is ‘sky’ in the Kamilaroi/Gamilaraay language (ref: www.dnathan.com). Aboriginal Australians have studied the night skies above Australia for at least 50000 years. To learn more about Aboriginal astronomy please visit http://www.aboriginalastronomy.com.au/.

Installation

Installing with pip

To install using the Python package manager pip use the following command:

$ pip install git+https://github.com/AstroHuntsman/gunagala.git

Alternatively to install in ‘editable mode’ use:

$ pip install -e git+https://github.com/AstroHuntsman/gunagala.git

Depending on the configuration of your system you may want to use pip’s --user or --root options to change the install location. See the pip documentation for details.

Pip will automatically install the Python packages required by Gunagala (numpy, scipy, astropy, PyYAML, matplotlib and their dependencies) if they are not already installed. If you want to install specific versions of the required packages from other sources do this before installing Gunagala.

Installing from source

The project source is in a GitHub repository at https://github.com/AstroHuntsman/gunagala. To install using git on the command line:

$ cd ~/Build
$ git clone https://github.com/AstroHuntsman/gunagala.git
$ cd gunagala
$ python setup.py install

Alternatively if you expect to make changes to the Gunagala code install with the develop command instead:

$ python setup.py develop

Setuptools will automatically install the Python packages required by Gunagala (numpy, scipy, astropy, PyYAML, matplotlib and their dependencies) if they are not already installed. If you want to install specific versions of the required packages from other sources do this before installing Gunagala.

Running the test suite

After installing Gunagala it is recommended that you run the suite of units tests. This can be done at the command line using:

$ python setup.py test

or from within a Python interpreter with:

>> import gunagala
>> gunagala.test()

Examples

The Gunagala package includes several examples in the form of Jupyter notebooks. These can be found in the gungala/examples directory after installing Gunagala, or they can be viewed directly in the GitHub repository by going to https://github.com/AstroHuntsman/gunagala/tree/master/examples and clicking on the .ipynb files.

Contributing

Please submit bug reports or feature requests in the form of GitHub Issues at https://github.com/AstroHuntsman/gunagala/issues. For code contributions please fork and clone the repository, create a feature branch and submit a Pull Request. We recommend the astropy Developer Documentation for a description of suitable workflows.

Changelog

0.1 (unreleased)

Initial release

Reference/API

gunagala Package

Functions

test([package, test_path, args, plugins, …]) Run the tests using py.test.

gunagala.imager Module

Imaging instruments

Functions

create_imagers([config]) Parse config and create a corresponding dictionary of Imager objects.

Classes

Imager(optic, camera, filters, psf, sky[, …]) Class representing an astronomical imaging instrument.

gunagala.optic Module

Optics, e.g. a telescope or lens

Functions

list_surfaces()
make_throughput(surfaces) Constructs a table of throughout vs wavelength from the numbers and types of optical surfaces

Classes

Optic(aperture, focal_length, throughput[, …]) Class representing the overall optical system.

gunagala.optical_filter Module

Optical filters

Functions

butter_band(w, w1, w2, N[, scale]) Simple Butterworth bandpass filter function in wavelength space.
cheby_band(w, w1, w2, N[, ripple, scale]) Simple Chebyshev Type I bandpass filter function in wavelength space.

Classes

Filter([transmission, chebyshev_params, …]) Class representing an optical bandpass filter.

gunagala.camera Module

Cameras (stricly the image sensor subsystem, not including optics, optical filters, etc)

Classes

Camera(bit_depth, full_well, gain, bias, …) Class representing a camera.

gunagala.psf Module

Point spread functions

Classes

FittablePSF(FWHM[, pixel_scale]) Base class representing a 2D point spread function based on a Fittable2DModel from astropy.modelling.
MoffatPSF([model, shape]) Class representing a 2D Moffat profile point spread function.
PSF Abstract base class representing a 2D point spread function.
PixellatedPSF(psf_data, psf_sampling[, …]) Class representing a 2D point spread function based on an already pixellated data, e.g.

Class Inheritance Diagram

Inheritance diagram of gunagala.psf.FittablePSF, gunagala.psf.MoffatPSF, gunagala.psf.PSF, gunagala.psf.PixellatedPSF

gunagala.sky Module

Sky background models

Classes

Simple(surface_brightness, **kwargs) Simple sky background model using fixed, uniform, pre-determined surface brightness values for specific filter bands.
Sky() Abstract base class for sky background models.
ZodiacalLight(**kwargs) Class representing the Zodiacal Light sky background.

Class Inheritance Diagram

Inheritance diagram of gunagala.sky.Simple, gunagala.sky.Sky, gunagala.sky.ZodiacalLight

gunagala.utils Package

Functions

array_sequence_equal(array_sequence[, reference]) Determine if all array objects in a sequence are equal.
bin_array(data, binning_factor[, bin_func]) Bin 2D array data by a given factor using a given binning function.
ensure_unit(arg, unit) Ensures that the argument has the requested units, performing conversions as necessary.
get_table_data(data_table, column_names, …) Parses a data table to extract specified columns, converted to Quantity with specified units.