42 To reduce/avoid boundary effects, genrally crop the data after smoothing.
43 """
44 x_shift = np.array(copy.deepcopy(x_values))
45 z_cropped = np.array(copy.deepcopy(z_values))
46assert z_cropped.ndim in [1, 2], "Dimensions of y_values ({}) not conformant. y_values must be a 1D or 2D array".format(z_cropped.ndim)
47assert x_shift.shape[-1] == z_cropped.shape[-1], "Number of entries do not match! (x_values: {}, y_values: {}.)".format(x_shift.shape[-1], z_cropped.shape[-1])
48if offset isnotNone:
49 x_shift = x_values + offset
50 start_pos = start_pos if start_pos isnotNoneelse x_shift[0]
51 end_pos = end_pos if end_pos isnotNoneelse start_pos + length if length isnotNoneelse x_shift[-1]