Skip to content

Commit

Permalink
Merge pull request #598 from bachlab/596-channel-action-issue-in-the-gui
Browse files Browse the repository at this point in the history
Fix issue 596
  • Loading branch information
dominikbach authored Jan 24, 2024
2 parents e6d0342 + 4aac39c commit 5f7b6f1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
2 changes: 0 additions & 2 deletions src/pspm_cfg/pspm_cfg_pp_emg.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
% PsPM 3.1
% (C) 2016 Tobias Moser (University of Zurich)

% $Id$
% $Rev$

%% Data preprocessing
cfg = cfg_repeat;
Expand Down
9 changes: 4 additions & 5 deletions src/pspm_cfg/pspm_cfg_pp_emg_data.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
function [pp_emg] = pspm_cfg_pp_emg_data
% function to process emg data which leads to emg_proc data
%

% $Id$
% $Rev$
% * Description
% function to process emg data which leads to emg_proc data
% * History
% Updated in 2024 by Teddy

% Initialise
global settings
Expand Down
22 changes: 11 additions & 11 deletions src/pspm_cfg/pspm_cfg_run_pp_emg_data.m
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
function out = pspm_cfg_run_pp_emg_data(job)
% Executes pspm_emg_pp

% * Description
% Executes pspm_emg_pp
% * History
% Updated with PsPM 6.1.2 in 2024 by Teddy
options = struct();
options.mains_freq = job.options(1).mains_freq;
options.channel_action = job.options(1).channel_action;
options.channel_action = job.options(1).chan_action;
if isfield(job.options(1).channel, 'cust_channel')
options.channel = job.options(1).channel(1).cust_channel;
options.channel = job.options(1).channel(1).cust_channel;
elseif isfield(job.options(1).channel, 'first_channel')
options.channel = job.options(1).channel(1).first_channel;
end;

options.channel = job.options(1).channel(1).first_channel;
end
[sts, output] = pspm_emg_pp(job.datafile{1}, options);

if sts == 1
out = {output.channel};
out = {output.channel};
else
out = {-1};
end;
out = {-1};
end
2 changes: 1 addition & 1 deletion src/pspm_pp.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
% ● History
% Introduced In PsPM 3.0
% Written in 2009-2015 by Dominik R Bach (Wellcome Trust Centre for Neuroimaging)
% Maintained in 2022 by Teddy Chao (UCL)
% Maintained in 2024 by Teddy

%% Initialise
global settings
Expand Down

0 comments on commit 5f7b6f1

Please sign in to comment.