Add TraceImageViewer, plus other small updates #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a prototype TraceImageViewer to display current source density (or any kind of signal vs time traces)
Example:

This is a very quick-and-simple minimal implementation, so there are a few known issues:
When the viewer is first opened, and the window displays a time range that extends beyond the edge of the data (e.g. data start at

0, but window is(-2, +8)),setImagefills the whole window, so that the TraceImage is misaliged to traces. Example:The color limits are set based on the local image currently being displayed, not on the full data. This means that the RGB value on one page may not map to the same absolute CSD value on another page. Personally, I actually like it this way, but someone will be surprised by this behavior. Example (there is a 100ms scroll between these two images):


I naively added the ability to change multiplicative gain by scrolling the mousewheel, like in the TraceView, but because of issue 2 above, you can't actually see the effect, so I probably ought to just remove that logic to avoid confusion 🤦
Also made a few other small changes:
sample_rateproperty onBaseAnalogSignalSource, and implemented the property on necessary subclasses.matplotlib.cm.get_cmap(name, N)pattern withmatplotlib.colormaps.get_cmap(name).resampled(N)