Skip to content

Commit

Permalink
[easy] Fix line wrapping (#493)
Browse files Browse the repository at this point in the history
Removes unnecessary line continuation markers.
  • Loading branch information
ttung authored Aug 31, 2018
1 parent 342fbe1 commit 58db7c0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 15 deletions.
6 changes: 4 additions & 2 deletions starfish/codebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,10 @@ def to_json(self, filename: str) -> None:
json.dump(code_array, f)

@staticmethod
def _normalize_features(array: Union["Codebook", IntensityTable], norm_order) \
-> Tuple[Union["Codebook", IntensityTable], np.ndarray]:
def _normalize_features(
array: Union["Codebook", IntensityTable],
norm_order,
) -> Tuple[Union["Codebook", IntensityTable], np.ndarray]:
"""unit normalize each feature of array
Parameters
Expand Down
4 changes: 2 additions & 2 deletions starfish/image/_filter/white_tophat.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def white_tophat(self, image: np.ndarray) -> np.ndarray:
return white_tophat(image, selem=structuring_element)

def run(
self, stack: ImageStack, in_place: bool=True, verbose: bool=False) \
-> Optional[ImageStack]:
self, stack: ImageStack, in_place: bool=True, verbose: bool=False
) -> Optional[ImageStack]:
"""Perform filtering of an image stack
Parameters
Expand Down
3 changes: 1 addition & 2 deletions starfish/spots/_detector/combine_adjacent_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ def combine_adjacent_features(

# now I need to make an IntensityTable from this thing.
spots_df = pd.DataFrame(spots)
spots_df[Features.DISTANCE] = \
mean_pixel_traces[Features.DISTANCE]
spots_df[Features.DISTANCE] = mean_pixel_traces[Features.DISTANCE]

# create new indexes for the output IntensityTable
channel_index = mean_pixel_traces.indexes[Indices.CH]
Expand Down
19 changes: 13 additions & 6 deletions starfish/spots/_detector/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@
class GaussianSpotDetector(SpotFinderAlgorithmBase):

def __init__(
self, min_sigma: Number, max_sigma: Number, num_sigma: int, threshold: Number,
overlap=0.5, measurement_type='max', is_volume: bool=True, **kwargs) \
-> None:
self,
min_sigma: Number,
max_sigma: Number,
num_sigma: int,
threshold: Number,
overlap: float=0.5,
measurement_type='max',
is_volume: bool=True, **kwargs
) -> None:
"""Multi-dimensional gaussian spot detector
This method is a wrapper for skimage.feature.blob_log
Expand Down Expand Up @@ -107,10 +113,11 @@ def image_to_spots(self, data_image: Union[np.ndarray, xr.DataArray]) -> SpotAtt
return SpotAttributes(rounded_blobs)

def run(
self, data_stack: ImageStack,
self,
data_stack: ImageStack,
blobs_image: Optional[Union[np.ndarray, xr.DataArray]]=None,
reference_image_from_max_projection: bool=False) \
-> IntensityTable:
reference_image_from_max_projection: bool=False,
) -> IntensityTable:
"""find spots in an ImageStack
Parameters
Expand Down
8 changes: 5 additions & 3 deletions starfish/spots/_detector/local_max_peak_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ def image_to_spots(self, image: np.ndarray) -> SpotAttributes:
attributes['spot_id'] = np.arange(attributes.shape[0])
return SpotAttributes(attributes)

def run(self, data_stack: ImageStack,
def run(
self,
data_stack: ImageStack,
blobs_image: Optional[Union[np.ndarray, xr.DataArray]]=None,
reference_image_from_max_projection: bool=False) \
-> IntensityTable:
reference_image_from_max_projection: bool=False,
) -> IntensityTable:
"""
Find spots.
Expand Down

0 comments on commit 58db7c0

Please sign in to comment.