Simulating Transient in the sky and how to observe them
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skysurvey-0.30.1.tar.gz.
File metadata
- Download URL: skysurvey-0.30.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95d4b22c9c0b57e61d6a4848fdd68190ea5d7310f739f51feaa82e36111c6604
|
|
| MD5 |
fb3dd16af11d63cb74f4836a090fdbbe
|
|
| BLAKE2b-256 |
f2b115f5da04f0a70c5312ee197af01ec665a8473d8e518d4e20b31d215ce81f
|
File details
Details for the file skysurvey-0.30.1-py3-none-any.whl.
File metadata
- Download URL: skysurvey-0.30.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bea36bc3ebefec4199454ad070e8a155ec824173b8112ab4936310f45b93e5c4
|
|
| MD5 |
d9197ca54af7703dac7ea0ac2c35374d
|
|
| BLAKE2b-256 |
b07d057bcb2f36137db56bfeb54cdb0d6c5466a32d8d185c954232408b6153a0
|