rolland.postprocessing.PostProcessing

class rolland.postprocessing.PostProcessing(*args, **kwargs)[source]

Bases: ABCHasTraits

Abstract base class for postprocessing classes.

Parameters:
  • args (t.Any)

  • kwargs (t.Any)

abstractmethod validate_postprocessing()[source]

Validate the postprocessing methods.

static fast_fourier_tr(tsignal, dt)[source]

Calculate the Fast Fourier Transform (FFT) of a time signal.

Parameters:
  • tsignal (numpy.ndarray) – Time signal to transform.

  • dt (float) – Time step between samples.

Returns:

Frequencies and FFT of the signal.

Return type:

tuple

static plot(arrays, labels, title='Universal Plot', x_label='X-axis', y_label='Y-axis', colors=None, plot_type='loglog')[source]

Universal plot function for multiple data sets.

Parameters:
  • arrays (list of tuple) – List of tuples, where each tuple contains two numpy.ndarray (x and y data).

  • labels (list of str) – List of labels for each array.

  • title (str, optional) – Title of the plot. Default is ‘Universal Plot’.

  • x_label (str, optional) – Label for the x-axis. Default is ‘X-axis’.

  • y_label (str, optional) – Label for the y-axis. Default is ‘Y-axis’.

  • colors (list of str, optional) – List of colors for each array. Default is None.

  • plot_type (str, optional) – Type of plot (e.g., ‘loglog’, ‘plot’). Default is ‘loglog’.