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
Hashes for dysmalpy-2.0a2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6fcfa94f273990902ebbd1241c9b69166bbaf119a5e27dd3efdd04fc8dfe122 |
|
MD5 | c320994709b6c11b87bd80a07cc9b27c |
|
BLAKE2b-256 | 4ca0d1bf709e2a226d99609ae980d53e8a80b4eddd47e4f0d1b5a632229fafad |
Hashes for dysmalpy-2.0a2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 168af0abde70def1a5578ccf2b389560f0c5c9c8a9b4a461b6d6de7bc3f24c6d |
|
MD5 | d2ce60814466aa14e816fa1933801f40 |
|
BLAKE2b-256 | feadff3bd327ba5ab75184bca4b98e5b92af1293e6c607231c0b6dba8e811f44 |