Compare commits

..

No commits in common. "13d4db25fa2ee3cb58af71debea2c38eaa91f533" and "7cf9683744ce6e78177ff04b70b8c9cfbe6560bf" have entirely different histories.

3 changed files with 7 additions and 17 deletions

View File

@ -7,7 +7,7 @@ Implementing [relacs](https://github.com/relacs/relacs) with MCC USB 1608GX-2AO
# Installation
You have to install the MCC library (follow the installing instructions for [linux/macOS](https://github.com/mccdaq/uldaq) or [windows](https://github.com/mccdaq/mcculw)).
For MacOs if you run into problems with the libusb library if installed with homebrew, there is an issue thread on the uldaq repository.
For MacOs if you run into problems with the libusb library that was installed with homebrew, there is an issue thread on the uldaq repository.
[https://github.com/mccdaq/uldaq/issues/44](https://github.com/mccdaq/uldaq/issues/44)

View File

@ -154,7 +154,7 @@ class MccDac:
channels : list[int]
channels to read from, provide only two int's in a list (ex [0, 1])
for sampling from the range(channel0, channel1)
DAC USB 1608GX-2AO has only 2 output channels
DAC 16 has only 2 output channels
samplerate : float
samplerate for the duration of sampling
@ -206,7 +206,7 @@ class MccDac:
channels : list[int]
channels to read from, provide only two int's in a list (ex [0, 1])
for sampling from the range(channel0, channel1)
DAC USB 1608GX-2AO has only 2 output channels
DAC 16 has only 2 output channels
"""
try:
@ -228,7 +228,7 @@ class MccDac:
def digital_trigger(self, ch: int = 0) -> None:
"""
Writes a 1 to a specified digital channel, if the channel is already on 1 switches it to
0 and after Nano second it writes a 1 to the specified digital channel
0 and after Nanosekond it writes a 1 to the specified digital channel
Parameters
----------

View File

@ -132,20 +132,15 @@ class Calibration(MccDac):
channel1 = np.array(readout[::2])
channel2 = np.array(readout[1::2])
stim_data = block.create_data_array(
block.create_data_array(
f"stimulus_{db_value}",
"nix.regular_sampled",
"Array",
shape=data.shape,
data=channel1,
label="Voltage",
unit="V",
)
stim_data.append_sampled_dimension(
self.SAMPLERATE,
label="time",
unit="s",
)
fish_data = block.create_data_array(
block.create_data_array(
f"fish_{db_value}",
"Array",
shape=data.shape,
@ -153,11 +148,6 @@ class Calibration(MccDac):
label="Voltage",
unit="V",
)
fish_data.append_sampled_dimension(
self.SAMPLERATE,
label="time",
unit="s",
)
beat = channel1 + channel2
beat_square = beat**2