Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Problem with opening file with load_open_ephys_data.m #66

Open

Description

@yannunh

image

The m file and spike, continuous and event file is in same dir. ( same error with continuous and event file)

I already tried with this commands:
load_open_ephys_data("C:\Open Ephys\2018-06-01_19-23-51\100_CH31.continuous");

anything else I need to do? I copied (https://github.com/open-ephys/analysis-tools/blob/master/load_open_ephys_data.m) this in new script file and named load_open_ephys_data.m

Activity

  1. adehad commented on Oct 20, 2018

    @adehad

    The filename should be given in single quotes not double quotes as you have done.

    e.g.
    load_open_ephys_data('100_CH31.continuous');

  2. malenitzin commented on Nov 28, 2018

    @malenitzin

    adehad,
    this works so well.
    Thanks

  3. psgundla commented on Apr 8, 2019

    @psgundla

    after loading the files how can we plot power-spectrum and amplitude spectrum graphs for certain time period.

  4. adehad commented on May 26, 2019

    @adehad

    @pranavswaroopgundla
    Try something like this for a PSD:

    Fs = 3e3; % sampling frequency
    spect.winSize = 2^12;   % window size
    spect.win = blackman(spect.winSize);
    spect.overlap = 0.8;    % percentage window overlap
    spect.nOverlap = floor(spect.winSize*spect.overlap);
    spect.nFFT = 10*Fs;     % number of fft samples, e.g. 10 per sample
    figure;
    spectrogram(sig, spect.win, spect.nOverlap, spect.nFFT, Fs, 'xaxis','psd'); 
    colormap(hot)
    

    Where sig is your signal for a given time period.
    You can replace 'psd' with 'power' for a power spectrum.
    NOTE: Our data is actually sampled at 30e3, but as the resulting image takes too long to load we used a sampling rate x10 lower, meaning the frequency scale is also scaled.

  5. psgundla commented on May 27, 2019

    @psgundla
  6. adehad commented on May 27, 2019

    @adehad

    @pranavswaroopgundla What error message are you getting?

  7. adehad commented on May 27, 2019

    @adehad

    Send a screenshot of the command window and the figure

  8. psgundla commented on May 27, 2019

    @psgundla

    @adehad
    matlab
    This is the error happening just take a look
    the error is in ".png file"

    powerspectrum.zip

    and the figure is powerspectrum.zip

  9. adehad commented on May 27, 2019

    @adehad

    spectrogram requires a vector input, so try passing in a single row of your Data variable.

  10. psgundla commented on May 27, 2019

    @psgundla

    @adehad
    Capture
    the error is still there I don't know what is the causing an error
    can u please give me ur mail id so that I can send my files to you so it might solve the problem faster.

  11. adehad commented on May 27, 2019

    @adehad

    Sorry I edited my comment, the function takes in a single channel of data, e.g.
    Data(1,:)

  12. psgundla commented on May 27, 2019

    @psgundla
  13. adehad commented on May 27, 2019

    @adehad

    Hmm, the error is saying that spect.winSize is greater than the length of your data. I notice that the DATA variable is now transposed in your workspace, so perhaps you need to pass in Data(:, 1), to select a single data channel.

  14. psgundla commented on May 27, 2019

    @psgundla
  15. adehad commented on May 27, 2019

    @adehad

    Yes, this is a common problem if you have a long recording.
    There are a few ways of managing this:

    1. Use a shorter segment of your recording, in your case Data(1:1e4, 1). This would plot the spectogram from the first 10,000 samples.
    2. Reduce the frequency resolution, e.g.: spect.nFFT = 2*Fs
    3. Reduce the sampling frequency you are using, as I mentioned I did with my data earlier. Using x10 lower worked for us.
  16. psgundla commented on May 29, 2019

    @psgundla

    @adehad it worked for me and thank you can you help how to plot the power spectrum graph for certain time limits in the signals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions