Skip to content

Commit

Permalink
Use int 16 conversion variable
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbray32 committed Nov 1, 2023
1 parent 15cd4b3 commit d859f90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/spikegadgets_to_nwb/spike_gadgets_raw_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,8 @@ def get_analogsignal_multiplexed_partial(
# read the data into int16
data = (

Check warning on line 615 in src/spikegadgets_to_nwb/spike_gadgets_raw_io.py

View check run for this annotation

Codecov / codecov/patch

src/spikegadgets_to_nwb/spike_gadgets_raw_io.py#L615

Added line #L615 was not covered by tests
self._raw_memmap[i_start:i_stop, data_offsets[:, 0]]
+ self._raw_memmap[i_start:i_stop, data_offsets[:, 0] + 1] * 256
+ self._raw_memmap[i_start:i_stop, data_offsets[:, 0] + 1]
* INT_16_CONVERSION
)
# initialize the first row
analog_multiplexed_data[0] = data[0]

Check warning on line 621 in src/spikegadgets_to_nwb/spike_gadgets_raw_io.py

View check run for this annotation

Codecov / codecov/patch

src/spikegadgets_to_nwb/spike_gadgets_raw_io.py#L621

Added line #L621 was not covered by tests
Expand Down Expand Up @@ -920,7 +921,7 @@ def get_analogsignal_multiplexed(self, channel_names=None) -> np.ndarray:
# read the data into int16
data = (

Check warning on line 922 in src/spikegadgets_to_nwb/spike_gadgets_raw_io.py

View check run for this annotation

Codecov / codecov/patch

src/spikegadgets_to_nwb/spike_gadgets_raw_io.py#L922

Added line #L922 was not covered by tests
self._raw_memmap[:, data_offsets[:, 0]]
+ self._raw_memmap[:, data_offsets[:, 0] + 1] * 256
+ self._raw_memmap[:, data_offsets[:, 0] + 1] * INT_16_CONVERSION
)
# initialize the first row
# if no previous state, assume first segment. Default to superclass behavior
Expand Down

0 comments on commit d859f90

Please sign in to comment.