Skip to content

Conversation

bparks13
Copy link
Member

@bparks13 bparks13 commented Sep 16, 2025

This PR updates how scales are rendered and manipulated in channel configuration dialogs. Previously, they were drawn as objects in the same GraphPane as the ProbeInterface objects. Now, there is a secondary pane that is created to the right of the main pane that overrides the default Y-Axis labels and tics to simplify the logic required to maintain these scales over time.

The scale pane and the main pane are tied together so that they pan/zoom whenever the user pans/zooms in the main pane. Due to the separation in panes, all panning and zooming are disabled in the scale pane to avoid any issues.

Devices that utilize this new feature:

  • NeuropixelsV1e
  • NeuropixelsV1f
  • NeuropixelsV2e
  • NeuropixelsV2eBeta

For devices that do not have a scale, such as the Rhs2116, the original behavior is retained with a single pane to draw the probe object.

Fixes #339
Fixes #313

NeuropixelsV1e GIF

npxv1e-scale

NeuropixelsV2e GIF

npxv2e-scale

Rhs2116 GIF

rhs2116-probe

- Add a column to separate the track bar for the channel configuration dialog
@bparks13 bparks13 added this to the 0.7.0 milestone Sep 16, 2025
@bparks13 bparks13 requested a review from jonnew September 16, 2025 14:25
@bparks13 bparks13 self-assigned this Sep 16, 2025
- Only applies for dialogs that need to draw a scale (such as NeuropixelsV1e/V1f and NeuropixelsV2e/V2eBeta)
- Updated the logic for constraining pan/zoom in all dialogs so that the probe is always in view
- Standardized dialog sizes for consistency
- Change background color to WhiteSmoke to provide visual difference between background and probe
- Decrease scale line thickness, and remove boldness from text
- Round the X/Y values when resizing panes to avoid a visual flickering effect
@bparks13
Copy link
Member Author

@jonnew This PR is ready for review again after our meeting today.

@bparks13
Copy link
Member Author

Screenshots of the new color change and scale line/text updates.

Screenshot 2025-09-24 085722 Screenshot 2025-09-24 085835

@bparks13
Copy link
Member Author

During testing, this update solves issue #313 as well. Now, the ChannelConfiguration dialog does not reset the zoom status when resizing.

@jonnew
Copy link
Member

jonnew commented Sep 29, 2025

Please remove ChannelConfigurationDialog.CheckProbeIsInView. It is ad-hoc and its jumpy behavior during use is very annoying. I would much rather have the probe disappear from view rather and simply have a button, or some type of mouse click shortcut, to reset the view. Additionally, its fine to have zoom boudaries, but make them more extreme please. I simply commented out their redefinition away from "20" in the constructors (not sure what that means) and was pretty happy with the result.

Copy link
Member

@jonnew jonnew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost, please see comment. Also because there will no longer be pan boundaries, the scale bar can keep going into the negative, it should display correctly for the entire area it exists over:

Image

@jonnew jonnew self-requested a review September 29, 2025 23:22
Copy link
Member

@jonnew jonnew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

- Add a button that resets the zoom for the channel configuration dialog
- Removed the Reset Zoom buttons from the Neuropixels device dialogs, as it is the same as the new one added to the base dialog
- Leave the zoom in boundaries to the default, except for Rhs2116 where it is decreased
@bparks13 bparks13 requested a review from jonnew September 30, 2025 15:36
@jonnew
Copy link
Member

jonnew commented Oct 7, 2025

Looks good. Please add the attached icon to the button in a way that doesnt bad (couldn't figure out how to resize the panels).

image

You will need to put following png in resources file and add to resources.resx

ZoomFitInPage

Copy link
Member

@jonnew jonnew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve comments, after this its good to merge.

@bparks13 bparks13 merged commit a7dbd50 into main Oct 8, 2025
8 checks passed
@bparks13 bparks13 deleted the issue-339 branch October 8, 2025 21:30
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.

Ruler in neuropixels GUI should be afixed to right Y axis Save zoom state when resizing dialogs

2 participants