This code provides a method for recovering gas-phase metallicity gradients from integral field spectroscopic (IFS) observations of barely resolved galaxies.
The approach here is based on [Carton et al. 2017](https://ui.adsabs.harvard.edu/abs/2017MNRAS.468.2140C and employs a forward modelling approach to fit the observed spatial distribution of emission-line fluxes, accounting for the degrading effects of seeing and spatial binning. The method is flexible and is not limited to particular emission lines or instruments, nor one set specific set of photoionization models.
While this model can be fit in many ways, we adopt a Bayesian approach with a robust likelihood.
It is advisable to install this in a separate virtual environment. The code currently requires
numpy
scipy
pymultinest
h5py
astropy
and it is advisable to also install matplotlib
and getdist
for visualisation and
jupyter
to use the notebooks and nbconvert
to ensure the notebook
is possible to run on other installations.
If you use conda
, a possible installation method would be
> conda create -n metaldisc matplotlib numpy scipy h5py astropy jupyter nbconvert pip
<... Various output ...>
> conda activate metaldisc
> pip install pymultinest
> pip install getdist
> git clone https://github.com/jbrinchmann/metaldisc.git
> cd metaldisc
> pip install .
OR
> pip install -e .
Note in particular that pymultinest
and getdist
are most easily
installed using pip
so that is what is indicated here.
In the example
directory, there are two scripts:
fit_from_sfrmap.py
- shows how to fit the example datamodel_from_sfrmap.py
- provides a visualisation of the model output
The example
directory also contains two notebook versions of
this. The fitting notebook uses getdist
to
visualise the results in contrast to fit_from_sfrmap.py
which uses
the code distributed with pymultinest
.
If you use this code, you should cite Carton et al. 2017, where the method is explained.
You may also wish to cite Carton et al. 2018, where we provide further discussion and improvements.