EtienneCmb / visbrain

A multi-purpose GPU-accelerated open-source suite for brain data visualization
http://visbrain.org
Other
241 stars 65 forks source link

[Sleep] Channel amplitude max limited #31

Closed skjerns closed 5 years ago

skjerns commented 5 years ago

Currently, the maximum channel amplitude is set to the maximum of the signal. However, in some cases (such as large monitors with clipped signals) it can be preferable to set the maximum channel amplitude (= the scaling) to a higher value (that means, decrease the displayed channel amplitudes).

Suggestion: Remove the upper limit of the maximum amplitude scaling.

I tried to look in the source where I can change this (i.e. _PanAllAmpMax), however, I could not find where the maximum value restriction is set (no call to _PanAllAmpMax.setMaximum anywhere).

EtienneCmb commented 5 years ago

Why would you like to have a smaller signal on the screen?

skjerns commented 5 years ago

Some of my recordings have quite low recording range: this makes low amplitudes appear as massive, if they are not not rescaled. This becomes even more a problem if the window is maximized on a large scree0n (=height being the factor).

Example: capture For me, the third display is far better and quicker to interpret and spot the spindles. (disregard the uV scale at the left, it is not correct)

Most GUIs I worked with were allowing to rescale the signal as big/small as required. Would that be an idea here as well?

EtienneCmb commented 5 years ago

I'm not sure to understand your point, from the GUI you can rescale each channel independently. Are talking about the default behavior of the GUI i.e without further configurations?

skjerns commented 5 years ago

While I can rescale each channel independently, I can't rescale it smaller than a specific factor. Currently the rescaling is limited by the ['max'] of the channel. In my case, the physical ['max'] is denoted as 40.25 (second line). This means I can't set the signal 'smaller' than the middle line in the picture above (maximum amplitde is 40.25). I had to change some parameters in the source to allow a scaling to a maximum amplitude of 90 as in the third signal. Does this make sense? It might be a bit hard to understand what I mean, indeed.

(btw the lines above are 3x the same channel, just with different scaling)

EtienneCmb commented 5 years ago

Hi @skjerns , sorry for the delay. I think I finally got your point. It's true that the min and max of the GUI elements are defined using the min and max of the data (see this function). But we could allow the user to used values under the min or over the max. We just need to find a range.

skjerns commented 5 years ago

Why not leave it entirely up to the user, but set a reasonable standard value? As the user will see immediate feedback on his actions, it's their responsibility to scale it to infinity.

EtienneCmb commented 5 years ago

At least we could set 10. * min() and 10. * max() this should provide a sufficient range

skjerns commented 5 years ago

sounds reasonable!

EtienneCmb commented 5 years ago

Hello @skjerns ,

Sorry for the delay. I recently push a modification (cb36e8a21a4fa0745a43604140718d1312d31a66) to limit channel amplitudes to (10 min, 10 max). This should fix your issue?

skjerns commented 5 years ago

it does :) thanks a lot!