GasChallengeAnalyser#
- class patato.GasChallengeAnalyser(smoothing_window_size=10, display_output=True, smoothing_sigma=2, start_skip=0, challenge_type=1, buffer_width=5)#
Bases:
SpatialProcessingAlgorithm
Analyser for oxygen-enhanced datasets. Takes in a time-series of sO2 data (or any other parameter) and produces a delta sO2.
- __init__(smoothing_window_size=10, display_output=True, smoothing_sigma=2, start_skip=0, challenge_type=1, buffer_width=5)[source]#
Gas challenge analyser.
- Parameters:
smoothing_window_size (int) – The size of the window to use for smoothing the data.
display_output (bool) – Whether to display the output, and ask for a response to confirm the fit is good.
smoothing_sigma (float) – The sigma to use for the gaussian smoothing.
start_skip (int) – The number of frames to skip at the start of the data.
challenge_type (int) – The type of challenge to use. 1 is the standard challenge (air -> oxygen), -1 is the reverse (oxygen -> air).
buffer_width (int) – The number of frames to use as a buffer at the start and end of the challenge.
Methods
__init__
([smoothing_window_size, ...])Gas challenge analyser.
add_child
(child)get_algorithm_id
()run
(so2, pa_data[, reference_name])This algorithm takes in a so2 time series and a PA data object (pa_data) and returns a tuple containing the delta sO2 (change in sO2 between the baseline and the challenge), an empty dictionary (for compatibility with other processing methods), and a list containing the mean and standard deviation of the baseline sO2.
- run(so2: SingleParameterData, pa_data: PAData, reference_name=('reference_', '0'), **kwargs) Tuple[SingleImage, dict, List[ProcessingResult] | None] | None [source]#
This algorithm takes in a so2 time series and a PA data object (pa_data) and returns a tuple containing the delta sO2 (change in sO2 between the baseline and the challenge), an empty dictionary (for compatibility with other processing methods), and a list containing the mean and standard deviation of the baseline sO2.
- Parameters:
so2 (SingleParameterData) – The sO2 time series.
pa_data (PAData) – The PA data object.
reference_name (Tuple[str, str] or ROI) – The name of the reference region to use.
kwargs (dict) – Additional keyword arguments, provided for compatibility with other processing methods.
- Returns:
A tuple containing the delta sO2, an empty dictionary (for compatibility with other processing methods), and a list containing the mean and standard deviation of the baseline sO2.
- Return type:
Tuple[SingleImage, dict, Optional[List[ProcessingResult]]] or None