perwin / db-nr_paper

Files and Jupyter notebooks for paper on frequency and sizes of double bars and nuclear rings in local barred galaxies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Public data, code, and notebooks for paper analyzing inner bars and nuclear rings

This git repository contains data files, Python code, and Jupyter notebooks (for Python and R) which can be used to reproduce figures and analyses from the paper "The Frequency and Sizes of Inner Bars and Nuclear Rings in Barred Galaxies and Their Dependence on Galaxy Properties" (Erwin, 2023, Monthly Notices of the Royal Astronomical Society, in press; arXiv:2312.12893).

Trends

Left: fractions of S0-Sd galaxies with inner bars (black squares) or nuclear rings (open blue circles), counting all barred galaxies (top) or barred + unbarred galaxies (bottom; red circles = fraction of galaxies with bars). Right: Trends in bar semi-major axis versus galaxy stellar mass.

DOI

Data

The following data files are included:

  • table_mainsample.dat -- General galaxy and bar data for full (155-galaxy) sample of barred galaxies (the full version of Table 1 in the paper)

  • table_innerbars.dat -- Measurements of inner bars in double-barred galaxies (the full version of Table 2 in the paper)

  • table_nuclearrings.dat -- Measurements of nuclear rings (the full version of Table 3 in the paper)

  • table_unbarred_info.dat -- Minimal data for unbarred galaxies in parent sample

  • s4gbars_table.dat -- data for 1322 individual galaxies in the Parent Disc Sample of Erwin (2018; used for Figs. 9 and 10)

Dependencies

The Python code and notebooks require the following external Python modules and packages, all of which are available on PyPI and can be installed via pip:

Jupyter Notebooks

There are three Jupyter notebooks:

  • figures_for_paper.ipynb -- Python notebook; generates the figures for the paper

  • fits_for_paper.ipynb -- Python notebook; computes best-fit parameters, AIC values, uncertainties for various fits

  • logistic_fits_r.ipynb -- R notebook; performs logistic fits for DB and NR presence as functions of stellar mass and/or bar size

Python Code

  • datautils.py, dbnr_utils.py, fitting_barsizes.py, plotutils.py -- miscellaneous utility functions for reading data tables, performing fits, and generating figures.

How to Generate Figures and Analyses from the Paper

  1. Download this repository.

  2. Edit paths in the notebooks so they point to the correct locations, if necessary. See notes in the initial cells of the notebooks; the main variable you will probably need to edit is plotDir in the second cell of figures_for_paper.ipynb, which is where saved PDF figures should go. Also make sure to set savePlots = True if you want the PDF files to actually be generated (the default is False, which means the figures will appear in the notebook but won't be saved to disk).

  3. Run the notebook figures_for_paper.ipynb to generate the figures.

  4. Run the notebook fits_for_paper.ipynb if you wish to do the fits for inner-bar and nuclear-ring sizes as functions of galaxy stellar mass and/or outer/main bar size.

  5. Run the notebook logistic_fits_r.ipynb if you wish to do the logistic regression for inner-bar and nuclear-ring presence as functions of galaxy stellar mass and/or outer/main bar size.

Licensing

Code in this repository is released under the BSD 3-clause license.

Creative Commons License
Text and figures are licensed under a Creative Commons Attribution 4.0 International License.

About

Files and Jupyter notebooks for paper on frequency and sizes of double bars and nuclear rings in local barred galaxies.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Jupyter Notebook 94.6%Language:Python 5.4%