| |
- acquire_data(mongo_client: mongo.OpqMongoClient, event_id: int, box_id: str, name: str, filter_order: int, filter_cutoff_frequency: float, frequency_samples_per_window: int, filter_down_sample_factor: int) -> Tuple[mauka_pb2.MaukaMessage, mauka_pb2.MaukaMessage, mauka_pb2.MaukaMessage, mauka_pb2.MaukaMessage]
- Given an event_id, acquire the raw data for each box associated with the given event. Perform feature
extraction of the raw data and publish those features for downstream plugins.
:param box_id: The box id.
:param mongo_client: The mongo client to use to make this request.
:param event_id: The event id to acquire data for.
:param name: The name of the service requesting data.
:param filter_order:
:param filter_cutoff_frequency:
:param frequency_samples_per_window:
:param filter_down_sample_factor:
- find_zero_xings(waveform: numpy.ndarray) -> numpy.ndarray
- Function which returns a boolean array indicating the positions of zero crossings in the the waveform
:param waveform:
:return: a boolean array indicating the positions of zero crossings in the the waveform
- frequency(samples: numpy.ndarray, down_sample_factor: int) -> float
- Calculates the frequency of the supplied samples
:param samples: Samples to calculate frequency over.
:param down_sample_factor: the down sampling factor from the filtering, used to modify the sampling rate
:return: The frequency value of the provided samples in Hz.
- frequency_waveform(waveform: numpy.ndarray, window_size: int, filter_order: int, cutoff_frequency: float, down_sample_factor) -> numpy.ndarray
- Calculated frequency of a waveform using a given window size. In most cases, our window size should be the
number of samples in a cycle.
:param waveform: The waveform to find frequency values for.
:param window_size: The size of the window used to compute frequency over the waveform.
:param filter_order: order of band pass butterworth filter
:param cutoff_frequency: cutoff frequency of low pass butterworth filter to smooth digital signal
:param down_sample_factor: The down sample factor
:return: An array of frequency values calculated for a given waveform.
- rerun(event_id: int)
- Rerun all makai events through the Mauka analysis pipeline.
:param event_id: The event id to rerun through the Mauka analysis pipeline.
- smooth_waveform(sample: numpy.ndarray, filter_order: int = 2, cutoff_frequency: float = 500.0, downsample_factor: int = 4) -> numpy.ndarray
- Method to smooth waveform using a butterworth filter to lower sensitivity of frequency calculation.
:param sample:
:param filter_order:
:param cutoff_frequency:
:param downsample_factor: downsample factor for decimate function
:return:
- vrms(samples: numpy.ndarray) -> float
- Calculates the Voltage root-mean-square of the supplied samples
:param samples: Samples to calculate Vrms over.
:return: The Vrms value of the provided samples.
- vrms_waveform(waveform: numpy.ndarray, window_size: int = 200.0) -> numpy.ndarray
- Calculated Vrms of a waveform using a given window size. In most cases, our window size should be the
number of samples in a cycle.
:param waveform: The waveform to find Vrms values for.
:param window_size: The size of the window used to compute Vrms over the waveform.
:return: An array of vrms values calculated for a given waveform.
|