The oimodeler
package is a project aiming at developing a modular and easily expandable python-based modelling software for optical interferometry.
Note
The project started end of 2021, and the software, although fully functional, is currently in an early stage of development.
As described in the following and shown in the diagram below, oimodeler
is a modular software:
- Models can be created with the
oimModel <oimodeler.oimModel>
module and various base components contained in theoimComponent <oimodeler.oimComponent>
module which contain model parameters from theoimParam <oimodeler.oimParam>
module. - Interferometric data can be loaded with functionality from the
oimData <oimodeler.oimData>
module from standard OIFITS files. This module also allows to load flux/spectra in various formats with theoimData.oimData <oimodeler.oimData>
class that can optionallly be filtered using theoimData.oimDataFilter <oimodeler.oimData.oimDataFilter>
class with various filters from theoimDataFilter <oimodeler.oimDataFilter>
module. - Data simulation/calculation can be done with the
oimSimulator <oimodeler.oimSimulator>
module that takesoimData.oimData <oimodeler.oimData.oimData>
andoimModel.oimModel <oimodeler.oimModel.oimModel>
classes as input to simulate data from the model at the same spatial/spectral coordinates as the data. The module also allows to compute the model/data chi2. The fitting is done with fitters contained in the
oimFitter <oimodeler.oimFitter>
module that as its input also takes theoimData.oimData <oimodeler.oimData.oimData>
andoimModel.oimModel <oimodeler.oimModel.oimModel>
classes to perform model fitting.Note
Currently only a simple emcee fitter is implemented.
- The
oimPlots <oimodeler.oimPlots>
module contains plotting functions for OIFITS data andoimodeler
objects. - The
oimUtils <oimodeler.oimUtils>
module contains various functions to manipulate OIFITS data.
The oimModel <oimodeler.oimModel>
module is dedicated to the creation of models for optical interferometry. The models are modular and composed of one or many oimComponent.oimComponent <oimodeler.oimComponent.oimComponent>
objects. They can produce complex coherent flux and images and can subsequently be plugged into an oimSimulator <oimodeler.oimSimulator.oimSimulator>
object and/or any of the fitters contained in the oimFitter <oimodeler.oimFitter>
for data analysis and/or modelling.
The oimComponent <oimodeler.oimComponent>
module deals with model components that can be defined analytically in the Fourier plane (e.g., Uniform Disks, 2D-Gaussian distribution, etc.) or image plane (useful if there exists no analytical formula in the Fourier plane). An oimComponent <oimodeler.oimComponent>
can also be used to wrap external code (functions computing images, radial profiles, and hyperspectral cubes), or image-fit files (for instance produced using a radiative transfer model). An oimComponent <oimodeler.oimComponent>
can, in addition, be easily inherited from to create new custom components.
The oimParam <oimodeler.oimParam>
module contains basic model parameters. It oim.Param.oimParam <oimodeler.oimParam.oimParam>
class is used for the definition of components' parameters (Built from any of the base classes from the oimComponent <oimodeler.oimComponent>
module). There are also parameter linkers (oimParam.oimParamLinker <oimodeler.oimParam.oimParamLinker>
) as well as normalizers (oimParam.oimParamNormalize <oimodeler.oimParam.oimParamNormalize>
), and advanced parameter interpolators (oimParam.oimParamInterpolator <oimodeler.oimParam.oimParamInterpolator>
) that allow to build chromatic and time dependent models.
The oimData<oimodeler.oimData>
module allows to encapsulate interferometric (also photometric and spectroscopic) data. The oimData.oimData <oimodeler.oimData.oimData>
class allows to retrieve the original data as a list of astropy.io.fits.hdulist (via the oimData.data
attribute), but also provide optimization of the data as vector/structure for faster model fitting.
Warning
Photometric and spectroscopic data not yet implemented!
The oimDataFilter <oimodeler.oimDataFilter>
module is dedicated to filtering and modifying data contained in oimData.oimData <oimodeler.oimData.oimData>
classes. It allows data selection (truncating, removing arrays, and flagging) based on various criteria (wavelengths, SNR ...), and other data manipulation, such as smoothing and binning of the data.
The oimSimulator <oimodeler.oimSimulator>
module is the basic module for model (oimModel.oimModel <oimodeler.oimModel.oimModel>
) and data (oimData.oimData <oimodeler.oimData.oimData>
) comparison. It allows to simulate a new dataset (stored in the oimSimulator.simulatedData
attribute) with the same quantities and spatial/spectral coordinates of the data and a model. It also allows to compute chi2
for data and model comparison. The oimSimulator.oimSimulator <oimodeler.oimSimulator.oimSimulator>
class is fully compatible with the OIFITS2 format and can simulated any kind of data type from an OIFITS file (VIS2DATA, VISAMP in absolute, differential and correlated flux).
The oimFitter <oimodeler.oimFitter>
module is dedicated to model fitting. The parent class oimFitter.oimFitter <oimodeler.oimFitter.oimFitter>
is an abstract class that can be inherited from to implement various fitters. Currently. only a simple emcee-based fitter is implemented with oimFitter.oimEmceeFitter <oimodeler.oimFitter.oimEmceeFitter>
.
The oimPlots <oimodeler.oimPlots>
module contains various plotting tools for OIFITS data and oimodeler
objects. The oimPlots.oimAxes <oimodeler.oimPlots.oimAxes>
is a subclass of the matplotlib.pyplot.Axes class with methods dedicated to produce plotted OIFITS data from the astropy.io.fits.hdulist format.
The oimUtils <oimodeler.oimUtils>
module contains various functions to manipulate OIFITS data such as,
- Retrieving baselines names, length, orientation, getting spatial frequencies
- Creating new OIFITS arrays in astropy.io.fits.hudlist format.
and more.
oimodeler
is written to allow easy implementation of new model component, fitters, data filters, parameter intepolators, data loader (e.g., for non-OIFITS format data), and plots. Feel free to contact Anthony Meilland if you developped custom features and want them to be included in the oimodeler
distribution or make a pull-request on the Github repository and become a oimodeler
contributer. For bug-reports and feature requests, please use the GitHub issue tracker.