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

Update ephys_acute to latest version in modular-clustering #180

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions element_array_ephys/ephys_acute.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import pandas as pd
from element_interface.utils import dict_to_uuid, find_full_path, find_root_directory

from . import ephys_report, get_logger, probe
from . import ephys_report, probe
from .readers import kilosort, openephys, spikeglx

log = get_logger(__name__)
log = dj.logger

schema = dj.schema()

Expand Down Expand Up @@ -126,7 +126,7 @@ class AcquisitionSoftware(dj.Lookup):
acq_software ( varchar(24) ): Acquisition software, e.g,. SpikeGLX, OpenEphys
"""

definition = """ # Software used for recording of neuropixels probes
definition = """ # Name of software used for recording of neuropixels probes - SpikeGLX or Open Ephys
acq_software: varchar(24)
"""
contents = zip(["SpikeGLX", "Open Ephys"])
Expand Down Expand Up @@ -180,7 +180,10 @@ def auto_generate_entries(cls, session_key):
"probe_type": spikeglx_meta.probe_model,
"probe": spikeglx_meta.probe_SN,
}
if probe_key["probe"] not in [p["probe"] for p in probe_list]:
if (
probe_key["probe"] not in [p["probe"] for p in probe_list]
and probe_key not in probe.Probe()
):
probe_list.append(probe_key)

probe_dir = meta_filepath.parent
Expand All @@ -204,7 +207,10 @@ def auto_generate_entries(cls, session_key):
"probe_type": oe_probe.probe_model,
"probe": oe_probe.probe_SN,
}
if probe_key["probe"] not in [p["probe"] for p in probe_list]:
if (
probe_key["probe"] not in [p["probe"] for p in probe_list]
and probe_key not in probe.Probe()
):
probe_list.append(probe_key)
probe_insertion_list.append(
{
Expand Down Expand Up @@ -533,7 +539,6 @@ def make(self, key):
- 1 : 0 : -self._skip_channel_counts
]

# (sample x channel)
lfp = oe_probe.lfp_timeseries[:, lfp_channel_ind]
lfp = (
lfp * np.array(oe_probe.lfp_meta["channels_gains"])[lfp_channel_ind]
Expand Down
2 changes: 1 addition & 1 deletion element_array_ephys/spike_sorting/ecephys_spike_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,4 +337,4 @@ def _get_execution_duration(modules_input_hash_fp, modules_to_run):
dur = modules_status[m]["duration"] or 0
logged_exec_dur += int(dur)

return logged_exec_dur, modules_status
return logged_exec_dur, modules_status