Skip to content

Commit 576a33b

Browse files
authored
Update hyperlinks in tutorial livescripts (#691)
* Update hyperlinks in Behavior tutorial * Update hyperlinks in dynamic_tables tutorial * Update "dynamically loaded filters" * Update ecephys * Update images * Update hyperlinks in intro tutorial * Update hyperlinks in ogen tutorial * Update hyperlinks in "scratch" tutorial * Update hyperlinks in "ophys" tutorial * update hyperlinks in "icephys" tutorial * Fix hyperlinks of neurodata types referencing the wrong namespace * Fix broken link in ophys tutorial * Update link in basicUsage * Try trigger read the docs build * Update basicUsage.html
1 parent a85496b commit 576a33b

34 files changed

+1637
-1549
lines changed

docs/source/_static/html/tutorials/basicUsage.html

Lines changed: 49 additions & 21 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/behavior.html

Lines changed: 20 additions & 21 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/dynamic_tables.html

Lines changed: 55 additions & 60 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/dynamically_loaded_filters.html

Lines changed: 13 additions & 13 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/ecephys.html

Lines changed: 888 additions & 864 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/icephys.html

Lines changed: 41 additions & 34 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/images.html

Lines changed: 52 additions & 43 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/intro.html

Lines changed: 55 additions & 42 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/ogen.html

Lines changed: 24 additions & 15 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/ophys.html

Lines changed: 51 additions & 43 deletions
Large diffs are not rendered by default.

docs/source/_static/html/tutorials/scratch.html

Lines changed: 26 additions & 18 deletions
Large diffs are not rendered by default.

tutorials/basicUsage.mlx

2 Bytes
Binary file not shown.

tutorials/behavior.mlx

2.33 KB
Binary file not shown.

tutorials/dynamic_tables.mlx

-54 Bytes
Binary file not shown.
23 Bytes
Binary file not shown.

tutorials/ecephys.mlx

69 Bytes
Binary file not shown.

tutorials/formatStruct.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
str{i} = strjoin({fields{i}; val}, ': ');
2222
end
2323
str = strjoin(str, sprintf('\n'));
24-
end
24+
end

tutorials/icephys.mlx

-76 Bytes
Binary file not shown.

tutorials/images.mlx

114 Bytes
Binary file not shown.

tutorials/intro.mlx

-51 Bytes
Binary file not shown.

tutorials/ogen.mlx

31 Bytes
Binary file not shown.

tutorials/ophys.mlx

-916 Bytes
Binary file not shown.

tutorials/private/mcode/basicUsage.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
% _last updated: January 1st, 2023_
33
%
44
% In this tutorial, we demonstrate the reading and usage of the NWB file produced
5-
% in the <https://neurodatawithoutborders.github.io/matnwb/tutorials/html/convertTrials.html
5+
% in the <https://matnwb.readthedocs.io/en/latest/pages/tutorials/convertTrials.html
66
% File Conversion Tutorial>. The output is a near-reproduction of Figure 1e from
77
% the <https://www.ncbi.nlm.nih.gov/pubmed/27074502 Li et al> publication, showing
88
% raster and peristimulus time histogram (PSTH) plots for neural recordings from

tutorials/private/mcode/behavior.m

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,21 @@
1414
'general_related_publications', 'DOI:10.1016/j.neuron.2016.12.011'); % optional
1515
nwb
1616
%% SpatialSeries: Storing continuous spatial data
17-
% <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/SpatialSeries.html
18-
% |SpatialSeries|> is a subclass of <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/TimeSeries.html
17+
% <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/SpatialSeries.html
18+
% |SpatialSeries|> is a subclass of <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/TimeSeries.html
1919
% |TimeSeries|> that represents data in space, such as the spatial direction e.g.,
2020
% of gaze or travel or position of an animal over time.
2121
%
2222
% Create data that corresponds to x, y position over time.
2323

