Skip to content
Merged
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
15 changes: 9 additions & 6 deletions src/pspm_extract_segments.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,20 @@
% check consistency of input for the other methods
if strcmpi(method, 'file') % in this case use pspm_check_model to verify
channel = varargin{1};
model = pspm_check_model( ...
struct('modelfile', 'dummyfile.mat', ...
model = struct('modelfile', 'dummyfile.mat', ...
'datafile', data, ...
'timing', timing, ...
'timeunits', options.timeunits), ...
'glm');
'timeunits', options.timeunits);
if isfield(options, 'missing')
model.missing = options.missing;
end
model = pspm_check_model(model, 'glm');
if model.invalid, return; end
timing = model.timing;
datafile = model.datafile;
if isfield(options, 'missing')
options.missing = model.missing;
end
elseif strcmpi(method, 'data') % verify directly
sr = varargin{1};
if isnumeric(data)
Expand Down Expand Up @@ -213,8 +218,6 @@
if sts < 1, return; end
end



if options.plot
fg = figure('Name', 'Condition mean per subject', 'Visible', 'off');
ax = axes('NextPlot', 'add');
Expand Down
5 changes: 3 additions & 2 deletions src/pspm_pp.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
% ● Description
% pspm_pp contains various preprocessing utilities for reducing noise in
% the data. It features a 'butter' option that allows downsampling after
% application of an anti-alias filter.
% application of an anti-alias filter.
% ● Format
% [sts, fn] = pspm_pp('median', fn, channel, n, options) or
% [sts, fn] = pspm_pp('butter', fn, channel, filt, options) or
Expand All @@ -11,7 +11,8 @@
% method: [string] Method of filtering. Currently implemented
% methods are 'median' and 'butter'. (1) 'median': a median
% filter will be applied. (2) 'butter': Butterworth band
% pass filter potentially including downsampling.
% pass filter potentially including downsampling; any NaN
% data are interpolated before filtering and then removed
% (3) 'leaky_integrator': Applies a leaky integrator filter
% where tau is specified in seconds.
% fn: [string] The datafile that saves data to process
Expand Down