Back to the main page.
Bug 447 - output preprocessing .trial if input is .avg
Status | CLOSED FIXED |
Reported | 2011-01-27 11:00:00 +0100 |
Modified | 2011-06-21 15:52:43 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P1 normal |
Assigned to: | Jörn M. Horschig |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Stephen Whitmarsh - 2011-01-27 11:00:38 +0100
I was just wondering if extra consistency is gained if, when preprocessing gets .avg data as input, it also outputs .avg. Especially since (timelocked) datastructures might contain both .avg and .trial.
Robert Oostenveld - 2011-01-27 11:55:19 +0100
once upon a time, this was the case. However, with ft_checkdata at the beginning, the function itself does not have to care about the input any more, only about what it wants as input (which is in this case raw data). There is indeed a good (usability) reason for converting the output again to the same datatype as the input. We could go about as % at the begin of the function convert = ft_datatype(input); input = ft_checkdata(input, 'datatype', 'raw'); ... % at the end of the function switch convert case 'timelock' % convert the output to the same type as the input output = ft_checkdata(input, 'datatype', 'timelock'); otherwise % keep the output as it is end - this should be done prior to (optionally) saving the data to disk - this should be implemented in all functions that in principle can work on raw data and on timelock data (e.g. megrealign, componentanalysis, channelrepair, ...)
Jörn M. Horschig - 2011-03-10 11:40:30 +0100
fixed, please validate whether it works as expected/desired
Robert Oostenveld - 2011-03-31 14:12:24 +0200
(In reply to comment #2) > fixed, please validate whether it works as expected/desired It should also be fixed in all other functions that are often used on timelock data, such as megrealign and others.
Jörn M. Horschig - 2011-04-27 12:53:34 +0200
List of files that call data = ft_checkdata(data, 'datatype', 'raw' M:\FieldTrip\trunk\utilities\ft_fetch_data.m M:\FieldTrip\trunk\utilities\ft_fetch_event.m M:\FieldTrip\trunk\utilities\ft_fetch_header.m M:\FieldTrip\trunk\fileio\private\ft_fetch_data.m M:\FieldTrip\trunk\fileio\private\ft_fetch_header.m M:\FieldTrip\trunk\ft_resampledata.m M:\FieldTrip\trunk\ft_connectivityanalysis.m M:\FieldTrip\trunk\ft_preprocessing.m M:\FieldTrip\trunk\ft_scalpcurrentdensity.m M:\FieldTrip\trunk\ft_combineplanar.m M:\FieldTrip\trunk\ft_denoise_synthetic.m M:\FieldTrip\trunk\ft_rejectvisual.m M:\FieldTrip\trunk\ft_megrealign.m M:\FieldTrip\trunk\ft_redefinetrial.m M:\FieldTrip\trunk\ft_mvaranalysis.m M:\FieldTrip\trunk\ft_componentanalysis.m M:\FieldTrip\trunk\ft_channelrepair.m M:\FieldTrip\trunk\ft_channelnormalise.m Check in meeting which need to be changed