<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#FFFFFF" text="#000000">Hi all,<br>
some time ago I was able to read in Blackrock LFP and events by using
the provided fieldtrip functions. However, I had to turn event time
points
into samples: <br>
<br>
---<br>
cfg = [];<br>
cfg.dataset = 'yourdata.ns2';<br>
data = ft_preprocessing(cfg);<br>
<br>
try<br>
evt = ft_read_event('yourdata.nev');<br>
catch<br>
warning('No triggers in dataset.');<br>
evt = [];<br>
end<br>
<br>
for i=1:numel(evt)<br>
evt(i).sample = round(evt(i).sample * data.hdr.Fs);<br>
end<br>
---<br>
<br>
The Blackrock folks have their Matlab toolkit on Github, but seem not
very responsive to pull requests.<br>
<a href="https://github.com/BlackrockMicrosystems/NPMK">https://github.com/BlackrockMicrosystems/NPMK</a><br>
<br>
I guess the challenge would be to use their code for reading in the
spikes:<br>
spikes = openNEV('yourdata.nev')<br>
<br>
...and to turn the result into fieldtrip spike format, as described
here:<br>
<a href="http://www.fieldtriptoolbox.org/reference/ft_datatype_spike/">http://www.fieldtriptoolbox.org/reference/ft_datatype_spike/</a><br>
<br>
Right? I currently don't work with spike data. Jichen, are you up for
taking a look at it?<br>
<br>
Jens<br>
<br>
<br>
<br>
<span>Schoffelen, J.M. (Jan Mathijs) wrote on 05/05/2019 12:56:</span><br>
<blockquote type="cite" cite="mid:9AA8F6CD-CA86-4FA9-A133-B889E90D187B@donders.ru.nl" style="word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;">
Hi,
<div class=""><br class="">
</div>
<div class="">There is a (by now fixed: it used to be broken) link on
the getting started page that you refer to in your message that contains
more information about the support for blackrock spike data. </div>
<div class=""><br class="">
</div>
<div class=""><a href="http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2964" class="" moz-do-not-send="true">http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2964</a></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Long story short: the neuroshare implementation is not
functional and a dead end street. We have been working on support for
blackrock data quite a while ago, but nobody has finished it. As far as I
know, support for lfp data is more or less implemented,
I donżt think that spike reading is fully supported by now. Feel free
to re-open the bug constructrively, and provide a working
implementation.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class="">
<div>
<blockquote type="cite" class=""><div class="">On 4 May 2019, at 12:13,
żżż <<a href="mailto:wjcpsysci@gmail.com" class="" moz-do-not-send="true">wjcpsysci@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">Hello, I am try to read Blackrock data of NEV,
like the step in the website
<a href="http://www.fieldtriptoolbox.org/getting_started/blackrock/" class="" moz-do-not-send="true">http://www.fieldtriptoolbox.org/getting_started/blackrock/</a></div>
<div dir="ltr" class=""><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">I was using </span><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation
Mono",Menlo,Courier,monospace;font-size:12px;background-color:rgba(27,31,35,0.05);border-radius:3px;margin:0px;padding:0.2em
0.4em;color:rgb(36,41,46)" class="">ft_read_spike</code><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class=""> ,
followed this code:</span><br style="box-sizing:border-box;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">
<code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation
Mono",Menlo,Courier,monospace;font-size:12px;background-color:rgba(27,31,35,0.05);border-radius:3px;margin:0px;padding:0.2em
0.4em;color:rgb(36,41,46)" class="">spike = ft_read_spike(filename,
'spikeformat', 'neuroshare');</code><br style="box-sizing:border-box;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">
<span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">and found an error that root in </span><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation
Mono",Menlo,Courier,monospace;font-size:12px;background-color:rgba(27,31,35,0.05);border-radius:3px;margin:0px;padding:0.2em
0.4em;color:rgb(36,41,46)" class="">ns_SetLibrary</code><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">.</span><br style="box-sizing:border-box;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">
<span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">That function only use one
function of 'mexprog', there are no
such function but an file of 'mexprog.dll'.</span><br style="box-sizing:border-box;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">
<span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">How could I use this file?</span><br style="box-sizing:border-box;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">
<span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px" class="">Thanks</span> <br class="">
</div>
<div dir="ltr" class=""><br class="">
</div>
<div class="">Jichen Wang</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="" moz-do-not-send="true">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a class="moz-txt-link-freetext" href="https://doi.org/10.1371/journal.pcbi.1002202">https://doi.org/10.1371/journal.pcbi.1002202</a><br class="">
</div></blockquote>
</div>
<br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-freetext" href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a>
<a class="moz-txt-link-freetext" href="https://doi.org/10.1371/journal.pcbi.1002202">https://doi.org/10.1371/journal.pcbi.1002202</a>
</pre>
</blockquote>
<br>
</body></html>