-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small improvement to intro tutorial #633
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,9 +125,10 @@ | |
% | ||
% Note: These diagrams follow a standard convention called "UML class diagram" | ||
% to express the object-oriented relationships between NWB classes. For our purposes, | ||
% all you need to know is that an open triangle means "extends" and an open diamond | ||
% means "is contained within." Learn more about class diagrams on <https://en.wikipedia.org/wiki/Class_diagram | ||
% the wikipedia page>. | ||
% all you need to know is that an open triangle means "extends" (i.e., is a specialized | ||
% subtype of), and an open diamond means "is contained within." Learn more about | ||
% class diagrams on <https://en.wikipedia.org/wiki/Class_diagram the wikipedia | ||
% page>. | ||
% | ||
% <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/SpatialSeries.html | ||
% |*SpatialSeries*|> is a subclass of <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/TimeSeries.html | ||
|
@@ -149,13 +150,7 @@ | |
); | ||
|
||
% create Position object and add SpatialSeries | ||
Position = types.core.Position('SpatialSeries', spatial_series_ts); | ||
|
||
% create processing module | ||
behavior_mod = types.core.ProcessingModule('description', 'contains behavioral data'); | ||
|
||
% add the Position object (that holds the SpatialSeries object) | ||
behavior_mod.nwbdatainterface.set('Position', Position); | ||
Comment on lines
-154
to
-158
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code segment occurred twice. Removed here because the explanation for processing modules is introduced in the next section |
||
position = types.core.Position('SpatialSeries', spatial_series_ts); | ||
%% | ||
% NWB differentiates between raw, _acquired_ data, which should never change, | ||
% and _processed_ data, which are the results of preprocessing algorithms and | ||
|
@@ -171,14 +166,14 @@ | |
% |*Position*|> object to the module. | ||
|
||
% create processing module | ||
behavior_mod = types.core.ProcessingModule('description', 'contains behavioral data'); | ||
behavior_module = types.core.ProcessingModule('description', 'contains behavioral data'); | ||
|
||
% add the Position object (that holds the SpatialSeries object) to the | ||
% module and name the Position object "Position" | ||
behavior_mod.nwbdatainterface.set('Position', Position); | ||
% add the Position object (that holds the SpatialSeries object) to the module | ||
% and name the Position object "Position" | ||
behavior_module.nwbdatainterface.set('Position', position); | ||
|
||
% add the processing module to the NWBFile object, and name the processing module "behavior" | ||
nwb.processing.set('behavior', behavior_mod); | ||
nwb.processing.set('behavior', behavior_module); | ||
% Trials | ||
% Trials are stored in a <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+core/TimeIntervals.html | ||
% |*TimeIntervals*|> object which is a subclass of <https://neurodatawithoutborders.github.io/matnwb/doc/+types/+hdmf_common/DynamicTable.html | ||
|
@@ -207,7 +202,7 @@ | |
trials.addRow('start_time', 1.5, 'stop_time', 2.0, 'correct', true) | ||
trials.addRow('start_time', 2.5, 'stop_time', 3.0, 'correct', false) | ||
|
||
trials.toTable() % visualize the table | ||
trials.toTable() % visualize the table | ||
nwb.intervals_trials = trials; | ||
|
||
% If you have multiple trials tables, you will need to use custom names for | ||
|
@@ -268,4 +263,6 @@ | |
% Optical physiology> | ||
%% | ||
% See the <https://neurodatawithoutborders.github.io/matnwb/doc/index.html API | ||
% documentation> to learn what data types are available. | ||
% documentation> to learn what data types are available. | ||
% | ||
% |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed:
behavior_mod -> behavior_module
Position -> position