Back to the main page.

Bug 1003 - feature: use ft_headmodelplot without grad/elec

Status CLOSED FIXED
Reported 2011-10-03 19:25:00 +0200
Modified 2015-01-12 09:25:15 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 enhancement
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on: 1978
Blocks:
See also:

Stephen Whitmarsh - 2011-10-03 19:25:42 +0200

perhaps in my very specific case of wanting to plot a mesh and a grid but no sensors (since in this case headmodel is derived from template mri) it would be sweet to have it just tell me it wont plot sensors but plot the rest.


Stephen Whitmarsh - 2011-10-03 19:29:07 +0200

workaround now is to add any grad structure and use cfg.plotsensors = 'no' is see. not worth the time then


Jan-Mathijs Schoffelen - 2011-10-05 09:29:54 +0200

it could be that ft_headmodelplot is obsolete, let's discuss in the ft-meeting


Jan-Mathijs Schoffelen - 2014-05-13 11:37:33 +0200

ft_headmodelplot is a dinosaur of a function. I think it may deserve to exist as a high level fieldtrip function, but it should be calling ft_plot_vol ft_plot_sens etc. (and ft_getopt ;-) ) The reason why this function deserves to exist is that one can obtain at high-level a figure that can serve as quality control figure for the alignment of geometrical objects used in inverse modelling. I suggest to clean up the code, and take Stephen's request along the way. One thins I would vote in favour of to remove, is the on-the-fly creation of a sourcemodel grid.


Robert Oostenveld - 2014-05-13 12:00:50 +0200

should we not simply deprecate that function and move it out of the way? There are only a few wiki pages that use it: http://fieldtrip.fcdonders.nl/?do=search&id=ft_headmodelplot The (newer) low-level ft_plot_xxx functions allow for much better control of the plot features. The only annoying thing that I see with them is that of units (cm/mm) in case you plot multiple objects in a single figure. That could even be addressed. In thinking on improving ft_plot_xxx utilisation: how about moving the axes plotting from ft_determine_coordsys to ft_plot_axes or ft_plot_coordsys or so?


Jan-Mathijs Schoffelen - 2014-05-13 12:22:53 +0200

In principle I wouldn't mind deprecating this one. On the other hand, it may be useful to just have a standard high-level plotting function (which does not do anything too fancy), which takes care of the units/coordsys etc overhead. Also, when thinking about plotting localspheres-based headmodels (bug 1978) it may come in handy to have a function that provides some overhead. In that case we don't need to extend the definition of the multispheres model to make it work in ft_plot_vol.


Robert Oostenveld - 2014-05-13 14:16:26 +0200

(In reply to Jan-Mathijs Schoffelen from comment #5) it is useful as sanity check to plot all anatomical information stored in the cfg prior to passing that cfg to a function that uses it. However, the question then is whether it should do the same processing on it as ft_sourceanalysis/ft_dipolefit/ft_perpare_leadfield does, like ft_prepare_vol_sens, which also would then include making the source grid. I.e. to which cfg would the cfg of ft_headmodelplot correspond?


Jan-Mathijs Schoffelen - 2014-05-19 09:17:35 +0200

It seems the function ft_headmodelplot has not been present in the release version of fieldtrip for a while. Yet, it seems to be present in the developer's copy. I don't feel much like spending a lot more time on this and would be fine with deprecating the function once and for all. Yet, perhaps we should first clarify what's going on in the repo.


Robert Oostenveld - 2014-05-19 10:58:41 +0200

(In reply to Jan-Mathijs Schoffelen from comment #7) how can it be in the development version but not in the release version? Hmm, I also don't find it on my disk any more, nor on home/common (from which the ftp version is zipped). The only reference I can find is https://code.google.com/p/fieldtrip/source/list?path=/trunk/ft_headmodelplot.m&start=5289, and then it disappears ???


Robert Oostenveld - 2014-05-19 11:00:03 +0200

(In reply to Robert Oostenveld from comment #8) oh, here it is https://code.google.com/p/fieldtrip/source/detail?r=5290


Jan-Mathijs Schoffelen - 2014-05-19 11:00:55 +0200

funny indeed. I still have it in my version, and when I do svn status ft_headmodelplot.m I get A + ft_headmodelplot.m It does not complain about not knowing it, and it also gives an output when svn diff'ed


Jan-Mathijs Schoffelen - 2014-05-19 11:02:05 +0200

but when we check compat...it's not there


Robert Oostenveld - 2014-05-19 11:02:22 +0200

(In reply to Jan-Mathijs Schoffelen from comment #10) when was the last time you did an svn update ;-)


Robert Oostenveld - 2014-05-19 11:02:36 +0200

(In reply to Jan-Mathijs Schoffelen from comment #11) i guess it is still in crimic/compat


Jan-Mathijs Schoffelen - 2014-05-19 11:05:54 +0200

OK, shall I just properly deprecate it?


Jan-Mathijs Schoffelen - 2014-09-11 16:07:31 +0200

Seems not an issue anymore.