Skip to main content

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.

Metadata

Release files for astro-synthesizer 1.0.2

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

Source distribution (sdist)

Source distribution for astro-synthesizer 1.0.2
File Size Uploaded Provenance Actions
astro-synthesizer-1.0.2.tar.gz 114.8 kB Without provenance Details for astro-synthesizer-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for astro-synthesizer 1.0.2
File Interpreter ABI Platform Actions
astro_synthesizer-1.0.2-py3-none-any.whl Python 3 none any Details for astro_synthesizer-1.0.2-py3-none-any.whl

Total release size: 228.8 kB

Release files / astro-synthesizer-1.0.2.tar.gz

Download URL astro-synthesizer-1.0.2.tar.gz
Size 114.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ee95448585ff78e74a3352298dd21713593998f26c72f56cac32bf0df36e8dbb
BLAKE2b-256 checksum
How to use checksums
0b3ae674ba4695ac03476da992e24f03e20179c1d796128184eaf16b33a6bdfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / astro_synthesizer-1.0.2-py3-none-any.whl

Download URL astro_synthesizer-1.0.2-py3-none-any.whl
Size 114.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d0cbc8574ef56c7ab0ecbc1db028d96126137aecf0419f5e29e14e054298797
BLAKE2b-256 checksum
How to use checksums
45a06cee0bcc131666cc1993c77d9196ee1a50ece50f44355ec39e944b756d1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Security for astro-synthesizer 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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