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
Release files for simulit 0.2.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 | |
|---|---|---|---|
| simulit-0.2.0.tar.gz | 13.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simulit-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.1 kB
Release files / simulit-0.2.0.tar.gz
| Download URL | simulit-0.2.0.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed76db7294af86502d7cd07d8e8076f0575925697ca621e112d8d90324fbf330
|
|
BLAKE2b-256 checksum How to use checksums |
cb3e55d0efc9e1f83c4b33e44bb7f673a926350b987aa9a2735de30bf73a60bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / simulit-0.2.0-py3-none-any.whl
| Download URL | simulit-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccde0765173063972b6b61393f0c68628a3edff42728a5b5d760616476921f6d
|
|
BLAKE2b-256 checksum How to use checksums |
08e8c93470c7674a7a97a4d90e03cc781730d10c18a937fd3c2e441d3aa37c2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|