https://github.com/cpinte/pymcfost
python interface to the 3D radiative transfer code mcfost
https://github.com/cpinte/pymcfost
Last synced: 2 months ago
JSON representation
python interface to the 3D radiative transfer code mcfost
- Host: GitHub
- URL: https://github.com/cpinte/pymcfost
- Owner: cpinte
- License: mit
- Created: 2018-09-24T08:35:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-09-04T07:03:18.000Z (9 months ago)
- Last Synced: 2025-09-04T07:15:37.268Z (9 months ago)
- Language: Python
- Homepage:
- Size: 550 KB
- Stars: 22
- Watchers: 4
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pymcfost
pymcfost is a python interface to the 3D radiative transfer code mcfost. The goal is to provide a simple and light interface to explore and plot a single (or a few) model(s).
[](https://pymcfost.readthedocs.io/en/latest/)
pymcfost offers (or will offer) the following functionalities:
- set up continuum and line models,
- read a single model or library of models,
- plot basic quantities, e.g. density structures, temperature maps on the various grids available in mcfost,
- plot observables : SEDs, image (with convolution), polarisation maps and vectors, visibilities, channels maps (with spatial and spectral convolution), moment maps.
- convert units, e.g. W.m-2 to Jy or brightness temperature
- provides an interface to the ALMA CASA simulator
- provides a fast and simplfied version of the ALMA simulator (spatial convolution with Gaussian, spectral convolution and noise), ie ignoring uv sampling,
- consistent interface with the casa_cube python package to compare observations with models
- read and plot dust models, including Mie, DHS and aggregates dust properties calculations
- (TBD) direct interface to the ML chemical predictions
## Installation
### Using pip
```
pip install pymcfost
```
### From the git repo
```
git clone https://github.com/cpinte/pymcfost.git
cd pymcfost
pip install .
```
To install in developer mode: (i.e. so that code changes here are immediately available without needing to repeat the above step):
```
pip install -e .
```
## History
In case you are curious, pymcfost was born as an attempt to port in python the functions that were available in the yorick-mcfost code, which is still available here: https://github.com/cpinte/yomcfost.
The fitting routines of the yorick interface are yet to be ported into pymcfost.
An alternative python distribution is available at https://github.com/swolff9/mcfost-python . It is more tailored towards handling large grid of models and model fitting.
## Main structural differences with mcfost-python so far
- python >= 3.8 vs python 2.x
- only parameter file >= 3.0
- handles parameter files with mutiple zones, dust population, molecules, stars, etc. Parameter files are stored in objects rather than dicts, allowing more flexibility.
- does not and will not handle observational data, only models