Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvements #64

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions africa/private/identify_artefactual_components_manual.m
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,15 @@ function createlayout(varargin) % SETUP FIGURE WINDOWS
drawnow

% Add info about metrics as title above tICWindow
titlestr = 'Component ranking: ';
titlestr = sprintf('Component %d ranking: ', current_comp);
for j = 1:length(metric_names)
v = metrics.(metric_names{j}).value(current_comp); % Metric value
r = sum(v <= metrics.(metric_names{j}).value);
titlestr = [titlestr sprintf('%s: %i (%.2f) ',metric_names{j},r,v)];
if mod(j,4)==0
titlestr = [titlestr sprintf('\n %s: %i (%.2f) ',metric_names{j},r,v)];
else
titlestr = [titlestr sprintf('%s: %i (%.2f) ',metric_names{j},r,v)];
end
end
title(tICWindow,titlestr,'fontsize',FONTSIZE,'interpreter','none')

Expand Down
1 change: 1 addition & 0 deletions oat/oat_run_first_level_epoched.m
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@
Sc.frequencies = first_level_results.frequencies(f);
Sc.remove_montages=0;
Sc.cond_list = D.conditions(triallist);
Sc.events = D.events(triallist);
D_tf = osl_change_spm_eeg_data( Sc );

% add back in Class channel:
Expand Down
8 changes: 6 additions & 2 deletions osl_change_spm_eeg_data.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,18 @@

% copy badtrials
badtrials=D.badtrials;
if ~isempty(badtrials)
if ~isempty(badtrials) && Sc.D.ntrials==D2.ntrials
tmp_bad = zeros(D.ntrials,1);
tmp_bad(badtrials) = 1;
D2 = D2.badtrials(1:length(tmp_bad),tmp_bad);
end

% copy events
ev = D.events;
if isfield(Sc, 'events') % required when number of trials in D and D2 is not equal
ev = Sc.events;
else
ev = D.events;
end
D2 = D2.events(1:D2.ntrials,ev);

end
Expand Down
2 changes: 1 addition & 1 deletion osl_quick_spectra.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
bands = {[0 3], [3 7], [7 13], [13 30], [30 100], [100 200]};
end

chaninds = D.indchantype('MEGPLANAR');
chaninds = D.indchantype(modality);
[pxx,f] = pwelch( zscore(D(chaninds,:,1)'),D.fsample,[],[],D.fsample );

font_size = 12;
Expand Down