Python package for determining cluster members using caustic technique.
Project description
CausticSNUpy
Python module for drawing caustic lines and determining cluster membership of galaxies using the caustic technique 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
This package is currently only available through manual installation.
After downloading and the tar.gz file, follow one of the following methods.
Method 1: using pip
- Open terminal and change directory to where tar.gz file is located.
- Type and run
pip install+ tar.gz file name.
pip install CausticSNUpy-<version>.tar.gz
Method 2: run setup.py
- Open terminal and change directory to where setup.py is located.
- In your terminal, type and run
python setup.py install
- Now you are ready to use this package!
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.2.tar.gz.
File metadata
- Download URL: causticsnupy-1.0.2.tar.gz
- Upload date:
- Size: 200.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb96334baa66d794c705eb719c52f95804e86a3b459a4009a5419fd327eda052
|
|
| MD5 |
a2f426e53369fcc7ae6bf9f427de6714
|
|
| BLAKE2b-256 |
3111c4f45f2f85cacfd97b139ce29d4d1eba63e1e887a9c27f3da73871aa9bc1
|
File details
Details for the file causticsnupy-1.0.2-py3-none-any.whl.
File metadata
- Download URL: causticsnupy-1.0.2-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28d04be033496619d6d28d02729c6da21d3b678cc0128e979addd7be73d7c1e9
|
|
| MD5 |
8e8eabd8a39b9da192c6a0d1889e2bfb
|
|
| BLAKE2b-256 |
019a0b47df3aa2bb997c33e733e21e993470dc20aa447889db46ec70afb76766
|