Commit aa8b852a authored by Niklas Selke's avatar Niklas Selke
Browse files

Set the 'data_capture_value' to the correct value for all 'data_capture' inputs.

parent b2901dc8
......@@ -4,6 +4,7 @@ This module contains the following function:
calculate_statistics - calculate the requested statistics
"""
from toarstats.defaults import DEFAULT_DATA_CAPTURE
from toarstats.input_checks import check_input_parameters
from toarstats.stats_utils import create_reference_data_frame
......@@ -107,6 +108,12 @@ def calculate_statistics(
)
resample_rule = ("seasonal" if input_parameters.sampling == "vegseason"
else input_parameters.sampling)
if input_parameters.data_capture is not None:
data_capture_value = input_parameters.data_capture
elif "diurnal_cycle" in input_parameters.statistics:
data_capture_value = 0.5
else:
data_capture_value = DEFAULT_DATA_CAPTURE
reference_data_frame = create_reference_data_frame(
input_parameters.data.index
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment