Skip to content

Commit da75e95

Browse files
authored
Update icephys tutorial (#632)
1 parent d46adae commit da75e95

File tree

3 files changed

+118
-20
lines changed

3 files changed

+118
-20
lines changed

tutorials/html/icephys.html

+67-18
Large diffs are not rendered by default.

tutorials/icephys.mlx

1.94 KB
Binary file not shown.

tutorials/private/mcode/icephys.m

+51-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
% * <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/IZeroClampSeries.html
7070
% |*IZeroClampSeries*|>
7171
%%
72-
% Below we create a simple example stimulus/response recording data pair.
72+
% Below we create a simple example stimulus/response recording data pair for
73+
% a voltage clamp recording.
7374

7475
ccss = types.core.VoltageClampStimulusSeries( ...
7576
'data', [1, 2, 3, 4, 5], ...
@@ -80,7 +81,6 @@
8081
'sweep_number', uint64(15), ...
8182
'stimulus_description', 'N/A' ...
8283
);
83-
8484
nwbfile.stimulus_presentation.set('ccss', ccss);
8585

8686
vcs = types.core.VoltageClampSeries( ...
@@ -97,6 +97,55 @@
9797
'sweep_number', uint64(15) ...
9898
);
9999
nwbfile.acquisition.set('vcs', vcs);
100+
%%
101+
% You can add stimulus/response recording data pair from a current clamp recording
102+
% in the same way:
103+
104+
% Create a CurrentClampStimulusSeries object
105+
ccss = types.core.CurrentClampStimulusSeries(...
106+
'data', [1, 2, 3, 4, 5], ...
107+
'starting_time', 123.6, ...
108+
'starting_time_rate', 10e3, ...
109+
'electrode', types.untyped.SoftLink(electrode), ...
110+
'gain', 0.02, ...
111+
'sweep_number', uint16(16), ...
112+
'stimulus_description', 'N/A' ...
113+
);
114+
nwbfile.stimulus_presentation.set('ccss', ccss);
115+
116+
% Create a CurrentClampSeries object
117+
ccs = types.core.CurrentClampSeries(...
118+
'data', [0.1, 0.2, 0.3, 0.4, 0.5], ...
119+
'data_conversion', 1e-12, ...
120+
'data_resolution', NaN, ...
121+
'starting_time', 123.6, ...
122+
'starting_time_rate', 20e3, ...
123+
'electrode', types.untyped.SoftLink(electrode), ...
124+
'gain', 0.02, ...
125+
'bias_current', 1e-12, ...
126+
'bridge_balance', 70e6, ...
127+
'capacitance_compensation', 1e-12, ...
128+
'stimulus_description', 'N/A', ...
129+
'sweep_number', uint16(16) ...
130+
);
131+
nwbfile.acquisition.set('ccs', ccs);
132+
133+
%%
134+
% <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/IZeroClampSeries.html
135+
% |*IZeroClampSeries*|> is used when the current is clamped to 0.
136+
137+
% Create an IZeroClampSeries object
138+
izcs = types.core.IZeroClampSeries(...
139+
'data', [0.1, 0.2, 0.3, 0.4, 0.5], ...
140+
'electrode', types.untyped.SoftLink(electrode), ...
141+
'gain', 0.02, ...
142+
'data_conversion', 1e-12, ...
143+
'data_resolution', NaN, ...
144+
'starting_time', 345.6, ...
145+
'starting_time_rate', 20e3, ...
146+
'sweep_number', uint16(17) ...
147+
);
148+
nwbfile.acquisition.set('izcs', izcs);
100149
% Adding an intracellular recording
101150
% The <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/IntracellularRecordingsTable.html
102151
% |*IntracellularRecordingsTable*|> relates electrode, stimulus and response pairs

0 commit comments

Comments
 (0)