We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b4b92f commit 6cb51a4Copy full SHA for 6cb51a4
mne/io/otb/otb.py
@@ -264,10 +264,21 @@ def _preload_data(self, preload):
264
sig_fname = _extras["sig_fname"]
265
266
with tarfile.open(self.filenames[0], "r") as fid:
267
- self._data = np.frombuffer(
268
- fid.extractfile(sig_fname).read(),
269
- dtype=_extras["dtype"],
+ _data = (
+ np.frombuffer(
+ fid.extractfile(sig_fname).read(),
270
+ dtype=_extras["dtype"],
271
+ )
272
+ .reshape(-1, self.info["nchan"])
273
+ .T
274
)
275
+ cals = np.array(
276
+ [
277
+ _ch["cal"] * _ch["range"] * _ch.get("scale", 1.0)
278
+ for _ch in self.info["chs"]
279
+ ]
280
281
+ self._data = _data * cals[:, np.newaxis]
282
283
284
@fill_doc
0 commit comments