Skip to main content

Generate random points within SDSS DR8 to DR16 footprint.

Project description

Random SDSS

RandomSDSS Coverage Status Documentation Status

Generate random points in 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.random(size=10_000)


plt.figure()
plt.scatter(ra, dec, s=1)
plt.xlabel('RA [deg]')
plt.ylabel('DEC [deg]')
plt.show()

DR12 example

Alternatively you can get the same result without the need to instantiate an object using:

import randomsdss

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):

import randomsdss

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.1.tar.gz (12.5 MB view details)

Uploaded Source

File details

Details for the file RandomSDSS-0.1.tar.gz.

File metadata

  • Download URL: RandomSDSS-0.1.tar.gz
  • Upload date:
  • Size: 12.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for RandomSDSS-0.1.tar.gz
Algorithm Hash digest
SHA256 f97a53940201dcf7dda0bd42ebb77268df995ae48c580816b568399785ded893
MD5 5e742e2e1c002c38548a8ed82fa1d298
BLAKE2b-256 b2acf6c63d18d4fb2002ce7243c0e3a5a4b3a27aa55a6195470d0fa03e9e5ce9

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