36 def run(self, x: np.array, strain: np.array, strain_inst: np.array) -> np.array:
38 The influence of concrete creep and shrinking is calculated.
39 All of the parameters are assumed to be in sync and sanitized.
40 \param x Positional data.
41 \param strain Strain data, belonging to `x`, that was measured with time delay after applying the load.
42 \param strain_inst Instantaneous strain belonging to `x`, that appear right after applying the load to the structure.
43 \return Returns an array of same length as the given arrays.
45 assert all(entry
is not None for entry
in [x, strain, strain_inst]),
"Can not compute shrink compensation. At least one of `x`, `strain` and `strain_inst` is None! Please provide all of them!"
46 peaks_min, properties = scipy.signal.find_peaks(-strain_inst, *self.
args, **self.
kwargs)
47 strain_min_inst = np.array([strain_inst[i]
for i
in peaks_min])
48 strain_min = np.array([strain[i]
for i
in peaks_min])
49 min_diff = np.mean(strain_min - strain_min_inst)
50 shrink_calibration_values = np.full(len(x), min_diff)
51 return shrink_calibration_values