Skip to content
/ martini Public
forked from kyleaoman/martini

Mock spatially resolved spectral line observations of simulated galaxies. Documentation:

License

Notifications You must be signed in to change notification settings

teuben/martini

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

Overview

MARTINI is a modular package for the creation of synthetic resolved HI line observations (data cubes) of smoothed-particle hydrodynamics simulations of galaxies. The various aspects of the mock-observing process are divided logically into sub-modules handling the data cube, source, beam, noise, spectral model and SPH kernel. MARTINI is object-oriented: each sub-module provides a class (or classes) which can be configured as desired. For most sub-modules, base classes are provided to allow for straightforward customization. Instances of each sub-module class are then given as parameters to the Martini class. A mock observation is then constructed by calling a handful of functions to execute the desired steps in the mock-observing process.

The package is functional and (an old version) has been used in this paper. Stable releases are available via PyPI (pip install astromartini) and the numbered branches on github. The github master branch is under active development: things will change, bugs will happen. Any feedback is greatly appreciated.

MARTINI does not support use with python2.

See the help for martini.Martini for an example script to configure MARTINI and create a datacube. This example can be run by doing:

python -c "from martini import demo; demo()"

Martini has (so far) been successfully run on the output of these simulations:

  • EAGLE
  • APOSTLE
  • C-EAGLE/Hydrangea
  • Illustris
  • IllustrisTNG
  • Augiga
  • MaGICC (and therefore in principle NIHAO)
  • Magneticum

I attempt to support publicly available simulations with a customized source module. If your simulation is public and not supported, please contact me at the address below. Currently custom source modules exist for:

If your use of MARTINI leads to a publication, please acknowledge this and link to the github page, ideally specifying the version used (git commit ID or version number). Suport available via koman@astro.rug.nl.

Installation Notes

The easiest way to install martini is from PyPI by doing python3 -m pip install astromartini; python2 is not supported. Output to .fits files is supported by default; if output to .hdf5 format is desired use python3 -m pip install astromartini[hdf5_output] instead. This will also handle the installation of the required dependencies. However, some optional features require additional dependencies hosted on github, and PyPI does not allow installing these automatically. In particular, EAGLE and Illustris/TNG users who wish to use the custom source modules for those simulations in Martini must install from github (see below) to automatically install the optional dependencies. Or, it is also possible to install from PyPI and then manually install the optional dependencies.

Installation by doing python setup.py install is not recommended.

Installing from github

Choose a branch. The numbered branches (e.g. 1.0.X) are stable, while the master branch is actively developed. The latest numbered branch is usually the best choice. From the branch page (e.g. https://github.com/kyleaoman/martini/tree/1.0.X), click the green 'Clone or download' button and follow instructions to obtain the files. Unpack the zip file if necessary. You should then be able to do python3 -m pip install martini/[optional], where optional should be replaced by a comma separated list of optional dependencies. If this fails check that martini/ is a path pointing to the directory containing the setup.py file for Martini. The currently available options are:

  • hdf5_output: Supports output to hdf5 files via the h5py package. Since h5py is hosted on PyPI, this option may be used when installing via PyPI.
  • eaglesource: Dependencies for the EAGLESource module, which greatly simplifies reading input from EAGLE simulation snapshots. Installs my Hdecompose package, providing implementations of the Rahmati et al. (2013) method for computing netural hydrogen fractions and the Blitz & Rosolowsky (2006) method for atomic/molecular fractions. Also installs John Helly's read_eagle package for quick extraction of particles in a simulation sub-volume. Unfortunately this requires a C compiler which can find an installation of the hdf5 libraries.
  • tngsource: Dependencies for the TNGSource module, which greatly simplifies reading input from IllustrisTNG (and original Illustris) snapshots. Installs my Hdecompose package, providing implementations of the Rahmati et al. (2013) method for computing netural hydrogen fractions and the Blitz & Rosolowsky (2006) method for atomic/molecular fractions.
  • sosource: Dependencies for the SOSource module, which provides unofficial support for several simulation datasets hosted on specific systems. This is intended mostly for my own use, but APOSTLE, C-EAGLE/Hydrangea and Auriga users may contact me for further information.

About

Mock spatially resolved spectral line observations of simulated galaxies. Documentation:

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%