-
Notifications
You must be signed in to change notification settings - Fork 2
/
snirfcreate.m
36 lines (35 loc) · 1.16 KB
/
snirfcreate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function snf = snirfcreate(varargin)
%
% snf=snirfcreate
% or
% snf=snirfcreate(option)
% snf=snirfcreate('Format',format,'Param1',value1, 'Param2',value2,...)
%
% Create a empty SNIRF data structure defined in the SNIRF
% specification: https://github.com/fNIRS/snirf
%
% author: Qianqian Fang (q.fang <at> neu.edu)
%
% input:
% option (optional): option can be ignored. If it is a string with a
% value 'snirf', this creates a default SNIRF data structure;
% otherwise, a JSNIRF data structure is created.
% format: save as option.
% param/value: a list of name/value pairs specify
% additional subfields to be stored under the /nirs object.
%
% output:
% snf: a default SNIRF or JSNIRF data structure.
%
% example:
% snf=snirfcreate('data',mydata,'aux',myauxdata,'comment','test');
%
% this file is part of JSNIRF specification: https://github.com/fangq/snirf
%
% License: GPLv3 or Apache 2.0, see https://github.com/NeuroJSON/jsnirf for details
%
if (nargin == 1)
snf = jsnirfcreate(varargin{:});
else
snf = jsnirfcreate('Format', 'snirf', varargin{:});
end