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 the word for sky in Kamilaroi/Gamilaraay, the language of the Traditional Custodians of the land on which Siding Spring Observatory sits (ref: www.dnathan.com ).
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.
Reference/API¶
gunagala Package¶
gunagala.imager Module¶
Imaging instruments
Functions¶
create_imagers ([config]) |
Parse config and create a corresponding dictionary of Imager objects. |
gunagala.optic Module¶
Optics, e.g. a telescope or lens
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. |
gunagala.camera Module¶
Cameras (stricly the image sensor subsystem, not including optics, optical filters, etc)
gunagala.psf Module¶
Point spread functions
Classes¶
Moffat_PSF ([model, shape]) |
Class representing a 2D Moffat profile point spread function. |
PSF (FWHM[, pixel_scale]) |
Abstract base class representing a 2D point spread function. |
Class Inheritance Diagram¶
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¶
gunagala.utils Package¶
Functions¶
ensure_unit (arg, unit) |
Ensures that the argument has the requested units, performing conversions as necessary. |