Back to the main page.
Bug 2842 - ft_sourcedescriptives crashes because ft_datatype_source removed source.avg
Status | NEW |
Reported | 2015-02-13 15:45:00 +0100 |
Modified | 2015-02-16 13:54:29 +0100 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Linux |
Importance: | P5 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
- 2015-02-13 15:45:07 +0100
At some point ft_datatype_source was updated to move the fields inside source.avg to be part of the main structure, e.g., source.avg.filter is now source.filter. This causes ft_descriptives to crash at the lines that calls source.avg.X e.g., if ~isfield(source.avg, 'filter') - line 170 , 162 if numel(source.avg.csdlabel) == 1 - line 212 I think the approach here is to update ft_sourcedescriptives, because the removal of source.avg is due to bug2796. Is this the right way to go?
Robert Oostenveld - 2015-02-13 15:51:17 +0100
(In reply to n.lam from comment #0) yes, correct. The output of the functions should (for the time being) still contain source.avg to maintain compatibility with the users' scripts, but the internal fieldtrip code should move away from source.avg and source.trial. Can you handle this?
- 2015-02-13 15:53:23 +0100
estimate_fwhm1.m also needs to be adjusted (it also expects source.avg)
Robert Oostenveld - 2015-02-13 15:58:19 +0100
(In reply to n.lam from comment #2) functions that _only_ use source.avg should be easy to change. The ones that use source.trial are more difficult. Btw, might it be that the issue is in ft_sourcedescriptives rather than ft_freqdescriptives? For reference, the following functions contain the string "source.avg" mac011> grep -l source.avg */*.m private/estimate_fwhm1.m private/parameterselection.m test/test_bug2556.m test/test_example_simulate_forward_beamforming.m test/test_ft_selectdata.m test/test_ft_sourceanalysis.m test/test_ft_sourcegrandaverage.m test/test_ft_statistics_montecarlo.m test/test_ft_timelockanalysis_new.m test/test_tutorial_beamformingextended.m test/test_tutorial_beamformingextended20131122.m test/test_tutorial_connectivity20130308.m test/test_tutorial_connectivity3.m test/test_tutorial_meguk2015.m utilities/ft_datatype_source.m utilities/ft_datatype_volume.m utilities/ft_selectdata.m utilities/ft_source2grid.m