Skip to content

Commit

Permalink
Merge branch 'main' into fix_vector_indices
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelgarcia authored Jun 21, 2024
2 parents 8a2c56f + 328bba0 commit abb9177
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
26 changes: 2 additions & 24 deletions src/spikeinterface/extractors/cellexplorersortingextractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import numpy as np
from pathlib import Path
import warnings
import datetime


from ..core import BaseSorting, BaseSortingSegment
from ..core.core_tools import define_function_from_class
Expand Down Expand Up @@ -36,36 +35,15 @@ class CellExplorerSortingExtractor(BaseSorting):

def __init__(
self,
file_path: str | Path | None = None,
file_path: str | Path,
sampling_frequency: float | None = None,
session_info_file_path: str | Path | None = None,
spikes_matfile_path: str | Path | None = None,
):
try:
from pymatreader import read_mat
except ImportError:
raise ImportError(self.installation_mesg)

assert (
file_path is not None or spikes_matfile_path is not None
), "Either file_path or spikes_matfile_path must be provided!"

if spikes_matfile_path is not None:
# Raise an error if the warning period has expired
deprecation_issued = datetime.datetime(2023, 4, 1)
deprecation_deadline = deprecation_issued + datetime.timedelta(days=180)
if datetime.datetime.now() > deprecation_deadline:
raise ValueError("The spikes_matfile_path argument is no longer supported in. Use file_path instead.")

# Otherwise, issue a DeprecationWarning
else:
warnings.warn(
"The spikes_matfile_path argument is deprecated and will be removed in six months. "
"Use file_path instead.",
DeprecationWarning,
)
file_path = spikes_matfile_path if file_path is None else file_path

self.spikes_cellinfo_path = Path(file_path)
self.session_path = self.spikes_cellinfo_path.parent
self.session_id = self.spikes_cellinfo_path.stem.split(".")[0]
Expand Down
2 changes: 2 additions & 0 deletions src/spikeinterface/extractors/neoextractors/intan.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ def __init__(
)

self._kwargs.update(dict(file_path=str(Path(file_path).absolute())))
if "ignore_integrity_checks" in neo_kwargs:
self._kwargs["ignore_integrity_checks"] = neo_kwargs["ignore_integrity_checks"]

@classmethod
def map_to_neo_kwargs(cls, file_path, ignore_integrity_checks: bool = False):
Expand Down

0 comments on commit abb9177

Please sign in to comment.