Skip to main content

Generate random points within SDSS DR8 to DR16 footprint.

Project description

Random SDSS

PyPI version RandomSDSS Coverage Status Documentation Status License: MIT

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]')

DR12 example

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

randomsdss-0.3.tar.gz (12.5 MB view details)

Uploaded Source

Built Distribution

randomsdss-0.3-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file randomsdss-0.3.tar.gz.

File metadata

  • Download URL: randomsdss-0.3.tar.gz
  • Upload date:
  • Size: 12.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for randomsdss-0.3.tar.gz
Algorithm Hash digest
SHA256 58f9394a8d8f02e7a33f446baea04757ee2a374cc4e1683498c8e4285c2ecb71
MD5 74c7d57d88ca5166dea2e4eb538ee950
BLAKE2b-256 5cc358ddf5fd8b8b07b4539de964b83bb0b3eee5d9979a7ab6c3708276f43c60

See more details on using hashes here.

File details

Details for the file randomsdss-0.3-py3-none-any.whl.

File metadata

  • Download URL: randomsdss-0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for randomsdss-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 be7e0cbeb27406fe2dbfb2984f20cd7c5d7dafff6ddf120725260c17f4dc36e3
MD5 0f7c18971d06091538a3af62904ffde4
BLAKE2b-256 bc28e1cbe1a219c3ad70bcf743e4dee824b7eddca5f7e26d78871d9a9c9adee2

See more details on using hashes here.

Supported by

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