8.6.1.5. pymodaq_data.h5modules.exporter module
Created the 02/03/2023
@author: Nicolas Tappy
- class pymodaq_data.h5modules.exporter.ExporterFactory[source]
Bases:
objectThe factory class for creating executors
Methods
create_exporter(extension, filter)Factory command to create the exporter object.
Create the file filters string
get_format_from_filter(filter)Returns the string format description removing the extension part
Class decorator method to register exporter class to the internal registry.
- classmethod create_exporter(extension, filter)[source]
Factory command to create the exporter object. This method gets the appropriate executor class from the registry and instantiates it. :param extension: the extension of the file that will be exported :type extension:
str:param filter: the filter string :type filter:str- Return type:
H5Exporter
- classmethod register_exporter()[source]
Class decorator method to register exporter class to the internal registry. Must be used as decorator above the definition of an H5Exporter class. H5Exporter must implement specific class attributes and methods, see definition: h5node_exporter.H5Exporter See h5node_exporter.H5txtExporter and h5node_exporter.H5txtExporter for usage examples.
- Return type:
- Returns:
the exporter class
- static get_format_from_filter(filter)[source]
Returns the string format description removing the extension part
- exporters_registry = {'ascii': {'Ascii flimj file': <class 'pymodaq_data.h5modules.exporters.flimj.H5asciiExporter'>}, 'h5': {'Single node h5 file': <class 'pymodaq_data.h5modules.exporters.base.H5h5Exporter'>}, 'npy': {'Binary NumPy format': <class 'pymodaq_data.h5modules.exporters.base.H5npyExporter'>}, 'txt': {'Text files': <class 'pymodaq_data.h5modules.exporters.base.H5txtExporter'>}}
- file_filters = {}