2424
position_data = [linspace(0, 10, 50); linspace(0, 8, 50)]; % 2 x nT array
2525
%%
26-
% In <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/SpatialSeries.html
26+
% In <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/SpatialSeries.html
2727
% |SpatialSeries|> data, the first dimension is always time (in seconds), the
2828
% second dimension represents the x, y position. However, as described in the
29-
% <https://neurodatawithoutborders.github.io/matnwb/tutorials/html/dimensionMapNoDataPipes.html
30-
% dimensionMapNoDataPipes> tutorial, when a MATLAB array is exported to HDF5,
31-
% the array is transposed. Therefore, in order to correctly export the data, in
32-
% MATLAB the last dimension of an array should be time. <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/SpatialSeries.html
29+
% <./dimensionMapNoDataPipes.mlx dimensionMapNoDataPipes> tutorial, when a MATLAB
30+
% array is exported to HDF5, the array is transposed. Therefore, in order to correctly
31+
% export the data, in MATLAB the last dimension of an array should be time. <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/SpatialSeries.html
3332
% |SpatialSeries|> data should be stored as one continuous stream as it is acquired,
3433
% not by trials as is often reshaped for analysis. Data can be trial-aligned on-the-fly
3534
% using the trials table. See the trials tutorial for further information.
@@ -44,26 +43,26 @@
4443
'data', position_data, ...
4544
'timestamps', timestamps, ...
4645
'reference_frame', '(0,0) is the bottom left corner.' ...
47-
)
46+
)
4847
%% Position: Storing position measured over time
49-
% To help data analysis and visualization tools know that this <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/SpatialSeries.html
50-
% |SpatialSeries|> object represents the position of the subject, store the <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/SpatialSeries.html
51-
% |SpatialSeries|> object inside a <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/Position.html
52-
% |Position|> object, which can hold one or more <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/SpatialSeries.html
48+
% To help data analysis and visualization tools know that this <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/SpatialSeries.html
49+
% |SpatialSeries|> object represents the position of the subject, store the <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/SpatialSeries.html
50+
% |SpatialSeries|> object inside a <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/Position.html
51+
% |Position|> object, which can hold one or more <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/SpatialSeries.html
5352
% |SpatialSeries|> objects.
5453

5554
position = types.core.Position();
5655
position.spatialseries.set('SpatialSeries', position_spatial_series);
5756
%% Create a Behavior Processing Module
5857
% Create a processing module called "behavior" for storing behavioral data in
59-
% the NWBFile, then add the <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/Position.html
58+
% the NWBFile, then add the <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/Position.html
6059
% |Position|> object to the processing module.
6160

6261
behavior_processing_module = types.core.ProcessingModule('description', 'stores behavioral data.');
6362
behavior_processing_module.nwbdatainterface.set("Position", position);
6463
nwb.processing.set("behavior", behavior_processing_module);
6564
%% CompassDirection: Storing view angle measured over time
66-
% Analogous to how position can be stored, we can create a <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/SpatialSeries.html
65+
% Analogous to how position can be stored, we can create a <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/SpatialSeries.html
6766
% |SpatialSeries|> object for representing the view angle of the subject.
6867
%
6968
% For direction data |reference_frame| indicates the zero direction, for instance
@@ -76,19 +75,19 @@
7675
'timestamps', timestamps, ...
7776
'reference_frame', 'straight ahead', ...
7877
'data_unit', 'radians' ...
79-
);
78+
);
8079
direction = types.core.CompassDirection();
8180
direction.spatialseries.set('spatial_series', direction_spatial_series);
8281
%%
83-
% We can add a <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/CompassDirection.html
82+
% We can add a <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/CompassDirection.html
8483
% |CompassDirection|> object to the behavior processing module the same way we
8584
% have added the position data.
8685

8786
%behavior_processing_module = types.core.ProcessingModule("stores behavioral data."); % if you have not already created it
8887
behavior_processing_module.nwbdatainterface.set('CompassDirection', direction);
8988
%nwb.processing.set('behavior', behavior_processing_module); % if you have not already added it
9089
%% BehaviorTimeSeries: Storing continuous behavior data
91-
% <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/BehavioralTimeSeries.html
90+
% <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/BehavioralTimeSeries.html
9291
% |BehavioralTimeSeries|> is an interface for storing continuous behavior data,
9392
% such as the speed of a subject.
9493

@@ -100,7 +99,7 @@
10099
'starting_time_rate', 10.0, ... % Hz
101100
'description', 'he speed of the subject measured over time.', ...
102101
'data_unit', 'm/s' ...
103-
);
102+
);
104103

105104
behavioral_time_series = types.core.BehavioralTimeSeries();
106105
behavioral_time_series.timeseries.set('speed', speed_time_series);
@@ -109,7 +108,7 @@
109108
behavior_processing_module.nwbdatainterface.set('BehavioralTimeSeries', behavioral_time_series);
110109
%nwb.processing.set('behavior', behavior_processing_module); % if you have not already added it
111110
%% BehavioralEvents: Storing behavioral events
112-
% <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/BehavioralEvents.html
111+
% <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/BehavioralEvents.html
113112
% |BehavioralEvents|> is an interface for storing behavioral events. We can use
114113
% it for storing the timing and amount of rewards (e.g. water amount) or lever
115114
% press times.
@@ -122,7 +121,7 @@
122121
'timestamps', event_timestamps, ...
123122
'description', 'The water amount the subject received as a reward.', ...
124123
'data_unit', 'ml' ...
125-
);
124+
);
126125

127126
behavioral_events = types.core.BehavioralEvents();
128127
behavioral_events.timeseries.set('lever_presses', time_series);
@@ -136,10 +135,10 @@
136135
% extension. You can find information about installation and example usage <https://github.com/nwb-extensions/ndx-events-record
137136
% here>.
138137
%% BehavioralEpochs: Storing intervals of behavior data
139-
% <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/BehavioralEpochs.html
140-
% |BehavioralEpochs|> is for storing intervals of behavior data. <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/BehavioralEpochs.html
141-
% |BehavioralEpochs|> uses <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/IntervalSeries.html
142-
% |IntervalSeries|> to represent the time intervals. Create an <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/IntervalSeries.html
138+
% <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/BehavioralEpochs.html
139+
% |BehavioralEpochs|> is for storing intervals of behavior data. <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/BehavioralEpochs.html
140+
% |BehavioralEpochs|> uses <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/IntervalSeries.html
141+
% |IntervalSeries|> to represent the time intervals. Create an <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/IntervalSeries.html
143142
% |IntervalSeries|> object that represents the time intervals when the animal
144143
% was running. IntervalSeries uses 1 to indicate the beginning of an interval
145144
% and -1 to indicate the end.
@@ -148,49 +147,49 @@
148147
'description', 'Intervals when the animal was running.', ...
149148
'data', [1, -1, 1, -1, 1, -1], ...
150149
'timestamps', [0.5, 1.5, 3.5, 4.0, 7.0, 7.3] ...
151-
);
150+
);
152151

153152
behavioral_epochs = types.core.BehavioralEpochs();
154153
behavioral_epochs.intervalseries.set('running', run_intervals);
155154
%%
156-
% You can add more than one <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/IntervalSeries.html
157-
% |IntervalSeries|> to a <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/BehavioralEpochs.html
155+
% You can add more than one <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/IntervalSeries.html
156+
% |IntervalSeries|> to a <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/BehavioralEpochs.html
158157
% |BehavioralEpochs|> object.
159158

160159
sleep_intervals = types.core.IntervalSeries( ...
161160
'description', 'Intervals when the animal was sleeping', ...
162161
'data', [1, -1, 1, -1], ...
163162
'timestamps', [15.0, 30.0, 60.0, 95.0] ...
164-
);
163+
);
165164
behavioral_epochs.intervalseries.set('sleeping', sleep_intervals);
166165

167166
% behavior_processing_module = types.core.ProcessingModule("stores behavioral data.");
168167
% behavior_processing_module.nwbdatainterface.set('BehavioralEvents', behavioral_events);
169168
% nwb.processing.set('behavior', behavior_processing_module);
170169
% Another approach: TimeIntervals
171-
% Using <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/TimeIntervals.html
172-
% |TimeIntervals|> to represent time intervals is often preferred over <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/BehavioralEpochs.html
173-
% |BehavioralEpochs|> and <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/IntervalSeries.html
174-
% |IntervalSeries|>. <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/TimeIntervals.html
175-
% |TimeIntervals|> is a subclass of <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+hdmf_common/DynamicTable.html
170+
% Using <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/TimeIntervals.html
171+
% |TimeIntervals|> to represent time intervals is often preferred over <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/BehavioralEpochs.html
172+
% |BehavioralEpochs|> and <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/IntervalSeries.html
173+
% |IntervalSeries|>. <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/TimeIntervals.html
174+
% |TimeIntervals|> is a subclass of <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/hdmf_common/DynamicTable.html
176175
% |DynamicTable|>, which offers flexibility for tabular data by allowing the addition
177176
% of optional columns which are not defined in the standard DynamicTable class.
178177

