Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bz_GetSpikes.m has redundant/crashy load waveforms #394

Open
brendonw1 opened this issue Aug 17, 2020 · 3 comments
Open

bz_GetSpikes.m has redundant/crashy load waveforms #394

brendonw1 opened this issue Aug 17, 2020 · 3 comments

Comments

@brendonw1
Copy link
Collaborator

There are two parts of bz_GetSpikes that load spike waveforms and the newer/second one causes crashes if no .dat file - and is also redundant with the earlier part.

Summary:

  • Waveform load 1: Loads waveforms from .spks (old fashoned, not usually present, but sometimes), doesn't use .dat, but is only applicable in old datasets
  • Waveform load 2: Loads waveforms from .dats, but for some reason ALWAYS does this, even if waveforms are already there and causes crashes in old datasets wihtout .dats.

So I propose: to make the second part only get called if the first part didn't.

Agree?

@brendonw1
Copy link
Collaborator Author

... also put an "if" so second part doesn't crash the whole bz_getspikes but just gives an error

@AntonioFR8
Copy link
Collaborator

AntonioFR8 commented Aug 17, 2020 via email

@brendonw1
Copy link
Collaborator Author

Awesome will do.
Actually noticed one thing - there is a param called keepCluWave.
keepCluWave is default false and I can assume from how it's written that it's used to so it will always load from .dat even when .spk is present. I'll set so that still happens (overwrite .spk using .dat-based waves) if possible, but won't if error.

Just putting this all here in case I'm misunderstanding the intentions of the person who wrote this. Otherwise I'll do as I said.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants