Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bucanl_pipelines
bids_lossless_eeg
Commits
87827687
Commit
87827687
authored
Sep 18, 2018
by
Tyler Collins
Browse files
Added landing point for the notion of a staging script
parent
53d1046c
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
87827687
...
...
@@ -10,7 +10,7 @@ code/eeg_init
code/misc
# Specifically hide the staging script
derivatives/lossless/code/scripts/staging
#
derivatives/lossless/code/scripts/staging
/*
# BIDS ignores:
sourcedata/*
...
...
derivatives/lossless/code/scripts/staging/staging_script.m
0 → 100644
View file @
87827687
%load corresponding coordinate file
EEG
=
warp_locs
(
EEG
,
'derivatives/lossless/code/misc/standard_1005.elc'
,
...
'mesh'
,
'derivatives/lossless/code/misc/standard_vol_SCCN.mat'
,
...
'transform'
,[
0.6
,
-
22
,
-
3
,
-
0.05
,
-
0.003
,
-
1.57
,
10.2
,
11
,
11.6
],
...
'manual'
,
'off'
);
EEG
=
pop_eegfiltnew
(
EEG
,[],
1
,[],
true
,[],
0
);
if
~
isfield
(
EEG
,
'marks'
);
EEG
.
marks
=
marks_init
(
size
(
EEG
.
data
));
end
% Apply trimmed average re-reference
chan_inds
=
marks_label2index
(
EEG
.
marks
.
chan_info
,{
'manual'
},
'indexes'
,
'invert'
,
'on'
);
trm_m
=
ve_trimmean
(
EEG
.
data
(
chan_inds
,:),
30
,
1
);
trm_m_mat
=
repmat
(
trm_m
,
size
(
EEG
.
data
,
1
),
1
);
EEG
.
data
=
EEG
.
data
-
trm_m_mat
;
clear
trm_m_mat
;
% epoch the continuous data
EEG
=
marks_continuous2epochs
(
EEG
,
'recurrence'
,[
1
],
'limits'
,[
0
1
]);
% flag fixed criteria time points
chan_inds
=
marks_label2index
(
EEG
.
marks
.
chan_info
,{
'manual'
},
'indexes'
,
'invert'
,
'on'
);
epoch_inds
=
marks_label2index
(
EEG
.
marks
.
time_info
,{
'manual'
},
'indexes'
,
'invert'
,
'on'
);
[
EEG
,
data_s_sd_t
]
=
chan_variance
(
EEG
,
'data_field'
,
'data'
,
...
'chan_inds'
,
chan_inds
,
...
'epoch_inds'
,
epoch_inds
,
...
'plot_figs'
,
'off'
);
[
~
,
flag_s_sd_t_inds
]
=
marks_array2flags
(
data_s_sd_t
,
...
'flag_dim'
,
'col'
,
...
'init_method'
,
'fixed'
,
...
'init_vals'
,[
0
50
],
...
'init_crit'
,[],
...
'flag_method'
,
'fixed'
,
...
'flag_val'
,
.
3
,
...
'plot_figs'
,
'off'
);
chsd_epoch_flags
=
zeros
(
size
(
EEG
.
data
(
1
,:,:)));
chsd_epoch_flags
(
1
,:,
epoch_inds
(
flag_s_sd_t_inds
))
=
1
;
chsd_epoch_flags
=
padflags
(
EEG
,
chsd_epoch_flags
,
1
,
'value'
,
.
5
);
EEG
.
marks
=
marks_add_label
(
EEG
.
marks
,
'time_info'
,
...
{
'ch_s_sd'
,[
1
,
0
,
0
],
chsd_epoch_flags
});
EEG
=
pop_marks_merge_labels
(
EEG
,
'time_info'
,{
'ch_s_sd'
},
'target_label'
,
'manual'
);
% concatenate the epoched data
EEG
=
marks_epochs2continuous
(
EEG
);
EEG
=
eeg_checkset
(
EEG
,
'eventconsistency'
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment