Skip to content

Commit

Permalink
Simplify the slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
e-koch committed Oct 23, 2016
1 parent 7bca14d commit 11477d4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fil_finder/filfind_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ def __init__(self, image, header=None, beamwidth=None, skel_thresh=None,

self._wcs = WCS(self.header)

if region_slice is None:
self.image = image
else:
if region_slice is not None:
slices = (slice(region_slice[0], region_slice[1], None),
slice(region_slice[2], region_slice[3], None))
self.image = np.pad(self.image[slices], 1, padwithzeros)
Expand Down

0 comments on commit 11477d4

Please sign in to comment.