Python package for determining cluster members using caustic technique.
Project description
CausticSNUpy
Python implementation of the caustic technique for identifying galaxy cluster membership and measuring the mass profile of the cluster. Original technique is presented in Diaferio (1999) and Serra et al. (2011).
CausticApp, a program written by Serra and Diaferio, was used as a benchmark for this module and thus we tried to reproduce the same output for a given input.
Details of this code can be found in Kang et al. (2024).
Citation
We kindly request you to cite the following paper if you used this code:
Kang, W., Hwang, H. S., Song, H., et al. 2024
Dependencies
Required Packages
- NumPy
- SciPy
- astropy
- scikit-image
Tested with:
- Python 3.9.7
- numpy 1.20.3
- scipy 1.7.1
- astropy 4.3.1
- scikit-image 0.18.3
How to install
Installatation is available through pip or direct install from the githup repo.
Method 1: installing from pip repository
- On your terminal, type and enter
pip install causticsnupy.
pip install CausticSNUpy
Method 2: installing from zip file
- Download the
.zipfile from github repository. Click 'Code' button on the top right of the page, and click 'Download ZIP'. - In your terminal, change directory to the location where the
.zipfile is. - Type and enter the following:
pip install CausticSNUpy-main.zip
Method 3: run setup.py
- Clone the repository to your local machine.
- Open terminal and change directory to where
setup.pyis located. - In your terminal, type and run
python setup.py install
How to uninstall
- Open terminal (any directory is fine).
- In your terminal, type and run
pip uninstall CausticSNUpy
How to use
Input file
If you are using run_from_file, the input file must follow the following format:
- The first line of the input file may either have 1 or 4 numbers.
- The first line should be in format
NorN RA DEC VEL, where N is the number of galaxies in the data, RA and DEC are the right ascension and declination of the cluster center (both in deg), and VEL is the radial velocity of the cluster center (in km/s). - If RA, DEC, VEL are not given, input parameter
center_givenshould be set toFalse. - If N does not match the number of galaxies listed, the program will emit and error.
- The first line should be in format
- Input file must have 3 columns (except for the first line, as mentioned above).
- Each line is in format
RA DEC VEL. RA and DEC are the right ascension and declination of each galaxy (both in deg), and VEL is the radial velocity of each galaxy (in km/s).
- Each line is in format
Routine
See example.ipynb for the code to set the parameters, run the caustic method, and plot the redshift diagram with caustic lines.
Main attributes of the class
r: projected distance from the cluster center to each galaxy [Mpc]v: relative (with regard to the cluster center) l.o.s. velocity of each galaxy [km/s]r_grid: grid along the r-axis of the redshift diagram [Mpc]A: amplitude of the caustic lines alongr_grid[km/s]dA: uncertainty inA[km/s]M: enclosed mass profile alongr_grid[$M_{\odot}$]dM: uncertainty inM[$M_{\odot}$]
References
- Diaferio, A. 1999, MNRAS, 309, 610
- Gifford, D., Miller, C., & Kern, N. 2013, ApJ, 773, 116
- Serra, A. L., Diaferio, A., Murante, G., & Borgani, S. 2011, MNRAS, 412, 800
- Silverman B. W., 1986, Density Estimation for Statistics and Data Analysis, Chapman & Hall, London
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file causticsnupy-1.0.4.tar.gz.
File metadata
- Download URL: causticsnupy-1.0.4.tar.gz
- Upload date:
- Size: 192.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41cb523b43e8c38c7f3af94a61f4fbe86e3012a383fba4dca8859a58ea1d607f
|
|
| MD5 |
d81fe2802bac34577f675668e8a13d74
|
|
| BLAKE2b-256 |
bbd63d5a3fcde9e31e3e5d4df567ea6e981fbd9d2175660c1215b89248270acf
|
File details
Details for the file causticsnupy-1.0.4-py3-none-any.whl.
File metadata
- Download URL: causticsnupy-1.0.4-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9754a5b2d0fb92c88d588ca73182098dc3f1ff8ecb9a0d30474c77d41c876bc8
|
|
| MD5 |
6416f79fdaf76b52152f853913afa7bd
|
|
| BLAKE2b-256 |
489e2e6c602c918e5a34031c74cb1782d86006f0a949446dfa46d5aeb63adf14
|