diff --git a/element_array_ephys/ephys_acute.py b/element_array_ephys/ephys_acute.py index 0a213db8..cbafb194 100644 --- a/element_array_ephys/ephys_acute.py +++ b/element_array_ephys/ephys_acute.py @@ -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"]) @@ -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 @@ -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( { @@ -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] diff --git a/element_array_ephys/ephys_no_curation.py b/element_array_ephys/ephys_no_curation.py index 4d052169..22b76c39 100644 --- a/element_array_ephys/ephys_no_curation.py +++ b/element_array_ephys/ephys_no_curation.py @@ -58,7 +58,6 @@ def activate( global _linking_module _linking_module = linking_module - # activate probe.activate( probe_schema_name, create_schema=create_schema, create_tables=create_tables ) @@ -315,8 +314,9 @@ def make(self, key): break else: raise FileNotFoundError( - "Ephys recording data not found!" - " Neither SpikeGLX nor Open Ephys recording files found" + f"Ephys recording data not found!" + f" Neither SpikeGLX nor Open Ephys recording files found" + f" in {session_dir}" ) supported_probe_types = probe.ProbeType.fetch("probe_type")