Skip to content

Commit

Permalink
Fix formatting and linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolossus committed Nov 21, 2024
1 parent b74e709 commit dff60ff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/expipe_plugin_cinpla/nwbutils/nwbwidgetsunitviewer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import warnings
from functools import partial

import warnings
import ipywidgets as widgets
import matplotlib.pyplot as plt
import numpy as np
Expand Down Expand Up @@ -222,10 +222,12 @@ def get_spatial_series(self):

def compute_rate_maps(self):
import pynapple as nap

try:
from spatial_maps import SpatialMap

HAVE_SPATIAL_MAPS = True
except:
except ImportError:
warnings.warn(
"spatial_maps not installed. Please install it to compute rate maps:\n"
">>> pip install git+https://github.com/CINPLA/spatial-maps.git"
Expand Down
11 changes: 11 additions & 0 deletions src/expipe_plugin_cinpla/tools/data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
load_spiketrains,
)

try:
import spatial_maps as sp

HAVE_SPATIAL_MAPS = True
except ImportError:
warnings.warn(
"spatial_maps not installed. Please install it to compute rate maps:\n"
">>> pip install git+https://github.com/CINPLA/spatial-maps.git"
)
HAVE_SPATIAL_MAPS = False


def view_active_channels(action, sorter):
path = action.data_path()
Expand Down

0 comments on commit dff60ff

Please sign in to comment.