Skip to content

Commit 9574ebf

Browse files
authored
Merge pull request #124 from CellKai/Fix-docstring
Fix Ruff errors
2 parents e50ee1e + 3414d40 commit 9574ebf

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

src/imcflibs/imagej/trackmate.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -236,31 +236,35 @@ def spot_filtering(
236236

237237

238238
def set_spotfilter(settings, filter_key, filter_value):
239-
"""Sets a TrackMate spot filter with specified filter key and values.
239+
"""Set a TrackMate spot filter with specified filter key and values.
240240
241241
Parameters
242242
----------
243243
settings : fiji.plugin.trackmate.Settings
244-
Dictionary containing all the settings to use for TrackMate.
245-
filter_name : str
246-
The name of the filter to be applied. You must use the keys of the features, not their name.
247-
Here is the table of the feature keys and names for the spot features:
248-
https://imagej.net/plugins/trackmate/scripting/trackmate-detectors-trackers-keys
244+
Settings object to use for TrackMate.
245+
filter_key : str
246+
The key-name of the filter to be applied (as opposed to the filter
247+
"name" shown in ImageJ. Refer to the spot features table on the related
248+
ImageJ wiki page:
249+
https://imagej.net/plugins/trackmate/scripting/trackmate-detectors-trackers-keys#the-feature-penalty-map
249250
filter_value : list
250-
A list containing two values for the filter. The first value is
251-
applied as an above-threshold filter, and the second as a below-threshold filter.
252-
251+
A list containing two values for the filter. The first value is applied
252+
as an above-threshold filter, and the second as a below-threshold
253+
filter.
254+
253255
Returns
254256
-------
255257
Settings
256258
The modified TrackMate settings dict with added spot filters
257259
258260
Example
259261
-------
260-
>>> # Set an above-threshold filter value for spot "QUALITY" without a below-threshold value
261-
>>> tm_settings = set_trackmate_spotfilter(tm_settings, 'QUALITY', [120, None])
262+
263+
To set an above-threshold filter value for spot `QUALITY` without a
264+
below-threshold value use:
265+
266+
>>> settings = set_trackmate_spotfilter(tm_settings, 'QUALITY', [120, None])
262267
"""
263-
264268
settings.addAllAnalyzers()
265269
if filter_value[0] != None:
266270
filter_low = FeatureFilter(filter_key, filter_value[0], True)
@@ -272,7 +276,6 @@ def set_spotfilter(settings, filter_key, filter_value):
272276
return settings
273277

274278

275-
276279
def sparse_lap_tracker(settings):
277280
"""Create a sparse LAP tracker with default settings.
278281

0 commit comments

Comments
 (0)