open-ephys / analysis-tools

Archived code for reading data saved by the Open Ephys GUI
59 stars 176 forks source link

OpenEphy data to Plx #7

Open flamesugar opened 9 years ago

flamesugar commented 9 years ago

I'm a new user of OpenEphy (and Matlab...), when I try to compile openephy data to plexon data it appear error in Matlab2014b: ephys2plx Error using getFileHeader (line 6) Error: Unexpected MATLAB expression.

Error in ephysConv (line 6) FileHeaders{1,1}=getFileHeader([pathName ephysInfo.events_file]);

Error in ephys2plx (line 15) ephysConv; %get .xml file, and read information

Any idea what should I do ? my laptop is MAC OS X Yosemite, Matlab2014b for mac and Xcode 6.3.1 installed. I follow the steps in https://github.com/open-ephys/analysis-tools/tree/master/ephys2plx and execute mex ephys2plx_mex.c says successful installed complier. Data format is openEphy format stored in one fold with 32 channel continuous data , 8 Tetrode spike data and 8 ADC channel event.

delcasso commented 9 years ago

I am having a similar problem with matlab 2015b. I have the feeling my problem comes from the conversion of the spike data

flamesugar commented 9 years ago

Hi, sebastien: now it can convert single channel mode (SE.spikes)data to Plx, but not tetrode (TT.spikes)data. I ask Aron to update a few months ago....

delcasso commented 9 years ago

ok, thanks

JMHyman commented 8 years ago

I can get the latest ephsytoplx mex to compile on matlab 2013A and 2015B, but I'm still getting errors when I run the program. When it writes the .plx it's getting to 33500% done, but then obviously runs out of memory. I'm assuming it's not supposed to reach 33500%. Any help would be greatly appreciated.

Here's the latest error I got:

10%...20%...30%...40%...50%...60%...70%...80%...90%...100%...110%...120%...130%...140%...150 ....

3410%...33420%...33430%...33440%...33450%...33460%...33470%...33480%...33490%...33500%...33510%...33520%...33530%...335... Output truncated. Text exceeds maximum line length of 25,000 characters for Command Window display. Error using ephys2plx_mex Out of memory. Type HELP MEMORY for your options.

Error in ephys2plx (line 21) ephys2plx_mex(FileHeaders,FileNames,fullPlexonName);

JMHyman commented 8 years ago

I figured a way to get OpenEphys files into OFS. It's kind of convoluted and my OFS is having trouble saving .plx, but I can cut the file and output the timestamps to Nex.

First, I load the OpenEphys to matlab with load_open_ephys_data_faster. Next, I use the Neuralynx script (MattoNlx) to make .ntt files. I then can open those with OFS.

Hope this helps some people.

flamesugar commented 8 years ago

thanks!

Best Regards, Yan, Tang PhD student, East China Normal University, DKFZ, University of Heidelberg mail address: 3-3-2 Im Neueheimer Feld 694 69120 Heidelberg, Germany phone:+49017680872642

2015-11-24 22:58 GMT+01:00 JMHyman notifications@github.com:

I figured a way to get OpenEphys files into OFS. It's kind of convoluted and my OFS is having trouble saving .plx, but I can cut the file and output the timestamps to Nex.

First, I load the OpenEphys to matlab with load_open_ephys_data_faster. Next, I use the Neuralynx script (MattoNlx) to make .ntt files. I then can open those with OFS.

Hope this helps some people.

— Reply to this email directly or view it on GitHub https://github.com/open-ephys/analysis-tools/issues/7#issuecomment-159417563 .

flamesugar commented 8 years ago

Hi, JMHyman: How do you use Mat2Nlx to make .ntt files? I am having error here, after loading openephy data into Matlab

 e.g. 100_CH6.continuous load into [data, info, timestamps]

then I use example in Mat2NlxCSC:

 Mat2NlxCSC('test.ncs',0,1,1, FieldSelectionFlags,Timestamps, Samples);

And error likes this:

 The iput Matlab array at argument number 6 has an invalid size of

6562816 x1 , this argument should have a size of 512x1

How to solve it? it seems the CSC format needs 512xN matrix rather than Openephy's Nx1 matrix.... Anyone can help?

Best Regards, Yan, Tang PhD student, East China Normal University, DKFZ, University of Heidelberg mail address: 3-3-2 Im Neueheimer Feld 694 69120 Heidelberg, Germany phone:+49017680872642

2015-11-24 23:27 GMT+01:00 Flame Tang flamesugar@gmail.com:

thanks!

Best Regards, Yan, Tang PhD student, East China Normal University, DKFZ, University of Heidelberg mail address: 3-3-2 Im Neueheimer Feld 694 69120 Heidelberg, Germany phone:+49017680872642

2015-11-24 22:58 GMT+01:00 JMHyman notifications@github.com:

I figured a way to get OpenEphys files into OFS. It's kind of convoluted and my OFS is having trouble saving .plx, but I can cut the file and output the timestamps to Nex.

First, I load the OpenEphys to matlab with load_open_ephys_data_faster. Next, I use the Neuralynx script (MattoNlx) to make .ntt files. I then can open those with OFS.

Hope this helps some people.

— Reply to this email directly or view it on GitHub https://github.com/open-ephys/analysis-tools/issues/7#issuecomment-159417563 .

delcasso commented 8 years ago

famesugar take a look at Neuralynx Data format http://neuralynx.com/software/NeuralynxDataFileFormats.pdf

They store 1 timestmaps for each block of 512 values. You have to tranform your data format

t_lfp wich is a 1 to N vector becomes [t_lfp(1) t_lfp(513) t_lfp(1536) etc.]

d_lfp wich is a 1 to N vector becomes [d_lfp(1) ... d_lfp(512) ; d_lfp(513) ... d_lfp(1024) ; d_lfp(1025) ... d_lfp(1536) ; etc.]

Does it helps ?