elasticai.preprocessor._basics#

Module Contents#

Classes#

DataTransient

Dataclass for handling the transient data inside the pipeline Attributes: data: Numpy array of the data sampling_rate: Float with sampling rate [Hz]

DataSpectral

Dataclass for handling the spectral data inside the pipeline Attributes: data: Numpy array of the data sampling_rate: Float with sampling rate [Hz]

DataWaveform

Dataclass for handling the waveform data inside the pipeline Attributes: waveform: Numpy array of the data xpos: Numpy array with positions which an event is detected label: Numpy array with labels for each event sampling_rate: Float with sampling rate [Hz]

PreprocessingModule

Functions#

get_path_to_project

Function for getting the path to find the project folder structure in application.

Data#

API#

elasticai.preprocessor._basics.get_path_to_project(new_folder: str = '') → pathlib.Path[source]#

Function for getting the path to find the project folder structure in application.

Parameters:

new_folder – New folder path

Returns:

String of absolute path to start the project structure

class elasticai.preprocessor._basics.DataTransient[source]#

Dataclass for handling the transient data inside the pipeline Attributes: data: Numpy array of the data sampling_rate: Float with sampling rate [Hz]

data: numpy.ndarray | Any#

None

sampling_rate: float#

None

class elasticai.preprocessor._basics.DataSpectral[source]#

Dataclass for handling the spectral data inside the pipeline Attributes: data: Numpy array of the data sampling_rate: Float with sampling rate [Hz]

data: numpy.ndarray#

None

freq: numpy.ndarray#

None

sampling_rate: float#

None

class elasticai.preprocessor._basics.DataWaveform[source]#

Dataclass for handling the waveform data inside the pipeline Attributes: waveform: Numpy array of the data xpos: Numpy array with positions which an event is detected label: Numpy array with labels for each event sampling_rate: Float with sampling rate [Hz]

waveform: numpy.ndarray#

None

xpos: numpy.ndarray#

None

label: numpy.ndarray#

None

sampling_rate: float#

None

property length: int#
property num_samples: int#
property is_data_labeled: bool#
elasticai.preprocessor._basics.TIn#

‘TypeVar(…)’

elasticai.preprocessor._basics.TOut#

‘TypeVar(…)’

class elasticai.preprocessor._basics.PreprocessingModule[source]#

Bases: abc.ABC, typing.Generic[elasticai.preprocessor._basics.TIn, elasticai.preprocessor._basics.TOut]

abstractmethod __call__(x: elasticai.preprocessor._basics.TIn) → elasticai.preprocessor._basics.TOut[source]#
abstractmethod forward(x: numpy.ndarray) → numpy.ndarray[source]#

Forward function for processing the input data stream to new output format

Parameters:

x – Numpy array with input data stream

Returns:

Numpy array with output data stream

__repr__() → str[source]#
abstractmethod create_design(id: str, target: str, path2save: pathlib.Path, total_bitwidth: int, frac_bitwidth: int, is_signed: bool) → None[source]#

Function for creating the hardware design of this processing module

Parameters:
  • id – String with ID of this hardware design

  • target – Target for hardware design (PC, MCU, FPGA, ASIC)

  • path2save – Path to the saved hardware designs

  • total_bitwidth – Integer with total bitwidth of each value for processing

  • frac_bitwidth – Integer with fraction bitwidth if FxP is applied

  • is_signed – Boolean if signed integers is used

Returns:

None