Back to the main page.
Bug 2937 - ft_transform_geometry doesn't transform the chanori field of a sensor definition
| Status |
CLOSED FIXED |
| Reported |
2015-07-23 21:44:00 +0200 |
| Modified |
2016-01-14 21:27:23 +0100 |
| Product: |
FieldTrip |
| Component: |
core |
| Version: |
unspecified |
| Hardware: |
All |
| Operating System: |
All |
| Importance: |
P5 normal |
| Assigned to: |
Jan-Mathijs Schoffelen |
| URL: |
|
| Tags: |
|
| Depends on: |
|
| Blocks: |
|
| See also: |
|
Luke - 2015-07-23 21:44:11 +0200
the chanori field of a sensor definition is not transformed by calls to ft_transform_geometry
fix is a to change line 68
from
rfields = {'ori' 'nrm' 'coilori'}; % only apply rotation
to
rfields = {'ori' 'nrm' 'coilori' 'chanori'}; % only apply rotation
Cheers
Luke
Jan-Mathijs Schoffelen - 2015-07-24 08:08:54 +0200
/home/language/jansch/matlab/fieldtrip
[jansch@mentat002 fieldtrip]$ cd utilities/
[jansch@mentat002 utilities]$ vim ft_transform_geometry.m
[jansch@mentat002 utilities]$ svn diff ft_transform_geometry.m
Index: ft_transform_geometry.m
===================================================================
--- ft_transform_geometry.m (revision 10560)
+++ ft_transform_geometry.m (working copy)
@@ -65,7 +65,7 @@
end
tfields = {'pos' 'pnt' 'o' 'chanpos' 'chanposorg' 'coilpos' 'elecpos', 'nas', 'lpa', 'rpa', 'zpoint'}; % apply rotation plus translation
-rfields = {'ori' 'nrm' 'coilori'}; % only apply rotation
+rfields = {'ori' 'nrm' 'coilori' 'chanori'}; % only apply rotation
mfields = {'transform'}; % plain matrix multiplication
recfields = {'fid' 'bnd' 'orig'}; % recurse into these fields
% the field 'r' is not included here, because it applies to a volume
[jansch@mentat002 utilities]$ svn commit -m "enhancement - also rotate chanori, thanks to Luke Bloy" ft_transform_geometry.m
Sending ft_transform_geometry.m
Transmitting file data .
Committed revision 10561.
[jansch@mentat002 utilities]$
Thanks, Luke!