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

Uploaded Python 3

File details

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

File metadata

  • Download URL: skysurvey-0.31.0.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.31.0.tar.gz
Algorithm Hash digest
SHA256 6e3dd33b1064e78c497e4957a163939df6fa93bc42bae2ad936b3a77f689da72
MD5 d52f5c01682684ce73c4ca08dda06ec1
BLAKE2b-256 820b9f74e9ac607739bb0cee01a50c84b4892f69a42eaf34153453bd5639ca12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: skysurvey-0.31.0-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.31.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9e70f4f5a32b8b17bab2679dadf23af91d8e8899297cbff7de14c4291774bb7
MD5 9e67b5d0f6f060d48ba5d3f8f438d754
BLAKE2b-256 73d7e3689475329ccdf324f85d35a5be12fe5c22560d07e41e10f3da9136daba

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