Skip to content

Ali-Razeghi/globular-cluster-populations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiple Stellar Populations in the Globular Cluster NGC 6752

Detecting the first (1G/P1) and second (2G/P2) stellar generations in a globular cluster from real Hubble Space Telescope photometry, using a chromosome map and unsupervised machine learning (K-means and DBSCAN).

Multiple populations in NGC 6752 Output for NGC 6752 from real HST/HUGS photometry. An unsupervised workflow recovers two stellar generations: the first (blue) and the second (red), whose UV photometry encodes the abundance variations associated with helium- and nitrogen-enhanced stars.


What this is

Globular clusters were long assumed to be simple stellar populations all stars born at one time, from one cloud, with one chemistry. Hubble UV photometry overturned that: almost every cluster hosts at least two populations that differ in their light-element abundances (He, C, N, O, Na, Al, Mg) while sharing the same iron content.

This project reproduces that signal end-to-end:

  1. Loads the public HUGS photometric catalogue for a cluster.
  2. Selects likely cluster-member red-giant-branch stars.
  3. Builds the chromosome map, a pseudo-two-colour diagram combining F275W, F336W, F438W and F814W magnitudes that maximally separates the populations.
  4. Splits the populations with K-means (k=2) and cross-checks with DBSCAN (density-based).

This implementation assumes a two-population model (1G/2G) and is intended as an educational reproduction rather than a full population census. Several real clusters host three or more sub-populations (3G, 4G, …); DBSCAN is included to show where the density structure does or does not support a simple two-way split.

  1. Writes figures and a labelled per-star table.

Why NGC 6752

NGC 6752 is one of the nearest, low-reddening globular clusters with a textbook multiple-population signature - making the split recoverable without heavy differential-reddening correction. (M4, the closest cluster, is also included as a test case, but its strong, patchy reddening blurs the map; see notes below.) Swap in any HUGS cluster via --catalog.

Quick start

pip install -r requirements.txt

# The script downloads the public catalogue directly from MAST:
python multiple_populations.py \
  --catalog "https://archive.stsci.edu/hlsps/hugs/ngc6752/hlsp_hugs_hst_wfc3-uvis-acs-wfc_ngc6752_multi_v1_catalog-meth2.txt" \
  --name "NGC 6752" --out figures \
  --membership-cut 0.9 --max-rms 0.03 --min-qfit 0.9

If your environment blocks the STScI archive, download the file in a browser and pass the local path to --catalog instead.

Reproducing the figures

After running the analysis, regenerate the publication-quality figures (chromosome map, colour-magnitude diagram, and the combined two-panel view) with:

python make_figures.py

Outputs

File Description
chromosome_map.png Raw pseudo-two-colour diagram of the RGB
kmeans_populations.png 1G vs 2G split (K-means, k=2)
dbscan_groups.png Density-based grouping (DBSCAN)
labelled_stars.csv Per-star map coordinates + population labels

Method notes & honest limitations

  • The chromosome map is built by verticalising the red-giant branch: colours are detrended against magnitude (robust quadratic fit with outlier rejection) so the population signal is the residual, not the raw colour. This follows the spirit of Milone et al. (2017) but does not use their exact fiducial lines, absolute positions differ from published figures, while the population split is the same physical signal.
  • The K-means split is a boundary through a continuous, sheared distribution, not two fully detached islands. Treat the second-generation fraction as approximate; DBSCAN is included to show where density structure does (or does not) support a hard split.
  • Differential reddening is not corrected. This is why NGC 6752 (low reddening) gives a clean map while M4 (E(B-V) ~ 0.37, patchy) does not. For high-reddening clusters, add a reddening correction before mapping.
  • Quality cuts matter: poor-fit stars form a spurious cloud. Tune --max-rms, --min-qfit, and --membership-cut per cluster.

Data & scientific sources (please cite)

Photometry - HUGS / HST UV Legacy Survey of Galactic Globular Clusters

Chromosome-map technique

  • Milone et al. 2017, MNRAS, 464, 3636

Narrative inspiration (not a data source)

  • Jan Hattenbach, "Cluster Mystery", Sky & Telescope, July 2026.

Based on observations with the NASA/ESA Hubble Space Telescope, obtained at STScI, operated by AURA under NASA contract NAS 5-26555.

License

MIT

About

Detecting multiple stellar populations in globular cluster NGC 6752 from real Hubble (HUGS) photometry using an unsupervised ML workflow.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages