Compare commits
3 Commits
7cf9683744
...
13d4db25fa
Author | SHA1 | Date | |
---|---|---|---|
13d4db25fa | |||
5c274c713d | |||
85c9637ce3 |
@ -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 that was installed with homebrew, there is an issue thread on the uldaq repository.
|
||||
For MacOs if you run into problems with the libusb library if 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)
|
||||
|
||||
|
@ -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 16 has only 2 output channels
|
||||
DAC USB 1608GX-2AO 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 16 has only 2 output channels
|
||||
DAC USB 1608GX-2AO 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 Nanosekond it writes a 1 to the specified digital channel
|
||||
0 and after Nano second it writes a 1 to the specified digital channel
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
@ -132,15 +132,20 @@ class Calibration(MccDac):
|
||||
channel1 = np.array(readout[::2])
|
||||
channel2 = np.array(readout[1::2])
|
||||
|
||||
block.create_data_array(
|
||||
stim_data = block.create_data_array(
|
||||
f"stimulus_{db_value}",
|
||||
"Array",
|
||||
"nix.regular_sampled",
|
||||
shape=data.shape,
|
||||
data=channel1,
|
||||
label="Voltage",
|
||||
unit="V",
|
||||
)
|
||||
block.create_data_array(
|
||||
stim_data.append_sampled_dimension(
|
||||
self.SAMPLERATE,
|
||||
label="time",
|
||||
unit="s",
|
||||
)
|
||||
fish_data = block.create_data_array(
|
||||
f"fish_{db_value}",
|
||||
"Array",
|
||||
shape=data.shape,
|
||||
@ -148,6 +153,11 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user