Detector signal calibration¶
Determine signal calibration values for data
This module can be used to determine signal calibration values from data.
Determine the PMT response curve to correct the detected number of MIPs.
- sapphire.analysis.signal_calibration.linear(x, slope, intercept)¶
Evaluate a linear function at point x
- Parameters:
x – x coordinate at which to evaluate the function.
slope – slope of the line.
intercept – y-intercept at x = 0.
- Returns:
the y value at x, given the slope and intercept.
- sapphire.analysis.signal_calibration.inverse_linear(y, slope, intercept)¶
Evaluate the inverse linear function for value y
- Parameters:
y – value y.
slope – slope of the line.
intercept – y-intercept at x = 0.
- Returns:
the x coordinate for value y, given the slope and intercept.
- sapphire.analysis.signal_calibration.log_linear(x, slope, intercept)¶
Evaluate a linear function in log-log space at point x
- Parameters:
x – x coordinate at which to evaluate the function.
slope – slope of the line.
intercept – log10 y-intercept at x = 1 (log10 1 = 0).
- Returns:
the y value at x, given the slope and intercept.
- sapphire.analysis.signal_calibration.linear_intersection(slope_1, intercept_1, slope_2, intercept_2)¶
The x coordinate at which the two linear lines intersect
- Parameters:
slope1 – slope of the first line.
intercept1 – y-intercept at x = 0 of the first line.
slope2 – slope of the second line.
intercept2 – y-intercept at x = 0 of the second line.
- Returns:
x coordinate of the intersection.
- sapphire.analysis.signal_calibration.linear_circle_linear(x, radius, slope_low, intercept_low, slope_high, intercept_high)¶
Two linear lines connected by a circle segment
- Parameters:
x – x coordinate at which to evaluate the function.
radius – radius of the cricle connecting the lines.
slope_low – the slope of the lower (low x) linear line.
intercept_low – the y-intercept of the lower (low x) linear line.
slope_high – the slope of the upper (high x) linear line.
intercept_high – the y-intercept of the upper (high x) linear line.
- Returns:
the y value at x.
The center of the circle is given by (center_x, center_y)
- sapphire.analysis.signal_calibration.xy_circle_linear(x, radius, slope_high, intercept_high)¶
An x=y and a linear line connected by a circle segment
- Parameters:
x – x coordinate at which to evaluate the function.
radius – radius of the cricle connecting the lines.
slope_high – the slope of the upper (high x) linear line.
intercept_high – the y-intercept of the upper (high x) linear line.
- Returns:
the y value at x.
- sapphire.analysis.signal_calibration.loglog_xy_circle_linear(x, radius, slope_high, intercept_high)¶
As xy_circle_linear but in log-log space
- sapphire.analysis.signal_calibration.loglog_linear_circle_linear(x, radius, slope_low, intercept_low, slope_high, intercept_high)¶
As linear_circle_linear but in log-log space