A modelling and fitting package for galaxy kinematics.
Project description
Dynamical Simulation and Modeling Algorithm
DYSMALPY website: https://www.mpe.mpg.de/resources/IR/DYSMALPY/
DysmalPy (DYnamical Simulation and Modelling ALgorithm in PYthon) is a Python-based forward modeling code designed for analyzing galaxy kinematics. It was originally inspired by Reinhard Genzel’s DISDYN program (e.g., Tacconi et al. 1994), has been developed and is maintained at the Max Planck Institute for Extraterrestrial Physics (MPE). It extends the IDL-based DYSMAL fitting models introduced and thoroughly tested in previous works (Davies et al. 2004a; Davies et al. 2004b; Cresci et al. 2009; Davies et al. 2011) as well as subsequent improvements described by Wuyts et al. 2016; Lang et al. 2017; Genzel et al. 2017; Übler et al. 2018. Its Python incarnation and latest developments and testing are presented by Price et al. 2021 and Lee et al. 2024, in prep.
This code employs a set of models that describe the mass distribution and various kinematic components to describe and fit the kinematics of galaxies. Dysmalpy has several features, which include support for multiple halo profiles, flexibility in modeling baryon components such as non-circular higher-order kinematic features, multi-observation fitting, the ability to tie model component parameters together and options for fitting using either least-squares minimization (with MPFIT), Markov chain Monte Carlo (MCMC) posterior sampling (with emcee) or dynamic nested sampling (with Dynesty).
Dysmalpy is specifically designed for the analysis of disk galaxies. The classification of a galaxy as a disk can be made following the set of 5 criteria outlined by Wisnioski et al. 2015; Sect. 4.1, motivated by expectations for ideal rotating disks and increasingly stringent and demanding of the data:
Smooth monotonic velocity gradient across the galaxy, defining the kinematic axis;
Centrally peaked velocity dispersion distribution with maximum at the position of steepest velocity gradient, defining the kinematic center;
Dominant rotational support, quantified by the ratio of \(v_{rot}/\sigma_0>1\);
Coaligned morphological and kinematic major axes;
Spatial coincidence of kinematic and morphological centers.
In practice, the first three criteria are essential. Importantly, in the context of the disk framework, the velocity dispersion \(\sigma_0\) used for this classification denotes the random motions within the disk component (corrected for spectral and spatial resolution), which relate to its geometrical thickness.
Dysmalpy is parametric in nature, allowing the direct fitting of the intrinsic galaxy properties, exploration of mass decomposition, dark matter fractions, and assessment of parameter degeneracies and associated uncertainties. This stands in contrast to a non-parametric kinematic fitting approach, which requires additional steps for interpreting recovered intrinsic galaxy kinematic properties.
The forward modeling process involves simulating the mass distribution of a galaxy, generating a 3D mock cube capturing composite kinematics, and accounting for observational effects such as beam smearing and instrumental line broadening. The model cube can be directly compared to the datacube in 3D, but it can also be compared to 1D or 2D kinematic observations by extracting the corresponding one or two-dimensional profiles following the same procedure that was used on the observed data. For detailed information, refer to the Appendix in Price et al. 2021 as well as Lee et al. 2024, in prep.
Dependencies
python (version >= 3.10)
numpy (version >= 1.24.3)
scipy (version >=1.9.3)
matplotlib
pandas
ipython
defaults
pytest
multiprocess
astropy (version >= 5.3)
multiprocess
emcee (version >= 3)
dynesty (version >= 2.1.3)
corner (version >= 2.2.2)
cython
dill (version >= 0.3.7)
photutils (version >= 1.8.0)
shapely (version >= 2)
spectral-cube (version >= 0.6.0)
radio-beam (version >= 0.3.3)
h5py (version >= 3.8.0)
six
Installation
To install DYSMALPY, please follow the instructions in the installation instructions file.
Usage
The overall basic usage of DYSMALPY can be summarized as follows:
1) Setup steps: Import modules, set paths, define global constants and variables.
2) Initialize: Create a galaxy object with its corresponding parameters, add the model set (disk, bulge, DM halo, etc), set up the observation and instrument information.
3) Fitting: Perform fitting/bayesian sampling in either 1D, 2D, or 3D using either MPFIT, MCMC or dynamic nested sampling.
4) Assess: Visualise, assess fit, and fine-tune the fitting.
We strongly recommend following and understanding the tutorials section of the main website. Alternatively, you can run and familiarize yourself with the jupyter notebooks in the notebooks folder (these will be included in your installation of dysmalpy under examples/notebooks).
Contact
If you have any questions or suggestions, please contact the developers at dysmalpy@mpe.mpg.de.
License
This project is Copyright (c) MPE/IR-Submm Group. For the complete license and referencing information, please see the the LICENSE file.
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 Distributions
File details
Details for the file dysmalpy-2.0.0.tar.gz
.
File metadata
- Download URL: dysmalpy-2.0.0.tar.gz
- Upload date:
- Size: 40.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 345330918455f10c11afa9cf38e5baecee6955ba493c02d92af6bdf81ceb6786 |
|
MD5 | 761ad8d336819fdfb6af908194f8c203 |
|
BLAKE2b-256 | e767e65d8850da35d4f0af1098554e245d2689680ae86129bbb03fb06b46986c |
File details
Details for the file dysmalpy-2.0.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ec65103b645f2c8d005881e7b8290e98b26d8f2e360203aac596c23a8c82022 |
|
MD5 | adfb78953b89e0b03bb253dc42e5a4ee |
|
BLAKE2b-256 | 7bae3a64c8856f7b138969e41ec0a7f4c15ae5d17f280eaa5522f5b63371f2d4 |
File details
Details for the file dysmalpy-2.0.0-cp312-cp312-manylinux2010_x86_64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp312-cp312-manylinux2010_x86_64.whl
- Upload date:
- Size: 41.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654f0366e8f8e772c0625ed5b482e34818b2cf7a08b2f7730d8ace6fa2f376cf |
|
MD5 | 7177b258e46f1d4a8ecc5b4f20b221b0 |
|
BLAKE2b-256 | 57df65a9d21ed644323ab669a93e3475a8c99f4c930fd864bd5e6625f0fc0bff |
File details
Details for the file dysmalpy-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 43.9 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0df3ff78dfe9ccbb21337555f2a079caad04368a019a8245a6688f4d831f5709 |
|
MD5 | 4e55e93f36b0a67bf2ee59898d1f83eb |
|
BLAKE2b-256 | 1f57fbe70ccf5fc48bae25e6c2c8bbdd299a888572d029c8f8409361a60c1ad3 |
File details
Details for the file dysmalpy-2.0.0-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 44.1 MB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe11cae80bf94f98dadd6af9568ec4437d66c7b8b58cf2c7ec20a0334e3ca21c |
|
MD5 | ae5d6cb9d5d7c75a21c36b6d2683cd7e |
|
BLAKE2b-256 | 90789334ac9742cd466d34a33e0d81d9247e107c3605eebf4396b6a9f10f6650 |
File details
Details for the file dysmalpy-2.0.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad79199aa2d4e5ac557c9504cbf4db8a067527210ecc9c459a8ce262e9b03b1 |
|
MD5 | c160e6210a945f2a09fcce03921be0c5 |
|
BLAKE2b-256 | 09fbca90f49ff9d874750edc243c18c96d3ac3b98c6090e19ef2dacbc8153bf9 |
File details
Details for the file dysmalpy-2.0.0-cp311-cp311-manylinux2010_x86_64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp311-cp311-manylinux2010_x86_64.whl
- Upload date:
- Size: 41.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8016f7550b73e02745d5e8af9b41a77466bec03171dcd5c85c5076bec694a2c2 |
|
MD5 | ccc538004aed1aa9b37da421d17afa9d |
|
BLAKE2b-256 | a98fecf56fefb1aca70c7845e022d227f330aa47a6f0081046d52600ecdcf074 |
File details
Details for the file dysmalpy-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 43.9 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5fbe40778871d3e2ad5077d1b55a0305ae3902f92999e3b5de9d68a5b540156 |
|
MD5 | a1adfc47d432538a76033e89d64a98b7 |
|
BLAKE2b-256 | eb3984d3e9c7bdfa6456d82dcdc13fbb98b4198954cc5216f60e6f217b5569e9 |
File details
Details for the file dysmalpy-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 44.1 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c074fcd31436ddb9f0bd958d5e0b8e8d200eac75747ffd13ea0b9c09e4ce5395 |
|
MD5 | 897d1f3fc877c59824425cc1bee61001 |
|
BLAKE2b-256 | 4abebe0b13c180cd84b306157789b66581c2db15a2bdf32c0b41985f46a43c77 |
File details
Details for the file dysmalpy-2.0.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8ac0d6f737adfe1fbdbf462822fb2d495884785e28193e5f8ef2f94a2eee8cd |
|
MD5 | 0d9d484e04dc44dfd74a1676227ba6eb |
|
BLAKE2b-256 | 63386aee897c18c33b1333a6431aec82ca7fe25d5430f2ccf7919523674528cf |
File details
Details for the file dysmalpy-2.0.0-cp310-cp310-manylinux2010_x86_64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp310-cp310-manylinux2010_x86_64.whl
- Upload date:
- Size: 41.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 389e430573fc6c29ff5afe0670c36a8c92750fbda11073b06287b96576b6b508 |
|
MD5 | 379ca82dc3e823a368b707b120daee8f |
|
BLAKE2b-256 | 24a3a475ceefd21ba4bf0f5072ee402f860c4a31004205e99fb7e32bb81bedea |
File details
Details for the file dysmalpy-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 43.9 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 408d5c86c0c1784c2452e0b1299360a7ad572c63672871ada50eceb9087afa1d |
|
MD5 | edfd30461f89a32e910934d1e0fd9f13 |
|
BLAKE2b-256 | ec5fa0ecdfb2802416bdfaa84db7fe74de72c9afcf97510bffb8f14e62c1ff43 |
File details
Details for the file dysmalpy-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: dysmalpy-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 44.1 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c86bde0552ba2f719b9d10195c79ce83a8f931718abf506af08baaa3a76429b3 |
|
MD5 | 17c4cc02099caa99bfcf96379f21a6c9 |
|
BLAKE2b-256 | a872706435b720d575d8eacf9336c20e78b354153e375439cd8ae5f19e825750 |