Skip to content
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
2 changes: 1 addition & 1 deletion element_array_ephys/ephys_acute.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def auto_generate_entries(cls, session_key):

probe_dir = meta_filepath.parent
try:
probe_number = re.search("(imec)?\d{1}$", probe_dir.name).group()
probe_number = re.search(r"(imec)?\d{1}$", probe_dir.name).group()
probe_number = int(probe_number.replace("imec", ""))
except AttributeError:
probe_number = meta_fp_idx
Expand Down
2 changes: 1 addition & 1 deletion element_array_ephys/ephys_no_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def auto_generate_entries(cls, session_key):

probe_dir = meta_filepath.parent
try:
probe_number = re.search("(imec)?\d{1}$", probe_dir.name).group()
probe_number = re.search(r"(imec)?\d{1}$", probe_dir.name).group()
probe_number = int(probe_number.replace("imec", ""))
except AttributeError:
probe_number = meta_fp_idx
Expand Down
4 changes: 2 additions & 2 deletions element_array_ephys/readers/kilosort.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ def extract_clustering_info(cluster_output_dir):
is_curated = bool(np.any(curation_row))
if creation_time is None and is_curated:
row_meta = phylog.meta[np.where(curation_row)[0].max()]
datetime_str = re.search("\d{2}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}", row_meta)
datetime_str = re.search(r"\d{2}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}", row_meta)
if datetime_str:
creation_time = datetime.strptime(
datetime_str.group(), "%Y-%m-%d %H:%M:%S"
)
else:
creation_time = datetime.fromtimestamp(phylog_filepath.stat().st_ctime)
time_str = re.search("\d{2}:\d{2}:\d{2}", row_meta)
time_str = re.search(r"\d{2}:\d{2}:\d{2}", row_meta)
if time_str:
creation_time = datetime.combine(
creation_time.date(),
Expand Down
4 changes: 2 additions & 2 deletions element_array_ephys/readers/kilosort_triggering.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(

def parse_input_filename(self):
meta_filename = next(self._npx_input_dir.glob("*.ap.meta")).name
match = re.search("(.*)_g(\d)_t(\d+|cat)\.imec(\d?)\.ap\.meta", meta_filename)
match = re.search(r"(.*)_g(\d)_t(\d+|cat)\.imec(\d?)\.ap\.meta", meta_filename)
session_str, gate_str, trigger_str, probe_str = match.groups()
return session_str, gate_str, trigger_str, probe_str or "0"

Expand Down Expand Up @@ -719,7 +719,7 @@ def _get_median_subtraction_duration_from_log(self):
) and previous_line.startswith("Total processing time:"):
# regex to search for the processing duration - a float value
duration = int(
re.search("\d+\.?\d+", previous_line).group()
re.search(r"\d+\.?\d+", previous_line).group()
)
return duration
previous_line = line
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"plotly",
"seaborn",
"spikeinterface",
"scikit-image",
"scikit-image>=0.20",
"nbformat>=4.2.0",
"pyopenephys>=1.1.6",
],
Expand Down