Skip to main content

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

  1. On your terminal, type and enter pip install causticsnupy.
pip install CausticSNUpy

Method 2: installing from zip file

  1. Download the .zip file from github repository. Click 'Code' button on the top right of the page, and click 'Download ZIP'.
  2. In your terminal, change directory to the location where the .zip file is.
  3. Type and enter the following:
pip install CausticSNUpy-main.zip

Method 3: run setup.py

  1. Clone the repository to your local machine.
  2. Open terminal and change directory to where setup.py is located.
  3. In your terminal, type and run
python setup.py install

How to uninstall

  1. Open terminal (any directory is fine).
  2. 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 N or N 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_given should be set to False.
    • If N does not match the number of galaxies listed, the program will emit and error.
  • 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).

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 along r_grid [km/s]
  • dA : uncertainty in A [km/s]
  • M : enclosed mass profile along r_grid [$M_{\odot}$]
  • dM : uncertainty in M [$M_{\odot}$]

References

  1. Diaferio, A. 1999, MNRAS, 309, 610
  2. Gifford, D., Miller, C., & Kern, N. 2013, ApJ, 773, 116
  3. Serra, A. L., Diaferio, A., Murante, G., & Borgani, S. 2011, MNRAS, 412, 800
  4. Silverman B. W., 1986, Density Estimation for Statistics and Data Analysis, Chapman & Hall, London

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

causticsnupy-1.0.4.tar.gz (192.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

causticsnupy-1.0.4-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

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

Hashes for causticsnupy-1.0.4.tar.gz
Algorithm Hash digest
SHA256 41cb523b43e8c38c7f3af94a61f4fbe86e3012a383fba4dca8859a58ea1d607f
MD5 d81fe2802bac34577f675668e8a13d74
BLAKE2b-256 bbd63d5a3fcde9e31e3e5d4df567ea6e981fbd9d2175660c1215b89248270acf

See more details on using hashes here.

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

Hashes for causticsnupy-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9754a5b2d0fb92c88d588ca73182098dc3f1ff8ecb9a0d30474c77d41c876bc8
MD5 6416f79fdaf76b52152f853913afa7bd
BLAKE2b-256 489e2e6c602c918e5a34031c74cb1782d86006f0a949446dfa46d5aeb63adf14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page