Back to the main page.

Bug 1720 - ensure that the spike-field tutorial works on Neurosim data

Status CLOSED FIXED
Reported 2012-09-19 15:46:00 +0200
Modified 2019-08-10 12:03:06 +0200
Product: FieldTrip
Component: documentation
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P3 normal
Assigned to: Bart Gips
URL:
Tags:
Depends on:
Blocks: 998
See also:

Bart Gips - 2012-09-19 15:46:04 +0200

see http://fieldtrip.fcdonders.nl/tutorial/spikefield


Bart Gips - 2012-09-19 15:47:38 +0200

to do 1) confirm that it works on the tutorial data 2) collect a consistent set of Neursim data 3) make a test script using the neurosim data 4) resolve all problems in the test script, FT code or documentation


Robert Oostenveld - 2012-09-19 19:11:20 +0200

Perhaps consider writing a "getting started with neurosim"


Bart Gips - 2012-09-25 09:27:10 +0200

Created attachment 322 the function to define the trials. Mentioned in the tutorial, but not present on the FTP server.


Bart Gips - 2012-09-25 09:30:50 +0200

Created attachment 323 Test script/function - experimental data A test function that performs all the operations mentioned in the spikefield tutorial, but only plots figures that are called by external functions (e.g. ft_singleplotTFR). It uses trialfun_stimon_samples.m to define the trials. It uses the test-dataset containing experimental recordings.


Robert Oostenveld - 2012-09-25 14:21:44 +0200

