Skip to main content

scintiPulses

scintiPulses logo

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

scintiPulses is a Python package for simulating high-fidelity photodetector outputs from scintillation detectors. It models the full signal chain from energy deposition to digitized output, incorporating physical, electronic, and digitization effects.


✨ 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
from scintiPulses import scintiPulses

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

# Run simulation
t, v0, v1, v2, v3, v4, v5, v6, v7, v8, y0, y1 = 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 Sample energy deposition (in keV)
tN float 20e-6 Total simulation time (in seconds)
arrival_times bool False Flag to indicate if arrival times are provided
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 delayed component
lambda_ float 1e6 Rate parameter for Poisson process (in Hz)
L float 1 Inductance (in Henry)
C1 float 1 Capacitance (in Farad)
sigma_C1 float 0 Standard deviation of capacitance (in Farad)
I float -1 Current (in Ampere)
tauS float 10e-9 Decay time constant for scintillation (in seconds)
electronicNoise bool False Flag to indicate if electronic noise is included
sigmaRMS float 0.00 RMS value of electronic noise
afterPulses bool False Flag to indicate if after-pulses are included
pA float 0.5 Probability of after-pulse occurrence
tauA float 10e-6 Decay time constant for after-pulse (in seconds)
sigmaA float 1e-7 Standard deviation of after-pulse (in seconds)
digitization bool False Flag to indicate if digitization is included
fc float 4e7 Cut-off frequency for low-pass filter (in Hz)

⚙️ Outputs:

  • 📈 v0 - Idealized light emission
  • 📈 v1 - Shot noise from quantized photons
  • 📈 v2 - After-pulses added (Optional)
  • 📈 v3 - Thermoionic dark noise (Optional)
  • 📈 v4 - PMT voltage signal
  • 📈 v5 - Thermal noise added (Optional)
  • 📈 v6 - Post-RC filter (preamp) (Optional)
  • 📈 v7 - Post-CR filter (fast amplifier) (Optional)
  • 📈 v8 - Final digitized signal (Optional)

Metadata

Release files for scintiPulses 1.16

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.16
File Size Uploaded Provenance Actions
scintipulses-1.16.tar.gz 9.6 kB With provenance Details for scintipulses-1.16.tar.gz

Built distribution (wheel)

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

Total release size: 20.0 kB

Release files / scintipulses-1.16.tar.gz

Download URL scintipulses-1.16.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4cc303a02b07be7c18aae275cdc34f45ad39a10c9a9ccdddb77e989aa6dc4084
BLAKE2b-256 checksum
How to use checksums
9c6785e23465f09faee7cc46dd702b9b1dcc4674f7a2f45b8483e99aa3f99574
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 11, 2025.

Transparency log

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

Download URL scintipulses-1.16-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad1fc1a4b819f6f68c9fb06ee7b2e9a146de0f317468cf387e2f240c8704a190
BLAKE2b-256 checksum
How to use checksums
5f73428dc0ff7ae691c7883dc3f66570c668bd0d13a4623066af1b66476ac37f
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 11, 2025.

Transparency log

Security for scintiPulses 1.16

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.16.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 11, 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.16 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