Simulate UVIT-like photon event lists from astrophysical source models
Project description
Simulit
Simulit is a Python package for simulating UVIT-like photon event lists from astrophysical source models.
It is designed for developing, testing, and validating software for source detection, photometry, variability analysis, PSF improvement, and other UVIT data analysis applications.
Current source models include:
- Gaussian point sources
- Elliptical exponential galaxies
- Uniform circular sources
Simulit can also:
- Generate detector images from simulated event lists
- Create truth catalogues for validation and benchmarking
Installation
pip install simulit
Quick start
import numpy as np
import simulit as sm
rng = np.random.default_rng(42)
observation = sm.Observation(
exposure=2000,
)
centre = observation.detector.detector_size / 2
sources = sm.generate_gaussian_sources(
n_sources=100,
rate=0.1,
fwhm=3,
x0=centre,
y0=centre,
radius=2048,
rng=rng,
)
times, x, y = observation.simulate_events(
sources,
rng=rng,
)
truth = sm.create_truth_catalogue(sources)
sm.save_events(times, x, y)
sm.save_truth_catalogue(truth)
sm.make_image_from_events(
x,
y,
exposure=observation.exposure,
detector_size=observation.detector.detector_size,
)
Source models
GaussianSource
A Gaussian point source.
sm.GaussianSource(
rate=1.0,
x=2400,
y=2400,
fwhm=3,
)
ExponentialGalaxy
An elliptical exponential galaxy with an exponential surface brightness profile.
sm.ExponentialGalaxy(
rate=0.5,
x=2400,
y=2400,
r0=3.0,
q=0.7,
pa=np.pi / 4,
)
UniformDisk
A uniformly illuminated circular source.
sm.UniformDisk(
rate=5.0,
x=2400,
y=2400,
radius=200,
)
Observation
An Observation combines
- exposure time
- detector configuration
- optional pointing drift
observation = sm.Observation(
exposure=2000,
)
A pointing drift model can also be supplied.
drift = sm.Drift(
x_offset=x_shift,
y_offset=y_shift,
)
observation = sm.Observation(
exposure=2000,
drift=drift,
)
Output products
Simulit can generate
- simulated photon event lists
- detector images
- truth catalogues
Examples
The examples/ directory contains complete working examples.
mixed_sources.py— mixed populations of point sources, galaxies, and diffuse backgroundsynthetic_drift.py— simulate observations with synthetic UVIT-inspired pointing driftinject_sources_into_uvit_events.py— inject simulated sources into an existing UVIT Level-2 events list.
Planned features
Future development is expected to include:
- additional source models
- realistic background models
- cosmic ray simulations
- detector artefacts
- UVIT slitless spectroscopy
- filter-dependent simulations
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 simulit-0.2.0.tar.gz.
File metadata
- Download URL: simulit-0.2.0.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed76db7294af86502d7cd07d8e8076f0575925697ca621e112d8d90324fbf330
|
|
| MD5 |
a06de00f9a7f8a59f3df70fb16c17e7d
|
|
| BLAKE2b-256 |
cb3e55d0efc9e1f83c4b33e44bb7f673a926350b987aa9a2735de30bf73a60bb
|
File details
Details for the file simulit-0.2.0-py3-none-any.whl.
File metadata
- Download URL: simulit-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccde0765173063972b6b61393f0c68628a3edff42728a5b5d760616476921f6d
|
|
| MD5 |
1a2be4fde32a186064e6bbc3f2ba9fa3
|
|
| BLAKE2b-256 |
08e8c93470c7674a7a97a4d90e03cc781730d10c18a937fd3c2e441d3aa37c2c
|