Back to the main page.

Bug 1204 - create tutorial/faq/example for 'dss' option in ft_componentanalysis

Status CLOSED FIXED
Reported 2011-11-30 14:31:00 +0100
Modified 2020-09-21 08:52:27 +0200
Product: FieldTrip
Component: documentation
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Johanna
URL:
Tags:
Depends on:
Blocks:
See also:

Johanna - 2011-11-30 14:31:28 +0100

1) include advice on peak detection of artifact (this may be a separate bug:) 2) implement how best to save out peaks, and the params used for peak-detection into a cfg, to enable the possiblity to trace back what you did. (I've been using dss lately, with advice/code from Jan-Mathijs.)


Johanna - 2012-02-15 13:01:23 +0100

See beginning of 'example script' at http://fieldtrip.fcdonders.nl/development/dss. Perhaps the sub-section of ECG peak detection, as it calls some extra functions and private code at the moment in a 'hacky' way, should be made into a main-level function ft_prepare_dss_peaks ? But it would output 'p' and 'params' which are not standard output for a ft_* function.


Johanna - 2012-02-16 13:07:29 +0100

additional to-do: Modify ft_artifact_zvalue to work on this case for the peak detection (rather than new function). 1) Modify GUI to allow for re-doing the preproc applied to (e.g. ECG) channel on the fly. 2) Modify output to be only peak point within region above threshold (and make sure it's saved out). 3) Ensure beg/end sample for each peak doesn't go outside trial boundaries (saved out into cfg.artfctdef.zvalue.artifact)


Johanna - 2012-03-09 09:11:07 +0100

(In reply to comment #2) Finished and committed points (2) and (3). Output now comes easily out of cfg.artfctdef.zvalue. SVN commit 5421. Wiki updated. Point (1) (GUI for preproc adjustment on the fly) seemed too much work for not enough benefit, and I found a more robust way of preproc settings which seems more generally applicable for my data, thus "won't fix" for the time being. Still to-do: put example dataset on wiki and run through this example (possibly with figures).


Johanna - 2012-10-26 17:09:45 +0200

I have remembered a note to myself that the section within ft_artifact_zvalue if strcmp(cfg.artfctdef.zvalue.artfctpeak,'yes') ... end should be moved to within ft_componentanalysis instead. My example code currently looks like this after call to ft_artifact_zvalue and before calling ft_componentanalysis with 'DSS' option: params.tr=cfg.artfctdef.zvalue.peaks; params.tr_begin=cfg.artfctdef.zvalue.dssartifact(:,1); params.tr_end=cfg.artfctdef.zvalue.dssartifact(:,2); but instead the dssartifact subfield should be still in cellarray format per trial, when output from ft_artifact_zvalue. (I admit I only vaguely remember the rational for this now....) After doing this, then update wiki dss page.


Robert Oostenveld - 2013-08-06 16:39:54 +0200

What is the status of the page at http://fieldtrip.fcdonders.nl/development/dss?


Johanna - 2013-08-07 15:34:01 +0200

It is not yet finished in these ways: 1) As mentioned in comment 3, the example dataset does not exist. So, I could just remove mention of that, and say to use on your own data. 2) The wiki reflects the way the code currently works, but ft_artifact_zvalue should be still changed, as mentioned in comment 4, and subsequently wiki changed to match it. 3) The part in the wiki where it states: addpath ~/mfiles/dss_1-0 should be changed to addpath of the fieldtrip/external/dss folder.


Jan-Mathijs Schoffelen - 2020-09-18 14:10:55 +0200

This is back on the radar, and will be worked on in: https://github.com/fieldtrip/fieldtrip/pull/1549 Once this PR is merged, this bug can be closed.


Jan-Mathijs Schoffelen - 2020-09-21 08:52:13 +0200

This has now been implemented