open-ephys / analysis-tools

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

Trouble with the compilier #14

Open ChadSam opened 8 years ago

ChadSam commented 8 years ago

I’m new user to Open Ephys. When I try to compile the OE data to plexon, the ephys2plx script fails at ephys2plx_mex.c

Error using mex

I have tried the script in two versions of matlab (2013a and 2015a) and get the same failure.

Any suggestions as to why the complier is failing. Im using windows 7. Data format is in Openephys format.

delcasso commented 8 years ago

I am sorry ephys2plx_mex.c doens't work fro me yet. I will let you know if I success.

DiegoBenusiglio commented 8 years ago

Hello everybody,

I am compiling ephys2plx_mex.c on Mac OSX 10.11.2 with Xcode 7.2 and it works, even though it produces the following Warnings:

mex ephys2plx_mex.c Building with 'Xcode with Clang'. /Users/benusiglio1/Documents/Softwares/Flame-MyLab SP/analysis-tools-master/ephys2plx/ephys2plxmex.c:322:1: warning: '/' within block comment [-Wcomment] /_****/ ^ /Users/benusiglio1/Documents/Softwares/Flame-MyLab SP/analysis-tools-master/ephys2plx/ephys2plx_mex.c:448:41: warning: assigning to 'short ' from 'unsigned short ' converts between pointers to integer types with different sign [-Wpointer-sign] iEphys_SpikeDataPacket_Data[i]->Data = (unsigned short )mxCalloc(iEphys_SpikeDataPacket[i]->NumChannels * iEphys_SpikeDataPacket[i]->NumSamplesPerSpike, sizeof(unsigned short)); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/benusiglio1/Documents/Softwares/Flame-MyLab SP/analysis-tools-master/ephys2plx/ephys2plx_mex.c:472:41: warning: assigning to 'short ' from 'unsigned short ' converts between pointers to integer types with different sign [-Wpointer-sign] iEphys_SpikeDataPacket_Data[i]->Data = (unsigned short )mxCalloc(1, sizeof(unsigned short)); ^ ~~~~~~~~~~~~~ /Users/benusiglio1/Documents/Softwares/Flame-MyLab SP/analysis-tools-master/ephys2plx/ephys2plx_mex.c:473:42: warning: incompatible pointer types assigning to 'float ' from 'unsigned short ' [-Wincompatible-pointer-types] iEphys_SpikeDataPacket_Data[i]->Gains = (unsigned short *)mxCalloc(1, sizeof(unsigned short)); ^ ~~~~~~~~~~~~~ /Users/benusiglio1/Documents/Softwares/Flame-MyLab SP/analysis-tools-master/ephys2plx/ephys2plx_mex.c:1881:1: warning: control may reach end of non-void function [-Wreturn-type] } ^ /Users/benusiglio1/Documents/Softwares/Flame-MyLab SP/analysis-tools-master/ephys2plx/ephys2plx_mex.c:1950:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ /Users/benusiglio1/Documents/Softwares/Flame-MyLab SP/analysis-tools-master/ephys2plx/ephys2plx_mex.c:2127:9: warning: comparison of array 'iEventFile' equal to a null pointer is always false [-Wtautological-pointer-compare] if ((iEventFile==NULL)) { ^~~~ ~~ /Users/benusiglio1/Documents/Softwares/Flame-MyLab SP/analysis-tools-master/ephys2plx/ephys2plx_mex.c:2137:9: warning: comparison of array 'iSpikeFiles' equal to a null pointer is always false [-Wtautological-pointer-compare] if ((iSpikeFiles==NULL)) { ^~~ ~~~~ /Users/benusiglio1/Documents/Softwares/Flame-MyLab SP/analysis-tools-master/ephys2plx/ephys2plx_mex.c:2146:9: warning: comparison of array 'iContinuousFiles' equal to a null pointer is always false [-Wtautological-pointer-compare] if ((iContinuousFiles==NULL)) { ^~~~ ~~~~ 9 warnings generated. MEX completed successfully.

Does anyone know what they refer to? Can they be fixed? As I reported in the Issue #146 : https://github.com/open-ephys/GUI/issues/146, I managed to convert OE data into .plx (Plexon) format only in single channel mode (SE*.spikes) and I did not manage to convert OE data in stereotrode (ST) or tetrode (TT) mode. Could it be related to the compiling?

Thanks in advance for the help, Diego.