Skip to content

Commit

Permalink
Merge pull request #111 from GiulioCastegnaro/master
Browse files Browse the repository at this point in the history
Updating .electrodes file creation template
  • Loading branch information
dorahermes authored Dec 10, 2018
2 parents 7c49d41 + d58dc94 commit c954317
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
40 changes: 18 additions & 22 deletions matlabCode/createBIDS_ieeg_electrodes_tsv.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
%
% DHermes, 2017
% modified RG 201809
% modified Giulio Castegnaro 201811


%%
Expand All @@ -26,34 +27,29 @@


%% required columns

name = {''}; % Name of the electrode
x = [0]';
y = [0]';
z = [0]';
Size = [0]'; % Diameter in mm
type = [0]'; % Type of intracranial electrode, one of [?surface?, ?depth? , ?dbs?]



%% optional columns

name = {''}; % Name of the electrode contact point
x = [0]'; %X position. The positions of the center of each electrode in xyz space.
%Units are in millimeters or pixels and are specified in _*space-<label>_electrode.json.
y = [0]';%Y position.
z = [0]';% Z position. If electrodes are in 2D space this should be a column of n/a values.
Size = [0]'; % Diameter in mm^2

%% recommended columns
material = {''}; % Material of the electrodes

tissue = {''}; % If a clinician has made an observation about the tissue
% underneath the electrode (e.g. epilepsy, tumor, if nothing state n/a)

manufacturer = {''}; % Optional field to specify the electrode manufacturer
% for each electrode. Can be used if electrodes were manufactured by more than one company.
group = {''}; %Optional field to specify the group that the electrode is a part of.
%Note that any group specified here should match a group specified in `_channels.tsv`
hemisphere = {''}; %Optional field to specify the hemisphere in which
%the electrode is placed, one of [‘L’ or ‘R’] (use capital).

grid_size = {''}; % Optional field to specify the dimensions of the grid the
% electrode is a part of. Should be of the form `(M, N)`. E.g., (8, 8) or(1, 4).


%% optional columns
type = {''}; %Optional type of the electrode,e.g.,cup, ring, clip-on, wire, needle, ...
impedance = {''}; %Impedance of the electrode in kOhm.

%% write
t = table(name,x,y,z,size,type,material,tissue,manufacturer,grid_size);
t = table(name,x,y,z,Size,material,manufacturer,group,hemisphere,type,impedance);

writetable(t,electrodes_tsv_name,'FileType','text','Delimiter','\t');
writetable(t,electrodes_tsv_name,'FileType','text','Delimiter','\t');

clear Size
4 changes: 2 additions & 2 deletions templates/sub-01/ses-01/ieeg/sub-01_ses-01_electrodes.tsv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name x y z size type material tissue manufacturer grid_size
0 0 0 0 0
name x y z Size material manufacturer group hemisphere type impedance
0 0 0 0

0 comments on commit c954317

Please sign in to comment.