-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update schema files and bump default version Added 2.7.0 to nwb-schema/ Bump default generateCore version from 2.6.0 to 2.7.0 * regenerate default class files using generateCore --------- Co-authored-by: Ben Dichter <[email protected]>
- Loading branch information
1 parent
14281d7
commit 4a16e8f
Showing
41 changed files
with
3,542 additions
and
30 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -48,6 +48,20 @@ | |
validshapes = {[Inf]}; | ||
types.util.checkDims(valsz, validshapes); | ||
end | ||
function val = validate_data_resolution(obj, val) | ||
if isequal(val, -1) | ||
val = -1; | ||
else | ||
error('Unable to set the ''data_resolution'' property of class ''<a href="matlab:doc types.core.AnnotationSeries">AnnotationSeries</a>'' because it is read-only.') | ||
end | ||
end | ||
function val = validate_data_unit(obj, val) | ||
if isequal(val, 'n/a') | ||
val = 'n/a'; | ||
else | ||
error('Unable to set the ''data_unit'' property of class ''<a href="matlab:doc types.core.AnnotationSeries">AnnotationSeries</a>'' because it is read-only.') | ||
end | ||
end | ||
%% EXPORT | ||
function refs = export(obj, fid, fullpath, refs) | ||
refs = [email protected](obj, fid, fullpath, refs); | ||
|
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
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
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
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
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 |
---|---|---|
|
@@ -86,6 +86,13 @@ | |
validshapes = {[1]}; | ||
types.util.checkDims(valsz, validshapes); | ||
end | ||
function val = validate_stimulus_description(obj, val) | ||
if isequal(val, 'N/A') | ||
val = 'N/A'; | ||
else | ||
error('Unable to set the ''stimulus_description'' property of class ''<a href="matlab:doc types.core.IZeroClampSeries">IZeroClampSeries</a>'' because it is read-only.') | ||
end | ||
end | ||
%% EXPORT | ||
function refs = export(obj, fid, fullpath, refs) | ||
refs = [email protected](obj, fid, fullpath, refs); | ||
|
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
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
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
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 |
---|---|---|
|
@@ -48,6 +48,20 @@ | |
validshapes = {[Inf]}; | ||
types.util.checkDims(valsz, validshapes); | ||
end | ||
function val = validate_data_resolution(obj, val) | ||
if isequal(val, -1) | ||
val = -1; | ||
else | ||
error('Unable to set the ''data_resolution'' property of class ''<a href="matlab:doc types.core.IntervalSeries">IntervalSeries</a>'' because it is read-only.') | ||
end | ||
end | ||
function val = validate_data_unit(obj, val) | ||
if isequal(val, 'n/a') | ||
val = 'n/a'; | ||
else | ||
error('Unable to set the ''data_unit'' property of class ''<a href="matlab:doc types.core.IntervalSeries">IntervalSeries</a>'' because it is read-only.') | ||
end | ||
end | ||
%% EXPORT | ||
function refs = export(obj, fid, fullpath, refs) | ||
refs = [email protected](obj, fid, fullpath, refs); | ||
|
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
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
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
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 |
---|---|---|
|
@@ -6,6 +6,10 @@ | |
properties | ||
stimulus; % REQUIRED (TimeSeriesReferenceVectorData) Column storing the reference to the recorded stimulus for the recording (rows). | ||
end | ||
% OPTIONAL PROPERTIES | ||
properties | ||
stimulus_template; % (TimeSeriesReferenceVectorData) Column storing the reference to the stimulus template for the recording (rows). | ||
end | ||
|
||
methods | ||
function obj = IntracellularStimuliTable(varargin) | ||
|
@@ -20,9 +24,11 @@ | |
p.StructExpand = false; | ||
addParameter(p, 'description',[]); | ||
addParameter(p, 'stimulus',[]); | ||
addParameter(p, 'stimulus_template',[]); | ||
misc.parseSkipInvalidName(p, varargin); | ||
obj.description = p.Results.description; | ||
obj.stimulus = p.Results.stimulus; | ||
obj.stimulus_template = p.Results.stimulus_template; | ||
if strcmp(class(obj), 'types.core.IntracellularStimuliTable') | ||
cellStringArguments = convertContainedStringsToChars(varargin(1:2:end)); | ||
types.util.checkUnset(obj, unique(cellStringArguments)); | ||
|
@@ -35,18 +41,34 @@ | |
function set.stimulus(obj, val) | ||
obj.stimulus = obj.validate_stimulus(val); | ||
end | ||
function set.stimulus_template(obj, val) | ||
obj.stimulus_template = obj.validate_stimulus_template(val); | ||
end | ||
%% VALIDATORS | ||
|
||
function val = validate_description(obj, val) | ||
if isequal(val, 'Table for storing intracellular stimulus related metadata.') | ||
val = 'Table for storing intracellular stimulus related metadata.'; | ||
else | ||
error('Unable to set the ''description'' property of class ''<a href="matlab:doc types.core.IntracellularStimuliTable">IntracellularStimuliTable</a>'' because it is read-only.') | ||
end | ||
end | ||
function val = validate_stimulus(obj, val) | ||
val = types.util.checkDtype('stimulus', 'types.core.TimeSeriesReferenceVectorData', val); | ||
end | ||
function val = validate_stimulus_template(obj, val) | ||
val = types.util.checkDtype('stimulus_template', 'types.core.TimeSeriesReferenceVectorData', val); | ||
end | ||
%% EXPORT | ||
function refs = export(obj, fid, fullpath, refs) | ||
refs = [email protected]_common.DynamicTable(obj, fid, fullpath, refs); | ||
if any(strcmp(refs, fullpath)) | ||
return; | ||
end | ||
refs = obj.stimulus.export(fid, [fullpath '/stimulus'], refs); | ||
if ~isempty(obj.stimulus_template) | ||
refs = obj.stimulus_template.export(fid, [fullpath '/stimulus_template'], refs); | ||
end | ||
end | ||
end | ||
|
||
|
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
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 |
---|---|---|
|
@@ -16,8 +16,8 @@ | |
end | ||
% OPTIONAL PROPERTIES | ||
properties | ||
acquisition; % (DynamicTable|NWBDataInterface) Tabular data that is relevent to acquisition | Acquired, raw data. | ||
analysis; % (DynamicTable|NWBContainer) Tabular data that is relevent to data stored in analysis | Custom analysis results. | ||
acquisition; % (DynamicTable|NWBDataInterface) Tabular data that is relevant to acquisition | Acquired, raw data. | ||
analysis; % (DynamicTable|NWBContainer) Tabular data that is relevant to data stored in analysis | Custom analysis results. | ||
general; % (LabMetaData) Place-holder than can be extended so that lab-specific meta-data can be placed in /general. | ||
general_data_collection; % (char) Notes about data collection and analysis. | ||
general_devices; % (Device) Data acquisition devices. | ||
|
@@ -33,7 +33,7 @@ | |
general_intracellular_ephys_repetitions; % (RepetitionsTable) A table for grouping different sequential intracellular recordings together. With each SequentialRecording typically representing a particular type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence. | ||
general_intracellular_ephys_sequential_recordings; % (SequentialRecordingsTable) A table for grouping different sequential recordings from the SimultaneousRecordingsTable table together. This is typically used to group together sequential recordings where the a sequence of stimuli of the same type with varying parameters have been presented in a sequence. | ||
general_intracellular_ephys_simultaneous_recordings; % (SimultaneousRecordingsTable) A table for grouping different intracellular recordings from the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes | ||
general_intracellular_ephys_sweep_table; % (SweepTable) [DEPRECATED] Table used to group different PatchClampSeries. SweepTable is being replaced by IntracellularRecordingsTable and SimultaneousRecordingsTable tabels. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata. | ||
general_intracellular_ephys_sweep_table; % (SweepTable) [DEPRECATED] Table used to group different PatchClampSeries. SweepTable is being replaced by IntracellularRecordingsTable and SimultaneousRecordingsTable tables. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata. | ||
general_keywords; % (char) Terms to search over. | ||
general_lab; % (char) Laboratory where experiment was performed. | ||
general_notes; % (char) Notes about the experiment. | ||
|
@@ -56,15 +56,15 @@ | |
intervals_trials; % (TimeIntervals) Repeated experimental events that have a logical grouping. | ||
processing; % (ProcessingModule) Intermediate analysis of acquired data. | ||
scratch; % (DynamicTable|NWBContainer|ScratchData) Any one-off tables | Any one-off containers | Any one-off datasets | ||
stimulus_presentation; % (TimeSeries) TimeSeries objects containing data of presented stimuli. | ||
stimulus_presentation; % (DynamicTable|NWBDataInterface|TimeSeries) DynamicTable objects containing data of presented stimuli. | Generic NWB data interfaces, usually from an extension, containing data of presented stimuli. | TimeSeries objects containing data of presented stimuli. | ||
stimulus_templates; % (Images|TimeSeries) Images objects containing images of presented stimuli. | TimeSeries objects containing template data of presented stimuli. | ||
units; % (Units) Data about sorted spike units. | ||
end | ||
|
||
methods | ||
function obj = NWBFile(varargin) | ||
% NWBFILE Constructor for NWBFile | ||
varargin = [{'nwb_version' '2.6.0'} varargin]; | ||
varargin = [{'nwb_version' '2.7.0'} varargin]; | ||
obj = [email protected](varargin{:}); | ||
|
||
|
||
|
@@ -805,9 +805,8 @@ | |
types.util.checkDims(valsz, validshapes); | ||
end | ||
function val = validate_stimulus_presentation(obj, val) | ||
namedprops = struct(); | ||
constrained = {'types.core.TimeSeries'}; | ||
types.util.checkSet('stimulus_presentation', namedprops, constrained, val); | ||
constrained = {'types.hdmf_common.DynamicTable', 'types.core.NWBDataInterface', 'types.core.TimeSeries'}; | ||
types.util.checkSet('stimulus_presentation', struct(), constrained, val); | ||
end | ||
function val = validate_stimulus_templates(obj, val) | ||
constrained = {'types.core.Images', 'types.core.TimeSeries'}; | ||
|
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
Oops, something went wrong.