Generate random points within SDSS DR8 to DR16 footprint.
Project description
Random SDSS
Generate random points in the Sloan Digital Sky Survey (SDSS) DR8 to DR16 footprints.
This is a small wrapper around the package pymangle that facilitates the creation of random points in the SDSS fields. I included SDSS polygons for its diferent data releases (DR8 to DR16).
Basic Usage
import matplotlib.pyplot as plt
import randomsdss
dr12 = randomsdss.DR12(catalog="BOSS")
ra, dec = dr12.sky_random(size=10_000)
plt.figure()
plt.scatter(ra, dec, s=1)
plt.xlabel('RA [deg]')
plt.ylabel('DEC [deg]')
Alternatively you can get the same result without the need to instantiate an object using:
ra, dec = randomsdss.sky_random(dr="DR12", catalog="BOSS", size=10_000)
If you also need a random redshift distribution you can provide a sample of redshifts and a random set will be generated from the underlying Probability Density Function (PDF):
z = randomsdss.z_random(z_array, size=10_000)
The z_random is a complementary function since does not use any information regarding the SDSS catalogs, only the provided redshift array.
Author
Martin Chalela - email: tinchochalela@gmail.com
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
Built Distribution
Hashes for randomsdss-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d43fc35958bf976866ec480e09c9ea98b977835be6805f2aa3c9f949cba5ba69 |
|
MD5 | 2f7aeb5592c24c6666182e52e8e491c1 |
|
BLAKE2b-256 | 986ee7f21c6f558841e7931f00c870dacb117e03afdb7551b6df503608d36a4e |