Simulate SSPALS spectra


In [1]:
# import packages
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import sspals

In [2]:
# simulate data
xdata  = np.arange(-150, 700, 1) * 1e-9
ydata = sspals.sim(xdata, amp=0.5, eff=0.2, kappa=1e-8)

fig, ax = plt.subplots()
ax.plot(xdata * 1e9, ydata)
ax.set_yscale('log')

ax.set_xlim(-30, 650)
ax.set_ylim(1e-5, 1)

# annotations
ax.annotate('prompt peak', xy=(30, 0.2), xytext=(150, 0.4),
            arrowprops=dict(arrowstyle="->")
            )
ax.annotate('delayed events', xy=(300, 0.001), xytext=(130, 0.0001),
            arrowprops=dict(arrowstyle="->")
            )

ax.set_xlabel('Time (ns)')
ax.set_ylabel('PMT (V)')

plt.show()



In [ ]: