flasc.data_processing.find_sensor_faults#

Module for finding sensor-stuck faults in a dataframe.

Functions

find_sensor_stuck_faults

Find sensor-stuck faults in a dataframe.

flasc.data_processing.find_sensor_faults.find_sensor_stuck_faults(df, columns, ti, stddev_threshold=0.001, n_consecutive_measurements=3, plot_figures=True, verbose=False, return_by_column=False)[source]#

Find sensor-stuck faults in a dataframe.

Parameters:
  • df (pd.DataFrame | FlascDataFrame) -- The dataframe containing the data.

  • columns (list) -- The columns to check for sensor-stuck faults.

  • ti (Any) -- unused

  • stddev_threshold (float, optional) -- The threshold for the standard deviation of the consecutive measurements. Defaults to 0.001.

  • n_consecutive_measurements (int, optional) -- The number of consecutive measurements to compare. Defaults to 3.

  • plot_figures (bool, optional) -- Whether to plot figures for the sensor-stuck faults. Defaults to True.

  • verbose (bool, optional) -- Whether to print verbose output. Defaults to False.

  • return_by_column (bool, optional) -- Whether to return the faults by column. Defaults to False.

Returns:

The indices of the sensor-stuck faults

Return type:

np.array

flasc.data_processing.find_sensor_faults._plot_top_sensor_faults(df, c, index_faults, N_eval_max=5, save_path=None, fig_format='png', dpi=300)[source]#
flasc.data_processing.find_sensor_faults._find_sensor_stuck_single_timearray(measurement_array, no_consecutive_measurements=6, stddev_threshold=0.05, index_array=None)[source]#