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

[Add Check]: Check if spike times are increasing #394

Open
2 tasks done
CodyCBakerPhD opened this issue Jul 27, 2023 · 4 comments · May be fixed by #405
Open
2 tasks done

[Add Check]: Check if spike times are increasing #394

CodyCBakerPhD opened this issue Jul 27, 2023 · 4 comments · May be fixed by #405
Assignees
Labels
category: new check a new best practices check to apply to all NWBFiles and their contents

Comments

@CodyCBakerPhD
Copy link
Contributor

What would you like to see added to the NWBInspector?

@gviejo noticed in DANDI set 000003, file sub-YutaMouse41/sub-YutaMouse41_ses-YutaMouse41-150831_behavior+ecephys.nwb, unit ID 1

The spike times reset to zero about halfway through

Investigating if this is a problem with the conversion code or with the source data itself

But we should probably add a check for this in the Inspector to catch it going forward

Pseudocode or other logic of the check

No response

Do you have any interest in helping implement the check function?

Yes.

Code of Conduct

@CodyCBakerPhD CodyCBakerPhD added the category: new check a new best practices check to apply to all NWBFiles and their contents label Jul 27, 2023
@CodyCBakerPhD
Copy link
Contributor Author

Reproducible code

from nwbinspector.tools import get_s3_urls_and_dandi_paths
from pynwb import NWBHDF5IO
import matplotlib.pyplot as plt

s3_urls = get_s3_urls_and_dandi_paths(dandiset_id="000003")
dandi_paths = {v: k for k, v in s3_urls.items()}
s3_url = dandi_paths["sub-YutaMouse41/sub-YutaMouse41_ses-YutaMouse41-150831_behavior+ecephys.nwb"]

io = NWBHDF5IO(path=s3_url, mode="r", driver="ros3")
nwbfile = io.read()

spike_times = nwbfile.units.get_unit_spike_times(index=1)

plt.plot(spike_times)

@CodyCBakerPhD
Copy link
Contributor Author

@gviejo spotted another one in 000070, sub-Jenkins/sub-Jenkins_ses-20090912_behavior+ecephys.nwb

@bendichter
Copy link
Contributor

@alessandratrapani this would be another good issue to tackle.

@alessandratrapani alessandratrapani linked a pull request Sep 18, 2023 that will close this issue
4 tasks
@CodyCBakerPhD CodyCBakerPhD linked a pull request Sep 18, 2023 that will close this issue
4 tasks
@bendichter bendichter removed a link to a pull request Sep 18, 2023
4 tasks
@bendichter bendichter linked a pull request Sep 18, 2023 that will close this issue
4 tasks
@CodyCBakerPhD
Copy link
Contributor Author

Also found by @gviejo in sub-Mouse32/sub-Mouse32_ses-Mouse32-140820_behavior+ecephys.nwb of DANDI set 000056

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: new check a new best practices check to apply to all NWBFiles and their contents
Projects
None yet
3 participants