cait.calibration

class cait.calibration.PulserModel(start_saturation, max_dist, **kwargs)[source]

Bases: object

A model to unfold the detector effects of cryogenic detectors.

The model is to predict the equivalent test pulse values for particle event recoils within the detector crystal. Additional kew word arguments get passed to the regressor model!

This method was described in M. Stahlberg, Probing low-mass dark matter with CRESST-III : data analysis and first results, available via https://doi.org/10.34726/hss.2021.45935 (accessed on the 9.7.2021).

Parameters
  • start_saturation (float) – Test pulses with average pulse heights above this value are excluded from the fit.

  • max_dist (float) – The maximal distance between two test pulses such that they are included still in the same regression. For test pulses further apart, a new regression is started.

fit(tphs, tpas, tp_hours, exclude_tpas=[], interpolation_method='linear', LOWER_ALPHA=0.16, MIDDLE_ALPHA=0.5, UPPER_ALPHA=0.84)[source]

Fit the model to given test pulse heights and amplitudes.

This fits a linear model or a gradient boosted regression tree for each test pulse amplitude in the pulse height - time plane.

Parameters
  • tphs (1D array) – The pulse heights of the test pulses.

  • tpas (1D array) – The test pulse amplitudes.

  • tp_hours (1D array) – The hours time stamps of the test pulses.

  • exclude_tpas (list) – A list of TPA values that are excluded from the fit.

  • interpolation_method (string) – Either ‘linear’ or ‘forest’. Either a linear model or a random forest is used for the interpolation of test pulse pulse height.

  • LOWER_ALPHA (float) – For the regression tree, this gives the quantile for the upper prediction band.

  • MIDDLE_ALPHA (float) – For the regression tree, this gives the quantile for the central prediction band.

  • UPPER_ALPHA (float) – For the regression tree, this gives the quantile for the lower prediction band.

plot(dpi=None, plot_only_first_poly=True, plot_poly_timestamp=None, poly_order=3, ylim=None, xlim=None, tpa_range=None, rasterized=True)[source]

Plot a scatter plot of the test pulse pulse heights vs time and the fitted polynomial in the TPA/PH plane.

Parameters
  • dpi (int) – The dots per inch of the plots.

  • plot_only_first_poly (bool) – If true, only the polynomial from the middle of the first consecutive record interval is plotted, otherwise all are plotted.

  • plot_poly_timestamp (float) – Time stamp at which the polynomial is plotted.

  • poly_order (int) – The order of the polynomial to fit in the TPA/PH plane.

  • ylim (2-tuple) – The limits on the y axis (pulse height).

  • xlim (2-tuple) – The limits on the x axis (time).

  • tpa_range (tuple) – The limits on the y axis (tpa).

  • rasterized (tuple) – The scatter plot gets rasterized (much faster).

predict(evhs, ev_hours, poly_order, cpe_factor=None)[source]

Predict the equivalent test pulse value for given pulse heights.

Parameters
  • evhs (1D array) – The pulse heights of the events to predict equivalent TPA values for.

  • ev_hours (1D array) – The hours time stamps of the events to predict equivalent TPA values for.

  • poly_order (int) – The order of the polynomial to fit in the TPA/PH plane.

  • cpe_factor (float) – The CPE factor, which linearly maps TPA values to recoil energies.

  • interpolation_method (string) – Either ‘linear’ or ‘tree’. Either a linear model or a regression tree is used for the interpolation of test pulse pulse height.

Returns

(the recoil energies, the 1 sigma uncertainties on the recoil energies, the equivalent tpa values, the 2 sigma uncertainties on the equivalent tpa values)

Return type

4-tuple of 1D arrays

cait.calibration.energy_calibration(evhs, ev_hours, tphs, tpas, tp_hours, start_saturation, max_dist, cpe_factor, smoothing_factor=0.95, exclude_tpas=[], plot=False)[source]

Attention! This function is deprecated! Please use the PulserModel class instead!

cait.calibration.light_yield_correction(phonon_energy, light_energy, scintillation_efficiency)[source]

Return the recoil energy, corrected for the energy loss to scintillation light.

This method was described in “F. Reindl (2016), Exploring Light Dark Matter With CRESST-II Low-Threshold Detectors”, available via http://mediatum.ub.tum.de/?id=1294132 (accessed on the 9.7.2021).

Parameters
  • phonon_energy (1D float array) – The recoil energies of the phonon channel, in keV.

  • light_energy (1D float array) – The recoil energies of the light channel, in keV electron equivalent.

  • scintillation_efficiency (float) – The scintillation efficiency of the crystal.

Returns

The corrected recoil energies.

Return type

1D float array