gc-gmics

Reduced data and scripts to reproduce the figures in the study of globular clusters using genetically modified galaxy merger histories

https://github.com/musical-neutron/gc-gmics

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 24 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.4%) to scientific vocabulary

Keywords

astronomy-astrophysics astronomy-software dataset galaxies globular-clusters
Last synced: 4 months ago · JSON representation ·

Repository

Reduced data and scripts to reproduce the figures in the study of globular clusters using genetically modified galaxy merger histories

Basic Info
  • Host: GitHub
  • Owner: Musical-Neutron
  • License: gpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 259 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 2
Topics
astronomy-astrophysics astronomy-software dataset galaxies globular-clusters
Created almost 3 years ago · Last pushed 5 months ago
Metadata Files
Readme License Citation

README.md

Plotting scripts for the genetically modified merger history study of globular clusters

DOI Build and test

Last reviewed: v1.0.1

A set of scripts and a repository of reduced data to reproduce the figures in the study of globular cluster (GC) formation, evolution, and destruction using genetically modified initial conditions (O. Newton et al., 2025).

This README file is located in the root directory of the plotting scripts package. All plotting scripts should be executed from here.

1.0 Installation

1.1 Pre-installation dependencies

This package uses the cairo graphics library. In particular, as of this release it requires

bash cairo >= 1.15.10

For relevant information about the current cairo dependencies please review the Pycairo package documentation.

In most cases cairo can be installed using:

Ubuntu

bash (sudo) apt-get update (sudo) apt-get install libcairo2-dev pkg-config

macOS

bash brew install cairo pkg-config

1.2 Package installation

Once you have installed cairo, this plotting package can be installed by cloning it from the github repository:

bash git clone git@github.com:Musical-Neutron/gc-gmics.git

It is recommended to create a clean virtual environment prior to installation. Once that is done the github repository can be installed by running the following:

bash cd gc-gmics pip install .

1.3 Tests

If you plan to review the package test suite, run the following from the package root directory:

bash pip install .[test] pytest

2.0 Configuration (settings.yaml)

Key settings in the repository are configured using the settings.yaml file. Some relevant settings are discussed below.

2.1 Core configuration

  • Data Management:

    • data_dir defines the base directory where relevant data are stored.
    • Relevant observational data sets, set under Observations, are also stored in data_dir.
  • Analysis settings:

    • gc_mass sets the minimum globular cluster mass, in units of solar masses.
    • cluster_mass_limit sets the mass (in solar masses) below which clusters are not tracked. The default reflects the settings with which the simulations were run.

2.2 Output control

  • Printing

    • print_property_list specifies which properties will appear in terminal outputs when called by printpaperresults.py. The full list of available properties is provided in Property dictionary.
  • Plotting

    • individual_panels specifies whether figure panels will also be created and saved as independent figures alongside the main ones. Default: False.

2.3 Visualisation

In addition to providing a complete list of available galaxy properties, the Property dictionary controls plot formatting:

  • ylim sets the y-axis lower and upper limits. ~ is parsed as None when the settings are read.
  • yscale sets the scale of the y-axis (linear or log-scale).
  • ylabel enables the customisation of the y-axis label. LaTeX can be provided if the appropriate packages are installed.
  • printlabel specifies how this property will appear when printed to screen.

Changes to settings.yaml are read at script runtime.

3.0 Scripts

There are seven scripts that can be executed independently:

Script name | Figure | Description :--- | :---: | :--- fig02keygalaxyproperties.py | Fig. 2 | Plots the halo mass, M200; stellar mass, M; and mass in GCs, *MGC vs. lookback time, tlb fig03gasbhproperties.py | Fig. 3 | Plots the star formation rate, SFR; mass of star-forming gas, MSF; and the central black hole mass, MSMBH vs. tlb. fig04z0massfunction.py | Fig. 4 | Plots the z=0 and birth mass functions of all clusters that survive to z=0. Note that the latter is averaged over time and is not equivalent to the initial cluster mass function. fig05ratesofchange.py | Fig. 5 | Plots the GC formation rate, GCFR; GC destruction rate, GCDR; and the net change in GC mass, dMGC/dt vs. tlb. fig0607gcproperties.py | 6 & 7 | Plots the stellar and GC birth pressures; Mc,*; and the cluster formation efficiency, $\Gamma$ vs. tlb. Also plots the specific frequency, TN; and the specific mass, SM vs. tlb. fig08fhalo.py | Fig. 8 | Plots the fraction of mass in halo stars contributed by the destruction of star clusters. printpaperresults.py | | Prints information relevant to the paper to stdout.

There is also a master script, runallscripts.py, that will run all of the above scripts when executed. This produces .svg and .pdf versions of each figure in the paper.

3.1 Supplementary scripts

4.0 Data

