forked from awendt/pyrelacs
adding sampled dimensions for nix data arrays
This commit is contained in:
parent
5c274c713d
commit
13d4db25fa
@ -132,15 +132,20 @@ class Calibration(MccDac):
|
|||||||
channel1 = np.array(readout[::2])
|
channel1 = np.array(readout[::2])
|
||||||
channel2 = np.array(readout[1::2])
|
channel2 = np.array(readout[1::2])
|
||||||
|
|
||||||
block.create_data_array(
|
stim_data = block.create_data_array(
|
||||||
f"stimulus_{db_value}",
|
f"stimulus_{db_value}",
|
||||||
"Array",
|
"nix.regular_sampled",
|
||||||
shape=data.shape,
|
shape=data.shape,
|
||||||
data=channel1,
|
data=channel1,
|
||||||
label="Voltage",
|
label="Voltage",
|
||||||
unit="V",
|
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}",
|
f"fish_{db_value}",
|
||||||
"Array",
|
"Array",
|
||||||
shape=data.shape,
|
shape=data.shape,
|
||||||
@ -148,6 +153,11 @@ class Calibration(MccDac):
|
|||||||
label="Voltage",
|
label="Voltage",
|
||||||
unit="V",
|
unit="V",
|
||||||
)
|
)
|
||||||
|
fish_data.append_sampled_dimension(
|
||||||
|
self.SAMPLERATE,
|
||||||
|
label="time",
|
||||||
|
unit="s",
|
||||||
|
)
|
||||||
|
|
||||||
beat = channel1 + channel2
|
beat = channel1 + channel2
|
||||||
beat_square = beat**2
|
beat_square = beat**2
|
||||||
|
Loading…
Reference in New Issue
Block a user