Skip to main content

scintiPulses

scintiPulses logo

Simulate scintillation detector signals with photodetector effects, noise sources, and digitization modeling.

scintiPulses is a Python package designed to generate realistic photodetector signals from scintillation detectors by modeling the entire signal chain—from energy deposition to digitized output. It incorporates key photochemical processes (scintillation light emission, photodetector response), electronic effects (amplification, noise, shaping), and digitization artifacts (sampling, quantization).

The package is compatible with Monte Carlo simulation frameworks (e.g., Geant4, MCNP, FLUKA), accepting deposited energy and timestamp data to produce high-fidelity pulse waveforms.


✨ Features

  • 📈 Realistic pulse shapes from energy depositions in scintillators
  • ⏱️ Time-dependent fluorescence (prompt and delayed components)
  • 🔬 Quantum shot noise and after-pulse simulation
  • 🌡️ Thermionic (dark) noise and Johnson-Nyquist noise
  • ⚙️ Analog filtering stages (RC preamplifier and CR fast amplifier)
  • 🧮 Digitization with low-pass filtering, quantization, and saturation

📦 Installation

Install via pip:

pip install scintiPulses

🚀 Usage Example

import numpy as np
import matplotlib.pyplot as plt
import scintipulses.scintiPulses as sp

# Sample energy deposition (in keV)
Y = 100 * np.ones(1000)

# Run simulation
t, v0, v1, v2, v3, v4, v5, v6, v7, v8, y0, y1 = sp.scintiPulses(
    Y,
    tN=20e-6,
    arrival_times=False,
    fS=1e8,
    tau1=250e-9,
    tau2=2000e-9,
    p_delayed=0,
    lambda_=1e6,
    L=1,
    C1=1,
    sigma_C1=0,
    I=-1,
    tauS=10e-9,
    electronicNoise=False,
    sigmaRMS=0.00,
    afterPulses=False,
    pA=0.5,
    tauA=10e-6,
    sigmaA=1e-7,
    digitization=False,
    fc=4e7,
)

# Plot the final output signal
plt.plot(t, v8)
plt.xlabel("Time (s)")
plt.ylabel("Voltage (V)")
plt.title("Simulated Scintillation Pulse")
plt.grid(True)
plt.show()

⚙️ Parameters

Parameter Type Default Value Description
Y array-like None Samples of deposited energy (in keV)
tN float 20e-6 Total duration of the simulated signal (in seconds)
arrival_times bool (or) False Flag to indicate if arrival times are provided
arrival_times array-like List of arrival times (in seconds)
lambda_ float 1e5 Rate parameter for Poisson process (in s-1)
fS float 1e8 Sampling frequency (in Hz)
tau1 float 250e-9 Decay time constant for prompt component (in seconds)
tau2 float 2000e-9 Decay time constant for delayed component (in seconds)
p_delayed float 0 Probability of the delayed component
rendQ float 1 Quantum efficiency of the photon-to-charge conversion
L float 1 Scintillation light yield (in keV-1)
C1 float 1 Capacitance (in $1.6\times^{-19}$ Farad)
sigma_C1 float 0 Standard deviation of capacitance (in $1.6\times^{-19}$Farad)
I float -1 Voltage invertor
tauS float 10e-9 Spreading time of charge bunch (in seconds)
electronicNoise bool False Flag to indicate if electronic noise is included
sigmaRMS float 0.00 RMS value of electronic noise (in V)
afterPulses bool False Flag to indicate if after-pulses are included
pA float 0.5 Probability of after-pulse occurrence
tauA float 10e-6 Mean delay time of after-pulses (in seconds)
sigmaA float 1e-7 Standard deviation of the delay time (in seconds)
darkNoise boolean False Flag to indicate if dark noise is included
fD float 1e4 Rate of the thermoionic noise (in s-1)
pream boolean False Flag to indicate if a preamplifier in included
G1 float 1 Voltage gain of the preamplifier
tauRC float 10e-6 Time period of the preamplifier (in s)
ampli boolean False Flag to indicate if a fast amplifier in included
G2 float 1 Voltage gain of the fast amplifier
tauCR float 2e-6 Time period of the fast amplifier (in s)
nCR integer 1 Order of the CR filter of the fast amplifier
digitization bool False Flag to indicate if digitization is included
fc float 4e7 Cut-off frequency of the anti-aliasing filter (in Hz)
R integer 14 Resoltion of the ADC (in bit)
Vs float 2 Voltage dynamic range (in V)

⚙️ Outputs:

  • ⏱️ t - Time base vector (in s).
  • 📈 v0 - Idealized scintillation signal (in e)
  • 📈 v1 - Shot noise from quantized photons added (in e)
  • 📈 v2 - After-pulses added (Optional) (in e)
  • 📈 v3 - Thermoionic dark noise added (Optional) (in e)
  • 📈 v4 - PMT voltage signal (in V)
  • 📈 v5 - Thermal noise added (Optional) (in V)
  • 📈 v6 - Post-RC filter added (preamp) (Optional) (in V)
  • 📈 v7 - Post-CRn filter added (fast amplifier) (Optional) (in V)
  • 📈 v8 - Digitization added (Optional) (in V)
  • 🔬 y0 - Dirac brush of deposited energy (in keV).
  • 🔬 y1 : Dirac brush of mean charges (in e).

Metadata

Release files for scintiPulses 1.18

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

Source distribution (sdist)

Source distribution for scintiPulses 1.18
File Size Uploaded Provenance Actions
scintipulses-1.18.tar.gz 10.1 kB With provenance Details for scintipulses-1.18.tar.gz

Built distribution (wheel)

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

Total release size: 21.1 kB

Release files / scintipulses-1.18.tar.gz

Download URL scintipulses-1.18.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
74d6fa477c5feafc7a918fa38b1f50bbc3fb2a8ba8ba25a10ba3ccda94af94ab
BLAKE2b-256 checksum
How to use checksums
1091880860d5b59654c0a6a82ea5b0b99072696f3c34b830cbec5f5e32bb8dbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2025.

Transparency log

Release files / scintipulses-1.18-py3-none-any.whl

Download URL scintipulses-1.18-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1ecb6e9f58570ffc6862ca4a0cb0c41ef84a257df68ea8ac79f5344cc1aa11d
BLAKE2b-256 checksum
How to use checksums
6abbaeeaf4fbda74da6eff69dfb6d8c593676a58764aa8a9c90627c039706605
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2025.

Transparency log

Security for scintiPulses 1.18

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scintipulses-1.18.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2025.

Transparency log

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.18 This release

2 release files Full 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