This repository contains a Python script (glade++_pvs.py) that loads a reduced subset of the GLADE++ galaxy catalog, calculates peculiar velocities (PVs) for each entry, and saves the enhanced catalog to a new CSV file. It also generates a histogram of the calculated peculiar velocities.
This analysis relies on the pvhub repository by KSaid-1, which is included as a Git submodule.
glade++_pvs.py expects data/GLADEplusplus_forPecVels.txt as input.
After running the analysis, the script will generate the following files in a data/ directory:
data/GLADEplusplus_withPVs.csv: The original catalog with newpv(peculiar velocity) andz_true(pv-corrected cosmological redshift) columns.data/pv_histogram.png: A histogram of the calculated peculiar velocities.
These instructions will guide you from cloning the repository to successfully running the analysis.
This project uses Git submodules. Use the --recurse-submodules flag to clone both this repository and the pvhub dependency.
git clone --recurse-submodules https://github.com/simongoode/GLADE-pvs.git GLADE_pvs
cd GLADE_pvs(If you've already cloned without this flag, run git submodule update --init --recursive inside the project folder.)
This project uses uv for package management. The required packages are listed in requirements.txt.
# Create a new virtual environment
uv venv
# Activate the environment
source .venv/bin/activate
# Sync the environment with the pinned dependencies
uv pip sync requirements.txtThe script saves its results to a data/ directory. This folder is ignored by Git, so you must create it manually.
mkdir dataYou are now ready to run the script.
python glade++_pvs.py