Generate astronomical synthetic observations from the command-line
Project description
Generate synthetic observations from 3D numerical simulations
Synthesizer is a program to calculate synthetic images from either analytical models or hydrodynamical simulations (both grid and particle based). You can use Synthesizer via API and CLI. Command-line interaction offers a fast way to test your modelling setup, without the need to write any scripts. API interaction comes in handy during the production phase. Its modular form allows to easily script a full modelling pipeline by simply calling the relevant modules of Synthesizer. Pipelines templates are included within the examples/ source directory.
For the post-processing of particle based simulations, Synthesizer interpolates particle positions into a rectangular grid and then performs Monte-Carlo heating and raytracing, using the RADMC3D radiative transfer code. It can also optionally use the CASA software to generate a final synthetic observation of your model.
Polarization effects, either by scattering or grain alignment, can easily be added to your setup.
Additionally, Synthesizer includes the DustMixer module. This is a tool to
easily generate dust opacity tables for a given dust composition, supporting
full scattering matrices for polarization observations.
This module serves as a testing tool to experiment mixing different materials
and different laboratory measurements of optical constants.
Installation
$ pip install astro-synthesizer
Run the code:
Synthesizer requires at least one of its five main options to run:
$ synthesizer
[synthesizer] Nothing to do. Main options: --grid, --opacity, --monte-carlo, --raytrace or --synobs
[synthesizer] Run synthesizer --help for details.
Example
Create a protoplanetary disk model, containing dust grains of DSHARP composition, let RADMC3D generate an image and then let CASA observe it (the order of command- line arguments is irrelevant).
$ synthesizer --grid --model ppdisk --temperature --raytrace --synobs
--opacity --material dsharp --show-grid-2d --show-opac --show-rt --show-synobs
Given the optional --show-* flags, synthesizer will plot the results of every step. You can also read in snapshots from an SPH simulation:
$ synthesizer --grid --sphfile snapshot_001.h5 --source gizmo
--show-grid-2d --show-grid-3d --raytrace --synobs
--opacity --show-rt --show-synobs
Already existing results can also be displayed without having to re-run a full step, using commands like
$ synthesizer --show-rt --show-synobs --show-opac --show-grid-2d --show-mc-3d
Example API implementations and modelling pipelines are distributed within the source code and can be found in the examples/ directory.
For details, run:
$ synthesizer --help
Note on 3D visualization
Synthesizer uses the Mayavi library for visualization and rendering of 3D data. Mayavi's current latest version presents issues on installation via pip and therefore breaks Synthesizer's installation. If you intend to use the --show-grid-3d or --show-mc-3d options, please install mayavi manually from the following source:
$ pip install https://github.com/enthought/mayavi/zipball/master
Compatibility with hydrodynamical codes
The coupling of hydrodynamical codes from different origins is now implemented in Synthesizer using the snapshot readers from the YT Python project. If your code is supported by YT, then it works with Synthesizer (beta).
Synthesizer does currently only work with Cartesian grids. Implementation of spherical grids is currently under development.
For particularly customized hydro readers, use the --source option (or source function argument in you call to the create_grid module).
If your code is not currently supported and you are interested in using this tool, feel free to get in touch.
Requisites:
Software: python3, RADMC3D, CASA, Mayavi/ParaView (optional)
Feedback
If you find any bugs or have any feedback, please feel free to reach out at joaquin.zamponi@gmail.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file astro-synthesizer-1.0.2.tar.gz
.
File metadata
- Download URL: astro-synthesizer-1.0.2.tar.gz
- Upload date:
- Size: 114.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee95448585ff78e74a3352298dd21713593998f26c72f56cac32bf0df36e8dbb |
|
MD5 | 0bd0cdd641980c34f0f8d3074a627926 |
|
BLAKE2b-256 | 0b3ae674ba4695ac03476da992e24f03e20179c1d796128184eaf16b33a6bdfc |
File details
Details for the file astro_synthesizer-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: astro_synthesizer-1.0.2-py3-none-any.whl
- Upload date:
- Size: 114.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d0cbc8574ef56c7ab0ecbc1db028d96126137aecf0419f5e29e14e054298797 |
|
MD5 | 47ffe1ba0f02328cd26801150577405b |
|
BLAKE2b-256 | 45a06cee0bcc131666cc1993c77d9196ee1a50ece50f44355ec39e944b756d1b |