179178
sleep_intervals = types.core.TimeIntervals( ...
180179
'description', 'Intervals when the animal was sleeping.', ...
181180
'colnames', {'start_time', 'stop_time', 'stage'} ...
182-
);
181+
);
183182

184183
sleep_intervals.addRow('start_time', 0.3, 'stop_time', 0.35, 'stage', 1);
185184
sleep_intervals.addRow('start_time', 0.7, 'stop_time', 0.9, 'stage', 2);
186185
sleep_intervals.addRow('start_time', 1.3, 'stop_time', 3.0, 'stage', 3);
187186

188187
nwb.intervals.set('sleep_intervals', sleep_intervals);
189188
%% EyeTracking: Storing continuous eye-tracking data of gaze direction
190-
% <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/EyeTracking.html
189+
% <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/EyeTracking.html
191190
% |EyeTracking|> is for storing eye-tracking data which represents direction of
192-
% gaze as measured by an eye tracking algorithm. An <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/EyeTracking.html
193-
% |EyeTracking|> object holds one or more <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/SpatialSeries.html
191+
% gaze as measured by an eye tracking algorithm. An <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/EyeTracking.html
192+
% |EyeTracking|> object holds one or more <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/SpatialSeries.html
194193
% |SpatialSeries|> objects that represent the gaze direction over time extracted
195194
% from a video.
196195

@@ -203,7 +202,7 @@
203202
'starting_time_rate', 50.0, ... % Hz
204203
'reference_frame', '(0,0) is middle', ...
205204
'data_unit', 'degrees' ...
206-
);
205+
);
207206

208207
left_eye_position = types.core.SpatialSeries( ...
209208
'description', 'The position of the right eye measured in degrees.', ...
@@ -212,7 +211,7 @@
212211
'starting_time_rate', 50.0, ... % Hz
213212
'reference_frame', '(0,0) is middle', ...
214213
'data_unit', 'degrees' ...
215-
);
214+
);
216215

217216
eye_tracking = types.core.EyeTracking();
218217
eye_tracking.spatialseries.set('right_eye_position', right_eye_position);
@@ -222,10 +221,10 @@
222221
behavior_processing_module.nwbdatainterface.set('EyeTracking', eye_tracking);
223222
% nwb.processing.set('behavior', behavior_processing_module);
224223
%% PupilTracking: Storing continuous eye-tracking data of pupil size
225-
% <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/PupilTracking.html
224+
% <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/PupilTracking.html
226225
% |PupilTracking|> is for storing eye-tracking data which represents pupil size.
227-
% <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/PupilTracking.html
228-
% |PupilTracking|> holds one or more <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/TimeSeries.html
226+
% <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/PupilTracking.html
227+
% |PupilTracking|> holds one or more <https://matnwb.readthedocs.io/en/latest/pages/neurodata_types/core/TimeSeries.html
229228
% |TimeSeries|> objects that can represent different features such as the dilation
230229
% of the pupil measured over time by a pupil tracking algorithm.
231230

@@ -235,7 +234,7 @@
235234
'starting_time', 1.0, ... % NB: Important to set starting_time when using starting_time_rate
236235
'starting_time_rate', 20.0, ... % Hz
237236
'data_unit', 'meters' ...
238-
);
237+
);
239238

240239
pupil_tracking = types.core.PupilTracking();
241240
pupil_tracking.timeseries.set('pupil_diameter', pupil_diameter);
@@ -245,8 +244,8 @@
245244
% nwb.processing.set('behavior', behavior_processing_module);
246245
%% Writing the behavior data to an NWB file
247246
% All of the above commands build an NWBFile object in-memory. To write this
248-
% file, use <https://neurodatawithoutborders.github.io/matnwb/doc/nwbExport.html
249-
% |nwbExport|>|.|
247+
% file, use <https://matnwb.readthedocs.io/en/latest/pages/functions/nwbExport.html
248+
% |nwbExport|>.
250249

251250
% Save to tutorials/tutorial_nwb_files folder
252251
nwbFilePath = misc.getTutorialNwbFilePath('behavior_tutorial.nwb');

0 commit comments

Comments
 (0)