ryanharvey1 / ephys_tools

Code for internal lab sharing
GNU General Public License v3.0
6 stars 0 forks source link

get_lfp #3

Closed ouardouzm closed 3 years ago

ouardouzm commented 3 years ago

Hi, First Happy new year 2021. I am using 4 tetrodes and recording neuralynx file .ncs when running get_lfp I got the following error Error using xlsread (line 136) Unable to open file 'channel_map_64.xlsx' file 'C:\Users\ouard\OneDrive\Documents\MATLAB\ephys_tools-masters\lfp\channel_map_64.xlsx' Could you help?

Thanks

lolaBerkowitz commented 3 years ago

You should run get_lfp from the raw neuralynx data folder. If the .ncs files are not present, get_lfp runs code for probe recordings (right now our default for probes is 64-channel).

Cd to your data directory. Also - I've just pushed maps for 4tt and 4tt without all channels as we didn't have those defaults before.

Pull those changes and let me know if you have further issues.

Happy new year :)

ouardouzm commented 3 years ago

hi, I did updated the files this what I get

get_lfp No records were retrieved from the file. channel... 1 No records were retrieved from the file. 2 No records were retrieved from the file. 3 No records were retrieved from the file. 4 No records were retrieved from the file. 5 No records were retrieved from the file. 6 No records were retrieved from the file. 7 No records were retrieved from the file. 8 No records were retrieved from the file. 9 No records were retrieved from the file. 10 No records were retrieved from the file. 11 No records were retrieved from the file. 12 No records were retrieved from the file. 13 No records were retrieved from the file. 14 No records were retrieved from the file. 15 No records were retrieved from the file. 16 No records were retrieved from the file. lfp loaded saving .lfp file loading downsampled lfp loading LFP file... No records were retrieved from the file. Error using matlab.internal.math.interp1 Interpolation requires at least two sample points for each grid dimension.

Error in interp1 (line 154) VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol);

Error in get_lfp>load_lfp_from_file (line 264) ts = interp1(linspace(1,length(lfp.data),length(ts)), ts, 1:length(lfp.data));

Error in get_lfp (line 101) data = load_lfp_from_file(data,overwrite_lfp,fs_for_datastruct,Fnew,Fold);

lolaBerkowitz commented 3 years ago

The "No records were retrieved from the file" error makes me think your .ncs files are not being loaded correctly or more likely they are empty. How large are your .ncs files?

ouardouzm commented 3 years ago

Sorry the file I used was empty. I used an other one and it worked. Thanks A lot for your support.

lolaBerkowitz commented 3 years ago

Glad it worked out. Closing issue.

ouardouzm commented 3 years ago

Thanks