Spectrum Scope
- class gpype.frontend.widgets.spectrum_scope.SpectrumScope[source]
Bases:
ScopeFrequency domain visualization widget for spectral analysis.
Displays real-time frequency spectrum of input signals with configurable amplitude limits and averaging.
- DEFAULT_AMPLITUDE_LIMIT = 50.0
Default maximum amplitude for display scaling
- DEFAULT_NUM_AVERAGES = 10
Default number of spectra to average for smoothing
- CAPTION = 'Spectrum Scope'
Caption when the author names the scope nothing.
- MIN_AMPLITUDE_LIMIT = 1.0
Accepted range for
amplitude_limit, in microvolts. Named so that a form can offer a slider with the right bounds.
- MAX_AMPLITUDE_LIMIT = 5000.0
- class Configuration[source]
Bases:
Configuration- class Keys[source]
Bases:
Keys- AMPLITUDE_LIMIT = 'amplitude_limit'
Configuration key for maximum amplitude display limit
- NUM_AVERAGES = 'num_averages'
Configuration key for number of averaging samples
- class EmptyableKeys[source]
Bases:
objectOptional keys that may also be empty.
Deliberately not
OptionalKeys. That name means one specific thing to ioiocore – may be absent, but must not be empty when present (Configuration.__init__) – and an empty list is a legitimate value for every key declared here: no markers, no hidden channels. Declaring them under the name the validator reads makesmarkers=[]raise.Measured, so that nobody has to rediscover it:
OptionalKeys markers=[] -> ValueError, must not be empty EmptyableKeys markers=[] -> accepted
The name is still the declaration a reader and a catalog generator look for; it is only kept out of the validator’s emptiness rule. The underlying gap is ioiocore’s: there is no way to say “optional, and empty is fine”.
- HIDDEN_CHANNELS = 'hidden_channels'
Configuration key for list of channels to hide from display
- __init__(amplitude_limit=None, num_averages=None, hidden_channels=None, refresh_rate=None, edge_id=None, **kwargs)[source]
Initialize the SpectrumScope widget.
- Parameters:
amplitude_limit (
float) – Maximum amplitude for display scaling. Defaults to 50.num_averages (
int) – Number of spectra to average. Defaults to 10.hidden_channels (
list) – List of channel indices to hide. Defaults to empty list.refresh_rate (
float) – Repaints per second. Defaults to DEFAULT_REFRESH_RATE.edge_id (
Optional[str]) – Which edge runs this node, matched against the edge process’s –edge-id. None, the default, is every edge; ignored when the pipeline is not distributed.**kwargs – Additional arguments passed to parent classes.