stretch_data#
- static MonostaticRCSPlotter.stretch_data(data, scaling_factor, offset)[source]#
Stretches and scales the input data to a specified range.
This method normalizes the input data between its minimum and maximum values and then applies a linear transformation using the formula:
scaled_data = (data - min) / (max - min) * m + b. The parametersmandbcontrol the scaling and shifting of the normalized data.- Parameters:
- Returns:
numpy.ndarrayorpandas.SeriesTransformed data
Examples
>>> data = np.array([1, 2, 3, 4, 5]) >>> stretched_data = stretch_data(data, 2, 1) >>> print(stretched_data) [1. 1.5 2. 2.5 3. ]