Skip to content

Commit

Permalink
Test moving skan to hopefully avoid general test failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
edeno committed Apr 23, 2023
1 parent 4930788 commit 91477e2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/spyglass/common/common_position.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
interpolate_nan,
)
from position_tools.core import gaussian_smooth
from skan import skeleton_to_csgraph
from skan.draw import _clean_positions_dict
from tqdm import tqdm_notebook as tqdm
from track_linearization import (
get_linearized_position,
Expand All @@ -30,7 +28,7 @@
)

from .common_behav import RawPosition, VideoFile
from .common_interval import IntervalList
from .common_interval import IntervalList # noqa
from .common_nwbfile import AnalysisNwbfile
from ..utils.dj_helper_fn import fetch_nwb

Expand Down Expand Up @@ -954,6 +952,9 @@ def get_polygon_mask(self, plot_mask=True):
return is_in_polygon

def get_graph(self):
from skan import skeleton_to_csgraph
from skan.draw import _clean_positions_dict

mask = self.get_polygon_mask()
skeleton = skimage.morphology.skeletonize(mask)
csr_graph, coordinates, _ = skeleton_to_csgraph(skeleton)
Expand Down

0 comments on commit 91477e2

Please sign in to comment.