The data directory contains all files necessary to reproduce the figures in the paper. There are nine files containing reduced data from the simulations produced for this work, and seven files containing relevant observational data:

4.1 Simulation data

The following files contain data from simulations produced in this work.

File name | Figures needed for :--- | :--- suppressedmgc100000_data.hdf5 | All except Figs 4 & 8 organicmgc100000_data.hdf5 | All except Figs 4 & 8 enhancedmgc100000_data.hdf5 | All except Figs 4 & 8 suppressednoBHmgc100000data.hdf5 | Fig. 3 organicnoBHmgc100000data.hdf5 | Fig. 3 enhancednoBHmgc100000data.hdf5 | Fig. 3 suppressedz0gc_properties.hdf5 | Figs 4 & 8 organicz0gc_properties.hdf5 | Figs 4 & 8 enhancedz0gc_properties.hdf5 | Figs 4 & 8

4.2 Observational data

File name | Figures needed for | Citation | Notes :--- | :---: | :--- | :--- caldwell2009old_clusters.csv | Fig. 4 | Caldwell et al. (2009) caldwell2009intermediate_clusters.csv | Fig. 4 | Caldwell et al. (2009) caldwell2009young_clusters.csv | Fig. 4 | Caldwell et al. (2009) caldwell2011logMstar_FeH.csv | Fig. 4 | Caldwell et al. (2011) baumgardt2019mw_gcs.csv | Fig. 4 | Baumgardt et al. (2019) | Data retrieved from https://people.smp.uq.edu.au/HolgerBaumgardt/globular/. hunt2024NMbins.csv | Fig. 4 | Hunt et al. (2024, fig. 17) horta2021fGC.csv | Fig. 8 | Horta et al. (2021)

5.0 Citations

This code and the accompanying data are freely available.

5.1 If you use this code or derivative work

5.2 If you use these data, a derivative work, or results thereof

6.0 Contact

If you have any questions or would like help in using the scripts, please email:

onewton 'at' cft.edu.pl

Owner

  • Name: Oliver Newton
  • Login: Musical-Neutron
  • Kind: user
  • Location: Warsaw, Poland
  • Company: Center for Theoretical Physics, Polish Academy of Sciences

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: gcgmics
message: >-
  If you use this code or data, please cite both the article
  from preferred-citation and the code itself.
type: software
authors:
  - given-names: Oliver
    family-names: Newton
    email: onewton@cft.edu.pl
    orcid: 'https://orcid.org/0000-0002-2769-9507'
    affiliation: >-
      Center for Theoretical Physics, Polish Academy of
      Sciences
identifiers:
  - type: doi
    value: 10.5281/zenodo.16614763
    description: Data and code repository
  - type: doi
    value: 10.1093/mnras/staf1226
    description: Journal article
  - type: url
    value: 'https://arxiv.org/abs/2409.04516'
    description: arXiv
repository-code: 'https://github.com/Musical-Neutron/gc-gmics'
abstract: >-
  A repository of reduced data and scripts to reproduce the
  figures in the paper referred to above.
keywords:
  - astronomy
  - globular cluster
license: GPL-3.0
version: 1.0.0
date-released: '2025-07-30'
preferred-citation:
  authors:
    - family-names: Newton
      given-names: Oliver
      orcid: 'https://orcid.org/0000-0002-2769-9507'
    - family-names: Davies
      given-names: Jonathan J.
      orcid: 'https://orcid.org/0000-0002-8337-3659'
    - family-names: Pfeffer
      given-names: Joel L.
      orcid: 'https://orcid.org/0000-0003-3786-8818'
    - family-names: Crain
      given-names: Robert A.
      orcid: 'https://orcid.org/0000-0001-6258-0344'
    - family-names: Kruijssen
      given-names: J. M. Diederik
      orcid: 'https://orcid.org/0000-0002-8804-0212'
    - family-names: Pontzen
      given-names: Andrew
      orcid: 'https://orcid.org/0000-0001-9546-3849'
    - family-names: Bastian
      given-names: Nate
  identifiers:
    - type: doi
      value: 10.1093/mnras/staf1226
      description: Journal article concerning this repository
  title: 'The formation and disruption of globular cluster populations in simulations of present-day L* galaxies with controlled assembly histories'
  journal: 'Monthly Notices of the Royal Astronomical Society'
  year: 2025
  type: article

GitHub Events

Total
  • Release event: 2
  • Watch event: 1
  • Delete event: 1
  • Push event: 8
  • Pull request event: 2
  • Create event: 2
Last Year
  • Release event: 2
  • Watch event: 1
  • Delete event: 1
  • Push event: 8
  • Pull request event: 2
  • Create event: 2

Dependencies

.github/workflows/dependabot-reviewer.yml actions
  • dependabot/fetch-metadata v1 composite
.github/workflows/test_repo.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v3 composite
  • actions/upload-artifact v4 composite
pyproject.toml pypi