Skip to content

Commit

Permalink
Merge branch 'dev-meeg' of https://github.com/vferat/pycrostates into…
Browse files Browse the repository at this point in the history
… dev-meeg
  • Loading branch information
vferat committed Feb 24, 2025
2 parents c8aaebf + 76aed86 commit 2d73418
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions pycrostates/cluster/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,9 +998,7 @@ def _smooth_segmentation(
https://doi.org/10.1109/10.391164.
"""
if not ignore_polarity:
raise NotImplementedError(
"Smoothing with polarity is not implemented yet."
)
raise NotImplementedError("Smoothing with polarity is not implemented yet.")
Ne, Nt = data.shape
Nu = states.shape[0]
Vvar = np.sum(data * data, axis=0)
Expand Down
6 changes: 4 additions & 2 deletions pycrostates/io/fiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,11 @@ def _check_fit_parameters_and_variables(

if "ignore_polarity" not in fit_parameters:
# TODO: Raise based on version ?
logger.warning("Key 'ignore_polarity' is missing from .fif file. Defaulting to True.")
logger.warning(
"Key 'ignore_polarity' is missing from .fif file. Defaulting to True."
)
fit_parameters["ignore_polarity"] = True

expected = set(reduce(operator.concat, valids[algorithm].values()))
diff = set(list(fit_parameters) + list(fit_variables)).difference(expected)
if len(diff) != 0:
Expand Down
1 change: 0 additions & 1 deletion pycrostates/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import numpy as np

from ._logs import logger
from ._checks import _ensure_gfp_function


def _correlation(A, B, ignore_polarity=True):
Expand Down

0 comments on commit 2d73418

Please sign in to comment.