Skip to content

Commit

Permalink
Merge pull request #163 from scottclowe/rf_tidy-up
Browse files Browse the repository at this point in the history
RF: Tidy up
  • Loading branch information
scottclowe committed Jun 4, 2021
2 parents 569dc9c + 9870c1d commit ab32a9e
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 19 deletions.
1 change: 0 additions & 1 deletion fissa/ROI.py
Expand Up @@ -21,7 +21,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from builtins import filter
from itertools import product
# from warnings import warn

Expand Down
12 changes: 1 addition & 11 deletions fissa/core.py
Expand Up @@ -10,6 +10,7 @@

import collections
import glob
from multiprocessing import Pool
import os.path
import sys
import warnings
Expand All @@ -22,15 +23,6 @@
from . import neuropil as npil
from . import roitools

try:
from multiprocessing import Pool
has_multiprocessing = True
except ImportError:
warnings.warn('Multiprocessing library is not installed, using single ' +
'core instead. To use multiprocessing install it by: ' +
'pip install multiprocessing')
has_multiprocessing = False


def extract_func(inputs):
"""Extract data using multiprocessing.
Expand Down Expand Up @@ -306,7 +298,6 @@ def separation_prep(self, redo=False):

# Check whether we should use multiprocessing
use_multiprocessing = (
has_multiprocessing and
(self.ncores_preparation is None or self.ncores_preparation > 1)
)
# Do the extraction
Expand Down Expand Up @@ -437,7 +428,6 @@ def separate(self, redo_prep=False, redo_sep=False):

# Check whether we should use multiprocessing
use_multiprocessing = (
has_multiprocessing and
(self.ncores_separation is None or self.ncores_separation > 1)
)
# Do the extraction
Expand Down
3 changes: 0 additions & 3 deletions fissa/readimagejrois.py
Expand Up @@ -14,9 +14,6 @@
from __future__ import unicode_literals
from past.builtins import basestring

from builtins import str
from builtins import range

import sys
from itertools import product

Expand Down
2 changes: 0 additions & 2 deletions fissa/roitools.py
Expand Up @@ -6,8 +6,6 @@

from __future__ import division

from builtins import range

import numpy as np
from skimage.measure import find_contours

Expand Down
2 changes: 1 addition & 1 deletion fissa/tests/test_datahandler.py
Expand Up @@ -46,7 +46,7 @@ def setup_class(self):

def test_imagej_zip(self):
# load zip of rois
ROI_loc = 'fissa/tests/resources/RoiSet.zip'
ROI_loc = os.path.join(self.test_directory, 'resources', 'RoiSet.zip')
actual = datahandler.rois2masks(ROI_loc, self.data)

# assert equality
Expand Down
2 changes: 1 addition & 1 deletion fissa/tests/test_datahandler_framebyframe.py
Expand Up @@ -42,7 +42,7 @@ def setup_class(self):

def test_imagej_zip(self):
# load zip of rois
ROI_loc = 'fissa/tests/resources/RoiSet.zip'
ROI_loc = os.path.join(self.test_directory, 'resources', 'RoiSet.zip')
actual = datahandler.rois2masks(ROI_loc, self.data)

# assert equality
Expand Down

0 comments on commit ab32a9e

Please sign in to comment.