Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TraceImageViewer, plus other small updates #177

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

grahamfindlay
Copy link

Added a prototype TraceImageViewer to display current source density (or any kind of signal vs time traces)

Example:
spw_viewer_example

This is a very quick-and-simple minimal implementation, so there are a few known issues:

  1. 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)), setImage fills the whole window, so that the TraceImage is misaliged to traces. Example:
    misaligned

  2. 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):
    aligned
    local_color_scale

  3. 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:

  1. Put abstract sample_rate property on BaseAnalogSignalSource, and implemented the property on necessary subclasses.
  2. Removed unused imports in several places
  3. Replaced deprecated matplotlib.cm.get_cmap(name, N) pattern with matplotlib.colormaps.get_cmap(name).resampled(N)

@TomBugnon
Copy link

Hi @samuelgarcia, what's the status on this? Can we merge or is there an alternative?

@justidy1
Copy link

@samuelgarcia just bumping this thread since it would be nice to have this feature merged!

@samuelgarcia
Copy link
Collaborator

Oups. Thank you for the reminder.
I will go back on this. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants