Back to the main page.
Bug 3304 - consolidate the handling of coordsys
Status | ASSIGNED |
Reported | 2017-06-08 08:40:00 +0200 |
Modified | 2017-06-13 09:55:20 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P5 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2017-06-08 08:40:51 +0200
as discussed with Arjen, Sandon and JM over email: the coordsys handling is not as transparent as desired. It would be good to move part of the replicated code to a separate (private) helper function.
Robert Oostenveld - 2017-06-08 08:43:25 +0200
Regarding ‘neuromag’: there are some coordinate system names that are (partially or fully) equivalent. I think the clearest implementation is in ft_plot_axes at the bottom (in xyz2label) switch lower(strx{1}) case {'ras' 'itab' 'neuromag' 'spm' 'mni' 'tal'} labelx = {'-X (left)' '+X (right)' }; labely = {'-Y (posterior)' '+Y (anterior)'}; labelz = {'-Z (inferior)' '+Z (superior)'}; case {'als' 'ctf' '4d', 'bti'} labelx = {'-X (posterior)' '+X (anterior)'}; labely = {'-Y (right)' '+Y (left)'}; labelz = {'-Z (inferior)' '+Z (superior)'}; case {'paxinos'} labelx = {'-X (left)' '+X (right)'}; labely = {'-Y (inferior)' '+Y (superior)'}; labelz = {'-Z (anterior)' '+Z (posterior)'}; case {'lps'} labelx = {'-X (right)' '+X (left)'}; labely = {'-Y (anterior)' '+Y (posterior)'}; labelz = {'-Z (inferior)' '+Z (superior)'}; otherwise warning('unknown coordsys'); labelx = {'-X (unknown)' '+X (unknown)'}; labely = {'-Y (unknown)' '+Y (unknown)'}; labelz = {'-Z (unknown)' '+Z (unknown)'}; end I propose to move this to a separate (private) function. That could be extended with a 4th output label for the origin.
Robert Oostenveld - 2017-06-11 10:51:26 +0200
I have moved this in a separate function. I also removed the ras_tal, all_ctf, etc. See https://github.com/fieldtrip/fieldtrip/pull/453