Skip to main content

banner

Python numpy scipy astropy matplotlib

Overview

PMOIRED is a Python3 module which allows to model astronomical spectro-interferometric data stored in the OIFITS format (Duvert et al. 2017). Parametric modeling is used to describe the observed scene as blocks such as disks, rings and Gaussians which can be combined and their parameters linked. It includes plotting, least-square fitting and bootstrapping estimation of uncertainties. For spectroscopic instruments (such as GRAVITY), tools are provided to model spectral lines and correct spectra for telluric lines.

The modelling of data is based on several principles:

  • The model is composed of a combination of basic building blocks (see the model definition notebook)
  • Simple building blocks include uniform disks, uniform rings, Gaussians.
  • Building blocks can be deformed (analytically), including stretched in one preferred direction, or slanted. This can efficiently simulate inclined components.
  • More complicated blocks are available, such as disks/rings with arbitrary radial profile, and possibility to include azimuthal intensity variations.
  • Each component has a spectrum, including modelling of emission or absorption lines (Gaussian or Lorentzian)
  • In order for the computation to be fast (a requirement to perform data fitting), basic blocks have analytical or semi-analytical complex visibilities. Moreover, for the same reason, their spectral component is independent of the geometry.

The principles are close to tools such as LITpro. However, PMOIRED offers additional features:

  • Modelling in the spectral dimension. For this reason, it contains a module to do basic telluric correction (only for VLTI/GRAVITY at the moment)
  • Models' parameters can be expressed a function of each others, which allows to build complex geometrical shapes: astronomical realistic models can be build this way, without compromising on execution speed.
  • Uncertainties can be estimated using bootstrapping (data resampling by date+telescope) to mitigate the effects of correlations between data.
  • The values of parameters can be explored using grid and or random search.
  • Synthetic data for VLTI array observations can be generated from data cubes.

diagramme

Install

Install with pip

PMOIRED is regularly pushed to PyPI at https://pypi.org/project/pmoired/ so you can install directly using pip, by typing:

pip3 install pmoired

Install with git

To install from the github repository:

pip3 install git+https://github.com/amerand/PMOIRED

you can also clone the repository and install with pip3 install . within the PMOIRED directory

Uninstall

To uninstall (works for both PyPI and github versions):

pip3 uninstall pmoired

Examples and tutorials

This repository comes with a Jupyter Notebook showing basic model syntax.

Full examples, how to load real data and analyse them, are available in a separate repository: PMOIRED_examples. These examples are Jupyter Notebooks reproducing published results with other tools, and serve both as tutorials and verification of PMOIRED. They cover most of the features of PMOIRED, from the basics to more advanced operations.

Using and quoting PMOIRED

References to PMOIRED should point to the 2022 SPIE Telescopes+Instrumentation conference proceeding paper.

This code is a research project in continuous development and not yet properly fully documented. If you want to get the best analysis for your data, do not hesitate to contact me: I try to be responsive, in particular with junior scientists. New features are driven by collaborations: if you think PMOIRED is missing something, definitely contact me!

I maintain a list of works published using PMOIRED in a curated bibliography.

I used to to request co-authorship on publications using PMOIRED (until Feb 2023): this is no longer the case, unless I contributed directly to the work in question

Limitations and known issues

Running a script in ipython hangs

PMOIRED uses the multiprocessing library to parallelise some computations (e.g. bootstrapping, grid search). This library has some issues if you run a script containing such computation is an interactive shell (using %run or run in ipython or Spyder). The provided examples as notebooks do not suffer from this problem. If you want to use PMOIRED in .py scripts you run in iPython, you should structure your .py script more or less as follow:

import pmoired
import matplotlib

matplotlib.interactive(True)
__spec__ = None
if __name__=='__main__':
    [code]

in iPython, you can now type %run myscript.py.

Dependencies

The latest version of PMOIRED has been tested on:

  • python 3.11.2
  • numpy 1.24.2
  • scipy 1.10.1
  • astropy 5.2.1
  • astroquery 0.4.6
  • matplotlib 3.7.0
  • jupyterlab 3.5.0

Acknowledgments

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 101004719.

EU ORP

Metadata

Release files for pmoired 1.2.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pmoired 1.2.11
File Size Uploaded
pmoired-1.2.11.tar.gz 400.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pmoired 1.2.11
File Interpreter ABI Platform
pmoired-1.2.11-py3-none-any.whl Python 3 none any Details

Total release size: 801.0 kB

Release files / pmoired-1.2.11.tar.gz

Download URL pmoired-1.2.11.tar.gz
Size 400.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a2051a1511165700676755140139d0657a929b20f14a853528892bb762bf0bc3
BLAKE2b-256 checksum
How to use checksums
f92ac83e46c888e1f5fa4513da95efa16442a2c449bea3ab98609b9dee20ba3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / pmoired-1.2.11-py3-none-any.whl

Download URL pmoired-1.2.11-py3-none-any.whl
Size 400.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c18b5814ecb1a22b79b9db5c31a455a7e66cfd987898c8428f3e54defc69f893
BLAKE2b-256 checksum
How to use checksums
e520ec37bdf458835786130d923187f57365bab66cbc778538f0ba1a305dd3fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

1.3.13

2 release files

1.3.12

2 release files

1.3.11

2 release files

1.3.10

2 release files

1.3.9

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

This release

1.2.11 This release

2 release files

1.2.10

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.4

2 release files

1.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page