corrections module
This module, corrections.py, contains functions for applying various corrections to ArcCheck measurements.
The module includes the following functions:
get_intrinsic_corrections: Calculates the Intrinsic Correction array as an element-wise division of Corrected Counts by Raw Counts.
apply_jager_corrections: Applies Jager pulse rate and dose per pulse corrections to the accumulated count values.
pulse_rate_correction: Corrects the count values using the Jager pulse rate correction coefficients.
dose_per_pulse_correction: Corrects the count values using the Jager dose per pulse correction coefficients.
This module is part of a larger project aimed at analyzing and correcting dose rate dependencies in ArcCheck measurements.
- corrections.apply_jager_corrections(counts_accumulated_df, bkrnd_and_calibration_df, intrinsic_corrections=None)[source]
Apply Jager pulse rate and dose per pulse corrections.
- corrections.dose_per_pulse_correction(counts_acummulated_df, bkrnd_and_calibration_df, jager_dpp_coefficients)[source]
Corrects the count values in the dataframe using the Jager dose per pulse correction coefficients.
Parameters: counts_df (DataFrame): A pandas DataFrame containing the accumulated count values. jager_dpp_coefficients (ndarray): An array containing the Jager dose per pulse correction coefficients.
Returns: jcf_dpp_df (DataFrame): A pandas DataFrame containing the Jager correction factor values.
- corrections.get_intrinsic_corrections(array_data)[source]
Calculate the Intrinsic Correction array as an element-wise division of Corrected Counts by Raw Counts, including preserving the positional data in the first two columns and the last three rows, and ensuring the first row retains its original values from Corrected Counts. The very last row, consisting solely of None values, is left unchanged to match other arrays’ structures.
Parameters: array_data (dict): A dictionary containing numpy arrays including ‘Corrected Counts’ and ‘Raw Counts’.
Returns: numpy.ndarray: An array of intrinsic corrections, including positional data, or None if an error occurs.
- corrections.pulse_rate_correction(counts_accumulated_df, bkrnd_and_calibration_df, jager_pr_coefficients)[source]
Corrects the count values in the dataframe using the Jager pulse rate correction coefficients.
Parameters: counts_accumulated_df (DataFrame): A pandas DataFrame containing the accumulated count values. jager_pr_coefficients (ndarray): An array containing the Jager pulse rate correction coefficients.
Returns: jcf_pr_df (DataFrame): A pandas DataFrame containing the Jager correction factor values.