models.node.generator.file package#

Submodules#

models.node.generator.file.csvfile module#

class models.node.generator.file.csvfile.CSVFile(parameters=None)[source]#

Bases: SingleRunGeneratorNode

Node that reads data from a CSV file and sends it to its outputs. It can be used to read data from a file and send it to a processing pipeline.

When the node is initialized, it reads the CSV file and stores its data in memory(FrameworkData class). When the node is executed, it sends the data to its outputs.

If you want to use this node in your pipeline, you must define the following parameters in the pipeline configuration.json file:

name (str): Node name.

module (str): Current module name (in this case models.node.generator.file.csvfile).

type (str): Current node type (in this case CSVFile).

file_path (str): Path to the CSV file.

sampling_frequency (float): The sample frequency used to collect the data in the CSV file.

timestamp_column_name (str, optional): Name of the column that contains the timestamp data.

channel_column_names (List[str], optional): List of column names of the channels that will be read from the CSV file.

buffer_options (dict): Buffer options.

clear_output_buffer_on_generate (bool): If True, the output buffer will be cleared when the node is executed.

outputs (dict): Dictionary containing the node outputs. Where you want to send the data read from the CSV file to, in other words, the next node in the pipeline.

OUTPUT_MAIN: Final[str] = 'main'#
OUTPUT_TIMESTAMP: Final[str] = 'timestamp'#
dispose() None[source]#

Node self implementation of disposal of allocated resources.

models.node.generator.file.csvfilearray module#

class models.node.generator.file.csvfilearray.CSVFileArray(parameters=None)[source]#

Bases: SingleRunGeneratorNode

Node that reads data from multiple CSV files and outputs it as a FrameworkData object. The working principle is similar to the CSVFile node, but it reads multiple files instead of one.

When the node is initialized, it reads the CSV files and stores their data in memory(FrameworkData class). When the node is executed, it sends the data to its outputs.

If you want to use this node in your pipeline, you must define the following parameters in the pipeline configuration.json file:

name (str): Node name.

module (str): Current module name (in this case models.node.generator.file.csvfilearray).

type (str): Current node type (in this case CSVFileArray).

file_path (List[str]): List of paths to the CSV files.

sampling_frequency (float): The sample frequency used to collect the data in the CSV file.

timestamp_column_name (str, optional): Name of the column that contains the timestamp data.

channel_column_names (List[str], optional): List of column names of the channels that will be read from the CSV file.

buffer_options (dict): Buffer options.

clear_output_buffer_on_generate (bool): If True, the output buffer will be cleared when the node is executed.

output (dict): Dictionary containing the node outputs. Where you want to send the data read from the CSV file to, in other words, the next node in the pipeline.

OUTPUT_MAIN: Final[str] = 'main'#
OUTPUT_TIMESTAMP: Final[str] = 'timestamp'#
dispose() None[source]#

Node self implementation of disposal of allocated resources.

Module contents#