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-0.27.3.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-0.27.3-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for skysurvey-0.27.3.tar.gz
Algorithm Hash digest
SHA256 d04e2ce00f50d27f02d0966c7977805aa899c6972ff70944978c3acccd44f6d2
MD5 4887081a583bca0baeb6c36360f071f1
BLAKE2b-256 61c5146e16eac52821cae260bebeb15364386470c8d06d7b6e9aefddf4d5faf1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for skysurvey-0.27.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4150ef4b98b13862d22697b4ca10f78950a97cb27020ad548fcffc130b6792fe
MD5 ed4c94ecad960c5546f8e770c61c3ac3
BLAKE2b-256 d502fa1503ce5785931bfa97f7ff85f8cbf6a656801f2b29826f6857d149759f

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