fieldtrip/fieldtrip — pull request #34 by iandol (2014-02-26 10:41:13+00:00)
Title: Plexonv2

Nothing much seems to be happening on http://bugzilla.fcdonders.nl/show_bug.cgi?id=1795 so I'll make this an official pull. At the moment .plx files use the old inefficient plx reading code, only the new .pl2 format which FT can't support. But even for .plx files, the new code using the official Plexon SDK is many orders of magnitude faster and feature rich. This code is slightly modified from Thomas' original patch, in that currently FT cannot load most modern PLX/PL2 files as they potentially contain both 40kHz sampled spike data and 1kHz sample LFPs in the same file. Part of this problem is a simple bug in where the `if any(fsample~=fsample(1))` gets checked, in the original patch it checks all channels even if they're empty, in my version it waits and only checks the non-empty channels with data. Pulling this shouldn't cause any problems for those who are still using the legacy code, you have to specify `plexon_plx_v2` before any of this gets used...

I really wish there was more robust support for files with more than 1 sampling frequency, I've had to build my own plexon file support, and this seems an unnecessary limitation for FT (why can't you have a cfg setting for this?). But that is another matter...