bids-standard / pybv

A lightweight I/O utility for the BrainVision data format, written in Python.

Home Page:https://pybv.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set unit to microvolts

cbrnr opened this issue · comments

It seems like it is currently not possible to set the resolution and unit independently. As soon as resolution <= -7 (which is True for the default), the unit is set to nV.

However, I just had a conversation with a BrainProducts developer regarding potential issues with the unit. Specifically, he said that BrainVision Analyzer currently expects the unit to be µV. If it's something else, auto-scaling doesn't work (at least the initial view).

Therefore, I would like to suggest to add an option that controls the unit. Possible values could include 'V', 'mV', 'uV', 'µV', and 'nV'. I would set the default to 'uV' (which is also the expected unit if the unit field in the exported file is empty).

There could also be an 'auto' value, which would replicate the current behavior.

Hi @cbrnr ... always good to get some info from Brain Products. Thanks for reporting the potential issue :-)

I think your suggestion is reasonable, especially when 'auto' is added as an option.

@tstenner implemented that current behavior, perhaps he has something to say about this.

The PRs in question (#17 and #20) will have their anniversary in less than a month so I don't recall the exact reasoning, but I think giving the scale in µV uses more digits for the same precision or cuts off more digits than I was comfortable with.