40 def run(self, x, strain) -> cracks.CrackList:
42 Identifies the positions of cracks using [`scipy.signal.find_peaks()`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.find_peaks.html) and returns a \ref cracks.CrackList object.
43 Those \ref cracks.Crack objects are still incomplete.
44 Their effective lengths may need to be recalculated using \ref separation.CrackLengths.run() and the widths \ref strainprofile.StrainProfile.calculate_crack_widths().
45 \param x Positional data.
46 \param strain Strain data.
47 \return Returns a \ref cracks.CrackList.
49 peaks_max, max_properties = scipy.signal.find_peaks(strain, *self.
args, **self.
kwargs)
50 segment_left = max_properties[
"left_bases"]
51 segment_right = max_properties[
"right_bases"]
53 for left_index, peak_index, right_index
in zip(segment_left, peaks_max, segment_right):
58 max_strain=strain[peak_index],
60 crack_list.append(crack)