obci_readmanager.signal_processing.tags.smart_tag_definition module¶
Module defines classes representing smart tag definition.
Smart tag definition is a data structure defining what kind of bunches of samples smart tag is to provide. By now we have a general, abstract class SmartTagDefinition.
Concrete classes are:
- SmartTagEndTagDefinition
- SmartTagDurationDefinition
see concrete classes definitions to learn how to use them.
Bases:
object
An abstract class storing general info. See subclasses defs.
Bases:
obci_readmanager.signal_processing.tags.smart_tag_definition.SmartTagDefinition
It is a constructor parameter for SmartTagsManager.
The class is to be used for following requirement: ‘We want to extract bunches of samples starting from some particular tag type and lasting x miliseconds.
Constructor`s parameters and (at the same time) public slots: - start_tag_name - string - start_offset - float (default 0) - end_offset - float (default 0) - duration - float
- x = SmartTagDuration(start_tag_name=’ugm_config’,
- start_offset=-10.0, end_offset=20.0, duration=100.0)
Consider samples file f, and tag scattered on the timeline like that: —100ms——————300ms———–400ms———500ms————- ugm_config ugm_config ugm_break ugm_config
Using x definition means: Generate following samples bunches: - 90ms;220ms - 290ms;420ms - 490ms;620ms
Type check - return true if p_type is end_tag.
Bases:
obci_readmanager.signal_processing.tags.smart_tag_definition.SmartTagDefinition
It is a constructor parameter for SmartTagsManager.
The class is to be used for following requirement: ‘We want to extract bunches of samples starting from some particular tag type and ending with some particular tag type.’
Constructor`s parameters and (at the same time) public slots: - start_tag_name - string - start_offset - float (default 0) - end_offset - float (default 0) - end_tags_names - list of strings.
- x = SmartTagEndTagDefinition(start_tag_name=’ugm_config’,
- start_offset=-10.0, end_offset=20.0, end_tags_names=[‘ugm_config’, ‘ugm_break’])
Consider samples file f, and tag scattered on the timeline like that: —100ms——————300ms———–400ms———500ms———-700ms ugm_config ugm_config ugm_break ugm_config
Using x definition means: Generate following samples bunches: - 90ms;320ms - 290ms;420ms
Type check - return true if p_type is end_tag.