Skip to main content

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

Metadata

Release files for skysurvey 1.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skysurvey 1.4.5
File Size Uploaded Provenance Actions
skysurvey-1.4.5.tar.gz 1.9 MB Without provenance Details for skysurvey-1.4.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for skysurvey 1.4.5
File Interpreter ABI Platform Actions
skysurvey-1.4.5-py3-none-any.whl Python 3 none any Details for skysurvey-1.4.5-py3-none-any.whl

Total release size: 3.8 MB

Release files / skysurvey-1.4.5.tar.gz

Download URL skysurvey-1.4.5.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
169c81a65d4f923de3b37340e8b6e121edccc61b2084667cf0d8b506f60faf03
BLAKE2b-256 checksum
How to use checksums
a8304b72f50f7fe8d77445ca02b11e5f26f5d55a64bf7314ea26fd7708fcad7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / skysurvey-1.4.5-py3-none-any.whl

Download URL skysurvey-1.4.5-py3-none-any.whl
Size 1.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9b091a5b640aa97b55d16238c13fdcfa22749cd2ee5bc7ffa5f60698047739b0
BLAKE2b-256 checksum
How to use checksums
3c8380f5eca9e57fb75edb5b32284914e555e18ec5b2c63b2ceb53b2e9f61e09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for skysurvey 1.4.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.4.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page