(In reply to comment #3) I have added the trialfun to /home/common/matlab/fieldtrip/data/ftp/tutorial/spikefield it will also appear on the ftp server in the corresponding directory this evening


Robert Oostenveld - 2012-09-25 14:32:46 +0200

(In reply to comment #4) I copied the script and added it to FT with some minor changes. manzana> svn commit test_tutorial_spikefield.m Adding test_tutorial_spikefield.m Transmitting file data . Committed revision 6533.


Bart Gips - 2012-09-25 14:36:26 +0200

Changed ft_channelselection to support 'V_ext' as channel input. This extracts all extracellular/'LFP' traces from the Neurosim data Index: ft_channelselection.m =================================================================== --- ft_channelselection.m (revision 6487) +++ ft_channelselection.m (working copy) @@ -33,6 +33,7 @@ % 'mua' is replaced by all channels in the datafile starting with 'mua' % 'spike' is replaced by all channels in the datafile starting with 'spike' % 10 is replaced by the 10th channel in the datafile +% 'V_ext' is replaced by all extracellular/'LFP' traces from Neurosim data % % Other channel groups are % 'EEG1010' with approximately 90 electrodes @@ -144,6 +145,7 @@ labellfp = datachannel(strncmp('lfp', datachannel, length('lfp'))); labelmua = datachannel(strncmp('mua', datachannel, length('mua'))); labelspike = datachannel(strncmp('spike', datachannel, length('spike'))); +labellfpneurosim = datachannel(strncmp('Extracellular V', datachannel, length('Extracellular V'))); % use regular expressions to deal with the wildcards labelreg = false(size(datachannel)); @@ -333,6 +335,7 @@ findmua = find(strcmp(channel, 'mua')); findspike = find(strcmp(channel, 'spike')); findgui = find(strcmp(channel, 'gui')); +findlfpneurosim= find(strcmp(channel, 'V_ext')); % remove any occurences of groups in the channel list channel([ @@ -373,6 +376,7 @@ findmua findspike findgui + findlfpneurosim ]) = []; % add the full channel labels to the channel list @@ -417,7 +421,9 @@ if findlfp, channel = [channel; labellfp]; end if findmua, channel = [channel; labelmua]; end if findspike, channel = [channel; labelspike]; end +if findlfpneurosim,channel = [channel; labellfpneurosim]; end + % remove channel labels that have been excluded by the user badindx = match_str(channel, badchannel); channel(badindx) = [];


Bart Gips - 2012-09-25 15:14:02 +0200

Created attachment 325 Test script/function spikefield tutorial - Neurosim data As it stands now, I interpret the extracellular potential found in 'signals' as an LFP. This signal seems to be some sort of superposition of extracellular potentials in the different subnetworks (in this case, 2 exist). The simulating of LFP signals on Neurosim's side might still need some work, however the implementation in FieldTrip works. (using the patch for ft_channelselection.m mentioned above is used). The simulated data is the same as in the other tutorial ('spikes' and 'signals'), I shall add them again for completeness.


Bart Gips - 2012-09-25 15:14:23 +0200

Created attachment 326 'spikes' file from Neurosim (should be in one folder together with 'signals')


Bart Gips - 2012-09-25 15:14:45 +0200

Created attachment 327 'signals' file from Neurosim (used for extracting header information and LFP traces)


Robert Oostenveld - 2013-08-07 16:58:21 +0200

does this actually now work? can the bug be closed?


Bart Gips - 2013-08-07 17:19:22 +0200

(In reply to comment #11) This has been a while. I seem to recall that it worked. I found these files on my network drive. And they seem to break (e.g. channel selection, because the readout of the neuron labels has changed since I last uploaded the test function). I will fix it and then can then close it. Where do these tutorial test files go again? I can't see it in ./test/test_tutorial_spikefield_* (Perhaps they where never uploaded properly, I honestly do not remember)


Robert Oostenveld - 2013-08-07 17:33:21 +0200

They should indeed be uploaded to fieldtrip/test. I suggest to name them test_tutorial_spike_neurosim and test_tutorial_spikefield_neurosim. The test scripts for the tutorials with the original data are also not in fieldtrip/test. Please also add those as test_tutorial_spike and test_tutorial_spikefield. Please do mention in the test scripts themselves to which version (i.e. date of download of the documentation) it corresponds. This allows us to update the test scripts in the future along with the documentation, and still not loose the old test scripts (like the tutorial for the beamformer).


Bart Gips - 2013-08-08 11:51:16 +0200

Created attachment 501 tutorial test-functions + neurosim test data (In reply to comment #13) I have checked and updated: test_tutorial_spike test_tutorial_spike_neurosim test_tutorial_spikefield test_tutorial_spikefield_neurosim as well as: spikes signals (the two neurosim files, should go in '/home/common/matlab/fieldtrip/data/ftp/tutorial/spike/' and '/home/common/matlab/fieldtrip/data/ftp/tutorial/spikefield/') However, I do not seem to have access to the ftp folder. So I cannot upload them. Can you upload them for me? or explain how to get access/give me access?


Robert Oostenveld - 2013-08-08 14:23:00 +0200

(In reply to comment #14) They should not go in data/ftp, but in data/test in a subdir. you should have the permissions to do cd /home/common/matlab/fieldtrip/data/test mkdir bug1720 and then copy the files in the subdir.


Bart Gips - 2013-08-08 14:39:21 +0200

(In reply to comment #15) Ok, I can move the test data there. But shouldn't the test_tutorial functions go to fieldtrip/test? I forgot to mention that I can't write there either...


Robert Oostenveld - 2013-08-08 14:42:56 +0200

(In reply to comment #16) you don't write to fieldtrip/test, but "svn commit" the files there. See http://fieldtrip.fcdonders.nl/development/svn


Bart Gips - 2013-08-09 09:24:10 +0200

(In reply to comment #17) Of course... bash-4.1$ svn add test_tutorial_spike.m A test_tutorial_spike.m bash-4.1$ svn add test_tutorial_spike_neurosim.m A test_tutorial_spike_neurosim.m bash-4.1$ svn add test_tutorial_spikefield.m A test_tutorial_spikefield.m bash-4.1$ svn add test_tutorial_spikefield_neurosim.m A test_tutorial_spikefield_neurosim.m that should do it, I hope.


Robert Oostenveld - 2019-08-10 12:03:06 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on https://github.com/fieldtrip/fieldtrip/issues.