MetaEventTabView¶
class MetaEventTabView()
Bases: MetaView
Shared base for the Views of the two event-oriented analysis tabs.
RawDataView and EventAnalysisView both drive a tab that works from a
reader and a time-series channel rather than from a database of results: the user
picks a reader, a filter and a channel, and the tab finds or fits events in the
raw signal. The two carried five methods verbatim between them; this base holds
that shared half so there is one copy to fix.
What a subclass inherits:
Two of ``MetaView``’s abstract hooks, made concrete.
notify_plugin_state_changedis a deliberate no-op for both tabs - neither shows a database column list, so a plugin-state change elsewhere in the app is not their business - and_reset_actionsclears the figure identically in each.MetaViewstill declares both abstract; satisfying them here is what keeps both subclasses instantiable without a per-tab copy._channels_from, which reads the channel selection out of a parameter dict and reports a missing one asValueError, which every caller already guards.Commit-time helpers.
_extract_commit_event_parametersandvalidate_single_channelread the controls panel’s channel selection and reject anything that is not exactly one channel.The event-index range helpers.
_parse_event_indices,_expand_event_indices,_shift_ranges,_merge_rangesand_format_rangesturn the event-index field’s text into ranges and back. Only these two tabs call them, which is why they are here rather than onMetaView; they are pure apart from one logger call.
What a subclass owes it:
Its own
logger = logging.getLogger(__name__), so records made by the methods it defines itself stay attributed to its own module.``MetaView``’s remaining abstract methods -
_init,handle_parameter_changeandupdate_available_plugins- which this base does not implement.
- ivar logger:
the module logger the shared methods below log under
Public Methods¶
Abstract Methods¶
These methods must be implemented by subclasses.
(none)
Concrete Methods¶
- MetaEventTabView.confirm_unfiltered_run(operation: str) bool¶
Ask the user to confirm launching an analysis with no filter selected.
Running an event finder or fitter on unfiltered data is a legitimate choice, but on a noisy trace it can be a degenerate one: the threshold is crossed constantly and effectively every sample registers as an event, which grinds for a very long time and is easy to mistake for a hang. Cancelling does work -
find_eventsreads the abort flag at every chunk boundary and breaks out of the range immediately - but with that many events a single chunk takes long enough that the cancel can look as though it has not registered.Shared by the two tabs that launch this kind of work rather than copied into both. It is stateless and adds no contract, which is what makes it safe on the common base: it carries no instance state and adds no abstract hook, so a subclass that never calls it pays nothing.
Private Methods¶
Abstract Methods¶
These methods must be implemented by subclasses.
(none)