Skip to main content

diffstar

Code documentation can be found at diffstar.readthedocs.io.

Installation

The latest release of diffstar is available for installation with either pip or conda-forge:

$ conda install -c conda-forge diffstar

Alternatively, to install diffstar into your environment from the source code:

$ cd /path/to/root/diffstar
$ pip install .

Environment configuration

For a typical development environment with conda-forge:

$ conda create -c conda-forge -n diffit python=3.11 numpy numba flake8 pytest jax ipython jupyter matplotlib scipy h5py diffmah diffstar

Project data

Data for this project can be found at this URL.

Scripts and demo notebooks

The demo_diffstar_sfh.ipynb notebook in the docs folder illustrates how to use the Diffstar model for individual SFH, and how to generate the SFH of a population of galaxies using DiffstarPop.

The demo_diffmahpop_diffstarpop_sfh.ipynb notebook illustrates how to generate a subhalo catalog, and how to generate SFHs for each halo using parameters that reproduce UniverseMachine, IllustrisTNG or Galacticus.

See diffstar_fitting_script_umachine_mgash.py for an example of how to fit the SFHs of a large number of simulated galaxies in parallel with mpi4py.

The diffstar_fitter_demo.ipynb notebook demonstrates how to fit the SFH of a simulated galaxy with a diffstar approximation.

See fit_mstar_ssfr_pdfs_mgash.py for an example of how to use DiffstarPop to fit a set of Mstar and sSFR PDFs, and measure_smhm_smdpl_script_mpi_mgash.py for an example of how to generate the target data from a set of Diffstar fits.

Citing diffstar

The Diffstar paper has been published in Monthly Notices of the Royal Astronomical Society. Citation information for the paper can be found at this ADS link, copied below for convenience:

@ARTICLE{2023MNRAS.518..562A,
       author = {{Alarcon}, Alex and {Hearin}, Andrew P. and {Becker}, Matthew R. and {Chaves-Montero}, Jon{\'a}s},
        title = "{Diffstar: a fully parametric physical model for galaxy assembly history}",
      journal = {MNRAS},
     keywords = {galaxies: evolution, galaxies: fundamental parameters, galaxies: star formation, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics},
         year = 2023,
        month = jan,
       volume = {518},
       number = {1},
        pages = {562-584},
          doi = {10.1093/mnras/stac3118},
archivePrefix = {arXiv},
       eprint = {2205.04273},
 primaryClass = {astro-ph.GA},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2023MNRAS.518..562A},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Metadata

Release files for diffstar 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diffstar 1.0.3
File Size Uploaded
diffstar-1.0.3.tar.gz 252.4 kB Details

Release files / diffstar-1.0.3.tar.gz

Download URL diffstar-1.0.3.tar.gz
Size 252.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0c4604f6247feab57b1b92dfee1760aa54c90a21b468dac4d43acb34b1f3ba64
BLAKE2b-256 checksum
How to use checksums
f5186251d39d1c66491afdca242003c848593e14e4e55f0feb703c0c6e9ab25c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page