Skip to content

Commit a738ee7

Browse files
authored
Merge pull request #93 from CBroz1/rk
Ensure Path type for get_spikeglx_meta_filepath
2 parents 6757ef7 + 0e94252 commit a738ee7

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

element_array_ephys/ephys_acute.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -890,9 +890,14 @@ def yield_unit_waveforms():
890890

891891
def get_spikeglx_meta_filepath(ephys_recording_key):
892892
# attempt to retrieve from EphysRecording.EphysFile
893-
spikeglx_meta_filepath = (EphysRecording.EphysFile & ephys_recording_key
894-
& 'file_path LIKE "%.ap.meta"').fetch1('file_path')
895-
893+
spikeglx_meta_filepath = pathlib.Path(
894+
(
895+
EphysRecording.EphysFile
896+
& ephys_recording_key
897+
& 'file_path LIKE "%.ap.meta"'
898+
).fetch1("file_path")
899+
)
900+
896901
try:
897902
spikeglx_meta_filepath = find_full_path(get_ephys_root_data_dir(),
898903
spikeglx_meta_filepath)

element_array_ephys/ephys_chronic.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,13 @@ def yield_unit_waveforms():
835835

836836
def get_spikeglx_meta_filepath(ephys_recording_key):
837837
# attempt to retrieve from EphysRecording.EphysFile
838-
spikeglx_meta_filepath = (EphysRecording.EphysFile & ephys_recording_key
839-
& 'file_path LIKE "%.ap.meta"').fetch1('file_path')
838+
spikeglx_meta_filepath = pathlib.Path(
839+
(
840+
EphysRecording.EphysFile
841+
& ephys_recording_key
842+
& 'file_path LIKE "%.ap.meta"'
843+
).fetch1("file_path")
844+
)
840845

841846
try:
842847
spikeglx_meta_filepath = find_full_path(get_ephys_root_data_dir(),

element_array_ephys/ephys_no_curation.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,13 @@ def yield_unit_waveforms():
849849

850850
def get_spikeglx_meta_filepath(ephys_recording_key):
851851
# attempt to retrieve from EphysRecording.EphysFile
852-
spikeglx_meta_filepath = (EphysRecording.EphysFile & ephys_recording_key
853-
& 'file_path LIKE "%.ap.meta"').fetch1('file_path')
852+
spikeglx_meta_filepath = pathlib.Path(
853+
(
854+
EphysRecording.EphysFile
855+
& ephys_recording_key
856+
& 'file_path LIKE "%.ap.meta"'
857+
).fetch1("file_path")
858+
)
854859

855860
try:
856861
spikeglx_meta_filepath = find_full_path(get_ephys_root_data_dir(),

0 commit comments

Comments
 (0)