DOI: 10.5281/zenodo.17979403
title: Setllar Population of Stellar Halos from MaNGA

description: This repository contains the scripts to conduct the analysis and generate the figures in Zhang et al. 2025

The data catalogs are stored under path ./data and the notebooks for reproducing figures are in ./plot_scripts

Analysis Pipeline

1. Cross-match between MaNGA and SGA catalogs: match_manga.py; 

- product: ./data/manga_sga_z.fits

2.  Measure stellar mass and effective radii: nsa_v_sga.py; 

- product: ./data/sga_mass_new_28mag2.fits

3. Construct sample mask: masks.py; 

- product: sample_mask_new2.fits

4. obtain additional masking after visual inspection: masking.py

- product: ./data/masking.fits

6. Collect kinematic data and stellar mass of the final sample: kinematics.py 

- product: ./data/parameters_reff2_2.fits

7. split sample using different parameter spaces: sample_split.py 

- product: ./data/sample_split_outliers_total2.fits

8.  Integrate spectra in 3 radial bins for each galaxy in the final sample: stack_gal.py 

- product: ./data/stacked_spec.fits

9.  correct for telluric lines: sigma_unite.py (broaden the spectra to extract line features)+ fix_masks.py (compare with telluric line list and mask out pixels with large residuals around known telluric line features)

- product: ./data/stacked_sigfix_mask.fits

10. smooth masked spectra to uniform resolution: smooth_spec.py

- product: stacked_smooth_sigma300_mask_new2.fits

11. stack spectra for different sample-split methods and measure LICK indices (& uncertainties) and estimate measurement uncertainties for stacked spectra: uncertainty.py

- product: ./data/index/*; ./data/std*.fits

12. measure LICK index values for sMILES SSPs 

- product: ./data/smiles_ssp/*

13. construct input spectra for alf fitting: make_spec.py  

- product: ./data/alf/*

 

----------------------------------------------------------

other scripts

- mclrs.py: collection of several Mass-to-Light-ratio-to-Color Relations 

- calc_kcor.py: k-correction code

- smiles_index.py: convolve sMILES SSP to data resolution and measure their LICK indices

- products: 

- ./data/smiles_ssp/Bimodal_2.8_ssp.csv

- ./data/smiles_ssp/Universal_Kroupa_ssp.csv

- ./plot_scripts/read_alf.py: reading alf output data by Charlie Conroy, repository: alf

- ./plot_scripts/ks-error.py: perform k-s test and estimate p value errors by bootstrapping

Plotting Scripts

path: ./plot_scripts

- ./plot_scripts/plot_split.ipynb: visualize sample-split methods and the corresponding physical parameter distributions, Figure 4 & 5

- ./plot_scripts/plot_index.ipynb: plot radial profiles of LICK indices for different sample-split methods, Figure 6 & 7

- ./plot_scripts/simle_plot.ipynb: plot data index values against sMILES SSP grids, Figure 8

- ./plot_scripts/plot_alf_spectra.ipynb: compare data with output spectra from alf-fitting, Figure 9

- ./plot_scripts/plot_alf_corner.ipynb: generate corner plots for alf posteriors, Figure 10

- ./plot_scripts/plot_alf_gradient.ipynb: plot radial profiles of elemental abundances from alf fitting, Figure 11 & 12 & 18 & 19

- ./plot_scripts/plot_alf_gradient_imf.ipynb: compare alf results between Kroupa IMF and IMF-variable fitting, Figure 13
description: If you use this software, please cite it as below.