Back to the main page.

Bug 315 - fieldtrip/private/preproc() should be replaced by ft_preprocessing where possible

Status CLOSED DUPLICATE
Reported 2010-12-15 21:30:00 +0100
Modified 2011-05-23 10:35:57 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 normal
Assigned to: Eelke Spaak
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2010-12-15 21:30:04 +0100

The "where possible" should be read as "if there is no filter padding", i.e. if begpadding==0 and endpadding==0 in the calling function. The ft_preprocessing cannot deal with the filterpadding, that is why it should not (yet) be used if dealing with the filterpadding is required. To help you get started, here is a list of potential candidates: MacBook> grep 'preproc(' *.m */*.m ft_artifact_clip.m: datflt = preproc(dat, label, hdr.Fs, artfctdef, cfg.trl(trlop,3)); ft_artifact_ecg.m: ecg{j} = preproc(ecg{j}, artfctdef.channel, hdr.Fs, artfctdef, [], fltpadding, fltpadding); ft_artifact_manual.m: [dataY{i}, dumlab, dumtime, dumcfg] = preproc(dataY{i}', cfg.artfctdef.manual.channel, hdr.Fs, cfg.artfctdef.manual, cfg.trl(i,3)-begpadding, 0, 0); ft_artifact_threshold.m: dat = preproc(dat, channel, hdr.Fs, artfctdef, cfg.trl(trlop,3)); ft_artifact_zvalue.m: dat{trlop} = preproc(dat{trlop}, cfg.artfctdef.zvalue.channel, hdr.Fs, cfg.artfctdef.zvalue, [], fltpadding, fltpadding); ft_artifact_zvalue.m:% dat{trlop} = preproc(dat{trlop}, cfg.artfctdef.zvalue.channel(sgnlop), hdr.Fs, cfg.artfctdef.zvalue, [], fltpadding, fltpadding); ft_connectivitysimulation.m: mixsignal = preproc(mixsignal, label, cfg.fsample, cfg, -fltpad, fltpad, fltpad); ft_connectivitysimulation.m: newtmp = preproc(newtmp, label, cfg.fsample, cfg, -fltpad, fltpad, fltpad); ft_databrowser.m:[dat, lab, tim] = preproc(dat, opt.hdr.label(chanindx), opt.fsample, opt.cfg.preproc, offset); ft_preprocessing.m: [dataout.trial{i}, dataout.label, dataout.time{i}, cfg] = preproc(data.trial{i}(rawindx,:), data.label(rawindx), data.fsample, cfg, data.offset(i)); ft_preprocessing.m: [cutdat{i}, label, time{i}, cfg] = preproc(dat, hdr.label(rawindx), hdr.Fs, cfg, cfg.trl(i,3), begpadding, endpadding); ft_spikedetection.m: dat = preproc(org, hdr.label(i), hdr.Fs, cfg.preproc); ft_spikedownsample.m: dat = preproc(org, label, hdr.Fs, cfg.preproc); ft_timelockanalysis.m: [data.trial{i}, data.label, data.time{i}, cfg.preproc] = preproc(data.trial{i}, data.label, data.fsample, cfg.preproc, data.offset(i)); ft_volumesegment.m: p = spm_preproc(Va); private/artifact_viewer.m:% data = preproc(data, channel, hdr.Fs, artfctdef, [], fltpadding, fltpadding); private/preproc.m:function [dat, label, time, cfg] = preproc(dat, label, fsample, cfg, offset, begpadding, endpadding) private/preproc.m:% [dat, label, time, cfg] = preproc(dat, label, fsample, cfg, offset, begpadding, endpadding) private/preproc.m: [dat ] = preproc(dat, label, fsample, tmpcfg, offset, begpadding, endpadding); private/preproc.m: [dat, label ] = preproc(dat, label, fsample, tmpcfg, offset, begpadding, endpadding); private/preproc.m: [dat, label, time ] = preproc(dat, label, fsample, tmpcfg, offset, begpadding, endpadding); private/preproc.m: [dat, label, time, tmpcfg] = preproc(dat, label, fsample, tmpcfg, offset, begpadding, endpadding); private/rejectvisual_channel.m: [data.trial{i}, label, time, cfg.preproc] = preproc(data.trial{i}, data.label, data.fsample, cfg.preproc, offset(i)); private/rejectvisual_summary.m: [dat, label, time, cfg.preproc] = preproc(data.trial{i}(chansel,:), data.label(chansel), data.fsample, cfg.preproc, offset(i)); private/rejectvisual_trial.m: [data.trial{i}, label, time, cfg.preproc] = preproc(data.trial{i}, data.label, data.fsample, cfg.preproc, offset(i)); realtime/ft_realtime_downsample.m: % dat = preproc(data.trial{1}, data.label, data.fsample, cfg);


Robert Oostenveld - 2011-01-14 13:47:54 +0100

we can discuss this in more detail if needs be


Eelke Spaak - 2011-02-16 11:20:02 +0100

(In reply to comment #1) > we can discuss this in more detail if needs be Maybe we can discuss this this afternoon; I am not entirely sure how to approach this. Would ft_preprocessing accept a straightforward channels X time matrix as the data argument? If so, I think this should be documented; I was under the impression that the data argument had to be a trial-based structure according to FT data guidelines. Also, if so, I think I can manage to fix this bug without further detailed discussion :)


Robert Oostenveld - 2011-05-11 13:46:17 +0200

*** This bug has been marked as a duplicate of bug 310 ***