SMPy is a Python-based toolkit designed for astrophysicists and cosmologists, facilitating the construction of convergence maps from shear data. This tool leverages the power of Python to provide an accessible and efficient way to analyze gravitational lensing effects, particularly focusing on the mapping of dark matter distribution in galaxy clusters.
- User-friendly interface for data handling and visualization.
- Modular codebase that allows multiple convergence mapping methods/techniques.
- Currently uses Kaiser-Squires Inversion (1993).
- Aperture-mass mapping is currently under development.
- Compatibility with standard astrophysical data formats.
-
Prerequisites: Ensure you have Python 3.x installed on your system. SMPy also requires
numpy
,scipy
,pandas
,astropy
, andmatplotlib
for numerical computations and visualizations. -
Clone the Repository: Clone the SMPy repository to your local machine using git:
git clone https://github.com/GeorgeVassilakis/SMPy.git
-
Install the Package: Install SMPy using setup.py:
pip install .
-
Edit your
example_config.yaml
configuration file- This file defines many parameters.
- Most importantly, it defines the input/output paths and file-specific columns like ra, dec, g1, g2, and weights.
- It also controls various visualization parameters like titles, color scaling, and smoothing parameters.
-
Run the runner.py script: Use the -c or -config flag to pass your .yaml file
python runner.py -c /path/to/example_config.yaml
-
Import the run module:
from SMPy.KaiserSquires import run
-
Edit the
example_config.yaml
configuration file -
Define config path and run:
config_path = '/path/to/repo/.../SMPy/SMPy/KaiserSquires/example_config.yaml'
run.run(config_path)
https://github.com/GeorgeVassilakis/SMPy/blob/main/notebooks/simulation_kmap.png)