File: snirfcreate.m

package info (click to toggle)
octave-iso2mesh 1.9.8%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 11,128 kB
  • sloc: cpp: 11,982; ansic: 10,158; sh: 365; makefile: 59
file content (36 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download
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