pmoired


Namepmoired JSON
Version 1.2.10 PyPI version JSON
download
home_pageNone
SummaryDisplay and fit Optical (spectro-)Interferometric OIFITS data
upload_time2024-09-18 12:41:22
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseCopyright (c) 2020-2023, Antoine Méand Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords optical interferometry visualization display oifits data modelling astrophysics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![banner](banner/banner/banner.001.png)

## Overview

`PMOIRED` is a Python3 module which allows to model astronomical spectro-interferometric data stored in the OIFITS format ([Duvert et al. 2017](https://ui.adsabs.harvard.edu/abs/2017A%26A...597A...8D/abstract)). 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](Model%20definitions%20and%20examples.ipynb) 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](https://www.jmmc.fr/english/tools/data-analysis/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](banner/diagramme/Slide1.png)

## Install

### install with pip

`PMOIRED` is regularly pushed to PyPI at [https://pypi.org/project/pmoired/](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](https://nbviewer.org/github/amerand/PMOIRED/blob/master/Model%20definitions%20and%20examples.ipynb).

Full examples, how to load real data and analyse them, are available in a separate repository: [PMOIRED_examples](https://github.com/amerand/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](https://ui.adsabs.harvard.edu/abs/2022SPIE12183E..1NM/abstract).

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](https://ui.adsabs.harvard.edu/public-libraries/dz7RG915Swq5yAB1KwmgTA).

> ***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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pmoired",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "optical interferometry, visualization, display, OIFITS, data modelling, astrophysics",
    "author": null,
    "author_email": "Antoine M\u00e9rand <amerand@eso.org>",
    "download_url": "https://files.pythonhosted.org/packages/3b/e5/4c6bb67e83b6544e34e81537f06f3e7eaba926cfeb3544a836fbd63bc215/pmoired-1.2.10.tar.gz",
    "platform": null,
    "description": "![banner](banner/banner/banner.001.png)\n\n## Overview\n\n`PMOIRED` is a Python3 module which allows to model astronomical spectro-interferometric data stored in the OIFITS format ([Duvert et al. 2017](https://ui.adsabs.harvard.edu/abs/2017A%26A...597A...8D/abstract)). 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.\n\nThe modelling of data is based on several principles:\n- The model is composed of a combination of basic building blocks (see the [model definition](Model%20definitions%20and%20examples.ipynb) notebook)\n- Simple building blocks include uniform disks, uniform rings, Gaussians.\n- Building blocks can be deformed (analytically), including stretched in one preferred direction, or slanted. This can efficiently simulate inclined components.\n- More complicated blocks are available, such as disks/rings with arbitrary radial profile, and possibility to include azimuthal intensity variations.\n- Each component has a spectrum, including modelling of emission or absorption lines (Gaussian or Lorentzian)\n- 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.\n\nThe principles are close to tools such as [LITpro](https://www.jmmc.fr/english/tools/data-analysis/litpro). However, `PMOIRED` offers additional features:\n- Modelling in the spectral dimension. For this reason, it contains a module to do basic telluric correction (only for VLTI/GRAVITY at the moment)\n- 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.\n- Uncertainties can be estimated using bootstrapping (data resampling by date+telescope) to mitigate the effects of correlations between data.\n- The values of parameters can be explored using grid and or random search.\n- Synthetic data for VLTI array observations can be generated from data cubes.\n\n![diagramme](banner/diagramme/Slide1.png)\n\n## Install\n\n### install with pip\n\n`PMOIRED` is regularly pushed to PyPI at [https://pypi.org/project/pmoired/](https://pypi.org/project/pmoired/) so you can install directly using `pip`, by typing:\n\n```\npip3 install pmoired\n```\n### install with git\n\nTo install from the github repository:\n```\npip3 install git+https://github.com/amerand/PMOIRED\n```\nyou can also clone the repository and install with `pip3 install .` within the PMOIRED directory\n\n### uninstall\nTo uninstall (works for both PyPI and github versions):\n```\npip3 uninstall pmoired\n```\n\n## Examples and tutorials\n\nThis repository comes with a [Jupyter Notebook showing basic model syntax](https://nbviewer.org/github/amerand/PMOIRED/blob/master/Model%20definitions%20and%20examples.ipynb).\n\nFull examples, how to load real data and analyse them, are available in a separate repository: [PMOIRED_examples](https://github.com/amerand/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.\n\n## Using and quoting `PMOIRED`\n\nReferences to `PMOIRED` should point to the [2022 SPIE Telescopes+Instrumentation conference proceeding paper](https://ui.adsabs.harvard.edu/abs/2022SPIE12183E..1NM/abstract).\n\nThis 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!\n\nI maintain a list of works published using `PMOIRED` in a [curated bibliography](https://ui.adsabs.harvard.edu/public-libraries/dz7RG915Swq5yAB1KwmgTA).\n\n> ***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***\n\n## Limitations and known issues\n\n### Running a script in ipython hangs\n\nPMOIRED 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:\n```\nimport pmoired\nimport matplotlib\n\nmatplotlib.interactive(True)\n__spec__ = None\nif __name__=='__main__':\n    [code]\n```\nin iPython, you can now type `%run myscript.py`.\n\n### Dependencies\n\nThe latest version of `PMOIRED` has been tested on:\n- python 3.11.2\n- numpy 1.24.2\n- scipy 1.10.1\n- astropy 5.2.1\n- astroquery 0.4.6\n- matplotlib 3.7.0\n- jupyterlab 3.5.0\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2020-2023, Antoine M\u00e9and  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Display and fit Optical (spectro-)Interferometric OIFITS data",
    "version": "1.2.10",
    "project_urls": {
        "Bibliography": "https://ui.adsabs.harvard.edu/public-libraries/dz7RG915Swq5yAB1KwmgTA",
        "Issues": "https://github.com/amerand/PMOIRED/issues",
        "Publications": "https://ui.adsabs.harvard.edu/search/p_=0&q=%20full%253A%22PMOIRED%22",
        "Repository": "https://github.com/amerand/PMOIRED"
    },
    "split_keywords": [
        "optical interferometry",
        " visualization",
        " display",
        " oifits",
        " data modelling",
        " astrophysics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f6e54c8ebde6c99e2f95f7c75aab67905e6b5532c5fbb13d5f39ee408d74411c",
                "md5": "eff551659e558118c7ddecdafef09e54",
                "sha256": "922386c94656f8d592999f471238bda0559a1644db497bebb1cd4effe61c547f"
            },
            "downloads": -1,
            "filename": "pmoired-1.2.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eff551659e558118c7ddecdafef09e54",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 397811,
            "upload_time": "2024-09-18T12:41:20",
            "upload_time_iso_8601": "2024-09-18T12:41:20.498539Z",
            "url": "https://files.pythonhosted.org/packages/f6/e5/4c8ebde6c99e2f95f7c75aab67905e6b5532c5fbb13d5f39ee408d74411c/pmoired-1.2.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3be54c6bb67e83b6544e34e81537f06f3e7eaba926cfeb3544a836fbd63bc215",
                "md5": "17e046c7000fc77f3707d196f3ec9023",
                "sha256": "3c60cccfb3bbc01a28454ad78ddb2c395edcda25aed52a4de84c44d8739e1eba"
            },
            "downloads": -1,
            "filename": "pmoired-1.2.10.tar.gz",
            "has_sig": false,
            "md5_digest": "17e046c7000fc77f3707d196f3ec9023",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 396764,
            "upload_time": "2024-09-18T12:41:22",
            "upload_time_iso_8601": "2024-09-18T12:41:22.477375Z",
            "url": "https://files.pythonhosted.org/packages/3b/e5/4c6bb67e83b6544e34e81537f06f3e7eaba926cfeb3544a836fbd63bc215/pmoired-1.2.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-18 12:41:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "amerand",
    "github_project": "PMOIRED",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pmoired"
}
        
Elapsed time: 0.60401s