Metadata-Version: 2.1
Name: astroglam
Version: 0.0.11
Summary: A code to derive the ISM properties of galaxies
Home-page: https://github.com/lvallini/
Author: Livia Vallini
Author-email: Livia Vallini <livia.vallini@inaf.it>
Project-URL: Homepage, https://github.com/lvallini/MCMC_galaxyline_analyzer
Project-URL: Issues, https://github.com/lvallini/MCMC_galaxyline_analyzer
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.9, <4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: contourpy>=1.2.0
Requires-Dist: corner>=2.2.2
Requires-Dist: cycler>=0.11.0
Requires-Dist: emcee>=3.1.6
Requires-Dist: fonttools>=4.51.0
Requires-Dist: h5py>=3.11.0
Requires-Dist: kiwisolver>=1.4.4
Requires-Dist: matplotlib>=3.9.2
Requires-Dist: numpy<2.0
Requires-Dist: packaging==24.1
Requires-Dist: pillow>=10.4.0
Requires-Dist: pip>=24.2
Requires-Dist: PyNeb>=1.1.16
Requires-Dist: pyparsing>=3.1.2
Requires-Dist: python-dateutil>=2.9.0.post0
Requires-Dist: scipy>=1.13.1
Requires-Dist: setuptools>=59
Requires-Dist: six>=1.16.0
Requires-Dist: tornado>=6.4.1
Requires-Dist: unicodedata2>=15.1.0
Requires-Dist: wheel>=0.44.0
Requires-Dist: tqdm>=4.66.5

# General purpose and references

<a href='https://github.com/lvallini/MCMC_galaxyline_analyzer'>In this repository</a> you can find the Python code that will allow you to derive the gas density, metallicity, and deviations from the Kennicutt-Schmidt relation of a galaxy with known star formation rate surface density (Sigma_SFR) and [CII] and [OIII] surface brightness. 

Details on the rationale, the model implementation, and on the equations are discussed in the following papers:
 
  - <a href="https://ui.adsabs.harvard.edu/abs/2021arXiv210605279V/abstract">Vallini et al. 2021</a>
  - <a href="https://ui.adsabs.harvard.edu/abs/2020MNRAS.495L..22V/abstract">Vallini et al. 2020</a> 
  - <a href="https://ui.adsabs.harvard.edu/abs/2019MNRAS.489....1F/abstract">Ferrara et al. 2019</a> 

# The repository contains the following files:

- <a href='https://github.com/lvallini/MCMC_galaxyline_analyzer/blob/main/ExampleNotebook-v2.ipynb'> ExampleNotebook-v2.ipynb</a>, a Jupyter Notebook exemplifying how to set your input data, run the MCMC model, and plot the resulting likelihood distribution for the gas density, gas metallicity, and deviation from the Kennicutt-Schmidt relation.

- <b> cooling_rates.py, emission_models.py, empirical.py, ion_structure.py </b> gather all the analytical equations (mostly from Ferrara et al. 2019) for the calculation of the [CII] and [OIII] surface brightnesses.

- <b> MCMC_routines.py </b> gathers all the routines related to the implementation of the Markov Chain Monte Carlo algorithm.

You can clone (or download) the entire repository and try the model with input data and priors of your choice.

# Requirements
The code runs in Python 3.0. The modules **require** numpy, scipy, matplotlib, <a href="https://github.com/Morisset/PyNeb_devel">Pyneb</a>, 
<a href='https://emcee.readthedocs.io/en/stable'>emcee</a>,  <a href="https://corner.readthedocs.io/en/latest/index.html">corner</a>.

The codes can also run in Python 2.7. Tested with emcee==3.0.2

## Acknowledging this code in Scientific Publications

<div class="row codice">
<pre><code><span>@ARTICLE{Ferrara:2019,
       author = <span>{</span> {Ferrara}, A. and {Vallini}, L. and {Pallottini}, A. and {Gallerani}, S. and {Carniani}, S.
                 and {Kohandel}, M. and {Decataldo}, D. and {Behrens}, C.},
        title = "{A physical model for [C II] line emission from galaxies}",
      journal = {\mnras},
         year = 2019,
        month = oct,
       volume = {489},
       number = {1},
        pages = {1-12},
          doi = {10.1093/mnras/stz2031},
archivePrefix = {arXiv},
       eprint = {1908.07536},
 primaryClass = {astro-ph.GA},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2019MNRAS.489....1F},
   }</span></code>
</pre>
</div>


<div class="row codice">
<pre><code><span>@ARTICLE{Vallini2021,
       author = <span>{</span>{Vallini}, L. and {Ferrara}, A. and {Pallottini}, A. and {Carniani}, S. and {Gallerani}, S.},
        title = "{High [OIII]/[CII] surface brightness ratios trace early starburst galaxies}",
      journal = {arXiv e-prints},
     keywords = {Astrophysics - Astrophysics of Galaxies},
         year = 2021,
        month = jun,
          eid = {arXiv:2106.05279},
        pages = {arXiv:2106.05279},
archivePrefix = {arXiv},
       eprint = {2106.05279},
 primaryClass = {astro-ph.GA},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2021arXiv210605279V},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System},
}</span></code>
</pre>
</div>

## Funding
This work is supported by the ERC Advanced Grant INTERSTELLAR H2020/740120 (PI: Ferrara). 

Part of the work of LV has been supported by funding from the EU Horizon 2020 research and innovation program under the Marie Sklodowska-Curie Grant agreement No. 746119. 

