Git Product home page Git Product logo

metaldisc's Introduction

Forward modelling of galaxy metallicity profiles

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.

Installation

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.

Examples of use

In the example directory, there are two scripts:

  • fit_from_sfrmap.py - shows how to fit the example data
  • model_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.

Citing

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.

GNU GPL v3

License: GPL v3

metaldisc's People

Contributors

cartondj avatar jbrinchmann avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.