This project has been archived by its maintainers, and is no longer receiving any updates.
Optimal Image Subtraction (OIS)
OIS is a Python package to perform optimal image subtraction on astronomical images. It also has a companion command-line program written entirely in C.
OIS offers different methods to subtract images:
- Modulated multi-Gaussian kernel (as described in Alard&Lupton (1998))
- Delta basis kernel (as described in Bramich (2010))
- Adaptive Delta Basis kernel (as described in Miller (2008))
Each method can (optionally) simultaneously fit and remove common background.
You can find a Jupyter notebook example with the main features at http://toros-astro.github.io/ois.
Installation
To install the Python module:
$ pip install ois
To instal and run the C command-line program, download this repo to your local machine and execute:
$ git clone https://github.com/toros-astro/ois.git
$ cd ois
$ make ois
$ ./ois --help
The C command-line program is somewhat limited in functionality compared to the Python module. Please see the documentation for more information.
Minimal usage example
>>> from ois import optimal_system
>>> diff = optimal_system(image, image_ref)[0]
Check the documentation for a full tutorial.
Other Parameters:
kernelshape: shape of the kernel to use. Must be of odd size.
bkgdegree: degree of the polynomial to fit the background. To turn off background fitting set this to None.
method: One of the following strings
-
Bramich: A Delta basis for the kernel (all pixels fit independently). Default method. -
AdaptiveBramich: Same as Bramich, but with a polynomial variation across the image. It needs the parameter poly_degree, which is the polynomial degree of the variation. -
Alard-Lupton: A modulated multi-Gaussian kernel. It needs the gausslist keyword. gausslist is a list of dictionaries containing data of the gaussians used in the decomposition of the kernel. Dictionary keywords are: center, sx, sy, modPolyDeg
Extra parameters are passed to the individual methods.
poly_degree: needed only for AdaptiveBramich. It is the degree
of the polynomial for the kernel spatial variation.
gausslist: needed only for Alard-Lupton. A list of dictionaries with info for the modulated multi-Gaussian. Dictionary keys are:
- center: a (row, column) tuple for the center of the Gaussian. Default: kernel center.
- modPolyDeg: the degree of the modulating polynomial. Default: 2
- sx: sigma in x direction. Default: 2.
- sy: sigma in y direction. Deafult: 2.
Author: Martin Beroiz
Metadata
Release files for ois 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ois-0.2.tar.gz | 11.8 kB | Without provenance | Details |
Release files / ois-0.2.tar.gz
| Download URL | ois-0.2.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
604828e1bb0e7a0a037a142a8081526133d4cbd422c1d4701c9812188286f421
|
|
BLAKE2b-256 checksum How to use checksums |
16c2e465a81330c50a3f9284b8455922fa78435db3d6d3b84d381ac66e925740
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Security for ois 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.