Skip to main content

Codes for the paper: Unexpected clustering pattern in dwarf galaxies challenges formation models

Project description

Dwarf Galaxies Adorning the Ink Wash Painting of Cosmic Web

Last commit Workflow Status MIT License PyPI

The package holds the codes for the paper Unexpected clustering pattern in dwarf galaxies challenges formation models (Ziwen Zhang et al. Nature 2025, arXiv:2504.03305).

What did we discover in this work?

A surprising pattern of spatial distribution was discovered in dwarf galaxies that diffuse ones cluster more strongly than compact ones - reversing the trends seen in massive galaxies. This challenges the structure formation models within the standard cold-dark-matter cosmology, calling for revisions for the understanding of the assembly of visible- and dark-matter structures.

Installation

To install the package, run:

pip install dwarf-assembly-bias

Alternatively, you can clone the repository and install the package locally via pip install -e /path/to/the/repo.

Resources for the paper

Code samples

Code samples are organized as individual programs, scripts or jupyter-notebooks, each for a specific procedure in producing the results in the paper. All code samples are put under docs/code_samples/:

  • cal_2pccf/: program for two-point cross-correlation function (2PCCF) in observation.
  • cov_fit.py, fit_bias.py: measuring the covariance matrix and fitting the relative bias.
  • Mhalo.py: HI-based halo mass estimation by assuming Burkert profile.
  • galaxy_web_cross.py: program for galaxy-cosmic web (knots, filaments, sheets and voids) 2PCCFs, for a sample of galaxies with given real-space locations. galaxy_web_cross_from_obs_sample.py: is similar but takes input galaxies in redshift-space and make a correction for the redshift-space distortion before calculating the 2PCCFs.
  • theory.ipynb: theoretical interpretations (galaxy-galaxy 2PCCF in theory, abundance matching, model of self-interaction dark matter).

Data for the figures

Here we provide all the data sheets, and scripts to load the data sheets and generate the figures exactly as those presented in the paper. All of these are held under docs/figures/. Specifically,

  • data/: Excel data sheets, one for each Figure or Extended Data Figure.
  • plots_observation.py: scripts to generate observational figures (Fig. 1 and Extended Data Figs. 1-7).
  • plots_theory.ipynb: scripts to generate theoretical figures (Figs. 2, 3, 4 and Extended Data Fig. 8).

For developers

Contribute to the project

Pull requests are welcome. For any changes, start a pull request to the dev branch and we will review it.

For users

Citation

We ask the users to cite the paper when using the package (code or data) in their research.

Users using specific module/code sample should also follow the copyright header in the source files.

Details of this work

Sample construction

The samples and subsamples of observed dwarf galaxies are described in the main text (Methods: "The sample of dwarf galaxies").

To measure the 2PCCF from observation, two additional sets of samples are constructed:

  • The reference sample, used as field tracers, is a magnitude-limited sample constructed from the NYU-VAGC sample following the following selection criteria described in Sec. 2.1 of Lixin Wang et al. 2019: the $r$-band Petrosian apparent magnitude $r<17.6$; the $r$-band Petrosian absolute magnitude in $[-24, -16]$; the redshift $0.01 < z < 0.2$.
  • The random samples, used to account for the observational selection effects, is obtained according to the method described in Sec. 3.1 of Cheng Li et al. 2006 as follows. We generated ten duplicates for each galaxy in the reference sample and randomly place them in the SDSS survey area. All other properties, including stellar mass and redshift of the duplicates, are the same as those of the parent galaxy. The random sample thus has the same survey geometry, the same distributions of galaxy properties and redshift, as the reference sample.

Acknowledgements

We thank Fangzhou Jiang for his open source project of self-interaction dark matter (Fangzhou Jiang et al. 2023; ads; github). A copy the source code can be found under src/dwarf_assembly_bias/sidm/.

We thank Hui-Jie Hu for his subroutines of HI-based halo mass estimator. A copy of the source code can be found at docs/code_samples/Mhalo.py.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dwarf_assembly_bias-0.0.2.tar.gz (75.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dwarf_assembly_bias-0.0.2-py3-none-any.whl (86.8 kB view details)

Uploaded Python 3

File details

Details for the file dwarf_assembly_bias-0.0.2.tar.gz.

File metadata

  • Download URL: dwarf_assembly_bias-0.0.2.tar.gz
  • Upload date:
  • Size: 75.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for dwarf_assembly_bias-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a6233f997749197092446786ad21a75f85df4e1cb91dd06ea695d9597a52fc07
MD5 29b10f8e83f0f0e047c1053596484b11
BLAKE2b-256 7d66e3a01205682da50df34b147afbd16a6481914d92eda726d152f71f771126

See more details on using hashes here.

File details

Details for the file dwarf_assembly_bias-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dwarf_assembly_bias-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb442dc6a52f2e8c43b45b3cc886e181263b4fe3bcd4282cc44452888ff48a7b
MD5 e2791906f0ad49315a854b5ead015591
BLAKE2b-256 e34a8cf4a13aca25110ccbab3652e648505ee416e580b0cb9ef858f3ebfa6719

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page