Skip to main content

Simulating Transient in the sky and how to observe them

Project description

PyPI Documentation Status

skysurvey

Simulate transients within the sky

skysurvey relies on sncosmo for bandpass and lightcurve generations. (https://sncosmo.readthedocs.io/en/stable/)

See documentation on read the docs

Install

pip install skysurvey

or

git clone https://github.com/MickaelRigault/skysurvey.git
cd skysurvey
pip install .

Quick Start

You need to create a Target and a Survey to then simulate how your survey would observe your targets ; aka a DataSet.

Here is a quick example:

Step 1: targets (truth)

import skysurvey
snia = skysurvey.SNeIa()
data = snia.draw(size=50_000, tstart=56_000, tstop=56_100, inplace=True) # see options
data.head(5) # also snia.data

Step 2: Survey (pointing and observing conditions)

import numpy as np
from skysurvey.tools import utils

size = 10_000

# footprint
from shapely import geometry
sq_footprint = geometry.box(-1, -1, +1, +1)

# Observing data
ra, dec = utils.random_radec(size=size, ra_range=[200,250], dec_range=[-20,10])

data = {}
data["ra"] = ra
data["dec"] = dec
data["gain"] = 1
data["zp"] = 30
data["skynoise"] = np.random.normal(size=size, loc=150, scale=20)
data["mjd"] = np.random.uniform(56_000-10, 56_100 + 10, size=size)
data["band"] = np.random.choice(["desg","desr","desi"], size=size)

# Build the survey
survey = skysurvey.Survey.from_pointings(data, footprint=sq_footprint)
survey.data

Step 3: Dataset

And now let's build the dataset. The simulated lightcurves are in dset.data, the input survey is stored in dset.survey, the input targets is stored in dset.targets

from skysurvey import dataset
dset = dataset.DataSet.from_targets_and_survey(snia, survey)
dset.data

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

skysurvey-1.0.0.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

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

skysurvey-1.0.0-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file skysurvey-1.0.0.tar.gz.

File metadata

  • Download URL: skysurvey-1.0.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for skysurvey-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ce7c95536c2f30c7dcf7ccdd7ae57093e4e628e57e37a7805eba92764443dabb
MD5 b1bef0443e819ebaa98113b0115ff116
BLAKE2b-256 dcaadac717434fd99be72c0fee1a38754290f442b2d6d0d49b4ed715389b4003

See more details on using hashes here.

File details

Details for the file skysurvey-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: skysurvey-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for skysurvey-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18c6240d915c164b58eeff3e4d00449965214f3de52d7ee87f8ff2a2bc36799c
MD5 a85556b34228280064efe2482294fba3
BLAKE2b-256 d142733859e33acdea13d631a178486e31e0800216fe5a7c81d2a9b790a65205

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