Functions

Commonly used functions

sls_detector_tools.function.double_gaus_edge(x, A, mu, sigma1, sigma2)[source]

double gaussian

sls_detector_tools.function.double_gaus_edge_new(x, p0, A, mu, sigma1, sigma2)[source]

Variant of the double gaussian.

sls_detector_tools.function.expo(x, p0, p1)[source]

Exponential

\(e^{p0+p1*x}\)

sls_detector_tools.function.gaus(x, A, mu, sigma)[source]

Gaussian function

\[f(x) = A e^{-0.5*(x-\mu) / {\sigma^2}}\]
Parameters:
  • x – x values to evaluate the function at
  • A (double) – scaling
  • mu (double) – center
  • sigma (double) – width
Returns:

y – evaluated vales at each x

Return type:

value or array

sls_detector_tools.function.ideal_dqe(omega)[source]

Expression for the ideal DQE given an ideal MTF

sls_detector_tools.function.ideal_mtf(omega)[source]

mtf for an ideal pixel detector

sls_detector_tools.function.paralyzable(x, tau)[source]

Paralyzable detector model, used for rate measurements

\[f(x) = xe^{- \tau x}\]
sls_detector_tools.function.pol1(x, p0, p1)[source]

Linear function. Parameters in the same order as in ROOT

\[f(x) = p_0 + p_1x\]
sls_detector_tools.function.pol2(x, p0, p1, p2)[source]

Second degree polynomial

\[f(x) = p_0 + p_1x + p_2x^2\]
class sls_detector_tools.function.root[source]

Bases: object

Strings to build ROOT functions from

double_gaus_edge = '[0]+[1]/4 * ((1-TMath::Erf( (x-[2])/(sqrt(2)*[3])))+ (1-TMath::Erf( (x-[2])/(sqrt(2)*[4]) ) ) ) '
scurve = ' ([0]+[1]*x) + 0.5 * (1+TMath::Erf( (x-[2])/(sqrt(2)*[3]) ) )* ( [4] + [5]*(x-[2])) '
scurve2 = ' ([0]+[1]*x) + 0.5 * (1-TMath::Erf( (x-[2])/(sqrt(2)*[3]) ) )* ( [4] + [5]*(x-[2])) '
scurve4 = ' ([0]+[1]*x) + 0.5 * (1-TMath::Erf( (x-[2])/(sqrt(2)*[3]) ) )* ( [4] + [4]/[5]*(x-[2])) '
sls_detector_tools.function.scurve(x, p0, p1, mu, sigma, A, C)[source]

scruve function used for energy calibration scurve(x, p0,p1, mu, sigma, A, C)

[0] - p0 [1] - p1 [2] - mu [3] - sigma [4] - A [5] - C

sls_detector_tools.function.scurve2(x, p0, p1, mu, sigma, A, C)[source]

scruve function used for energy calibration scurve(x, p0,p1, mu, sigma, A, C)

[0] - p0 [1] - p1 [2] - mu [3] - sigma [4] - A [5] - C

sls_detector_tools.function.scurve4(x, p0, p1, mu, sigma, A, C)[source]

scruve function used for energy calibration scurve(x, p0,p1, mu, sigma, A, C)

[0] - p0 [1] - p1 [2] - mu [3] - sigma [4] - A [5] - C