galmorph

GalMorph

GalMorph is a Python package for classifying simulated galaxies into elliptical, spiral, or irregular based on their morphology probability in the TNG simulation (TNG Project).

This tool is designed to work with .pkl files containing specific probability columns and enables basic classification, filtering, and visualization of galaxy morphologies.


Expected Data Format

The input should be a Pickle file (.pkl) that can be loaded as a Pandas DataFrame, containing the following columns:

Required Columns

Column Name Description Type
Snapshot Simulation snapshot number int
SubhaloID Unique identifier for the galaxy/subhalo int or str
P_irr Probability the galaxy is irregular float (0–1)
P_disk Probability the galaxy is a disk float (0–1)
P_spheroid Probability the galaxy is a spheroid float (0–1)

Notes:


Installation

git clone https://github.com/ImPriyatam/galmorph.git
cd galmorph
pip install .

Or you can install galmorph directly from PyPI:

pip install galmorph

To follow the steps, see the documentation here.

(If you’re working locally, you can also open docs/_build/html/index.html in your browser.)


License

This project is licensed under the MIT License - see the LICENSE file for details.

PyPI version

A rectangular badge, half black half purple containing the text made at Code Astro