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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| skysurvey-1.3.0.tar.gz | 1.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| skysurvey-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.7 MB
Release files / skysurvey-1.3.0.tar.gz
| Download URL | skysurvey-1.3.0.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38dd214d8197e20950298087d19d0f18d8205df9a910c94e3481e2f531aaba03
|
|
BLAKE2b-256 checksum How to use checksums |
45b2cf9d0469274fd93b040f52e90d6c948bc8f1f373d89c8780e847a0d4e381
|
| 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.3.0-py3-none-any.whl
| Download URL | skysurvey-1.3.0-py3-none-any.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86409bd08ad73bed65a147dbaf334be465530f48953eed741a17b34badf8d617
|
|
BLAKE2b-256 checksum How to use checksums |
6ce48713e48daa928313463f306d8bfa13193a85408e1c7a3991d931ad172f48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|