Skip to content

Commit

Permalink
Fix docstring formatting for stretch_linear
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese authored Feb 14, 2024
1 parent a1ba558 commit 97231c0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions trollimage/xrimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,13 +1009,14 @@ def stretch_linear(self, cutoffs=(0.005, 0.005)):
Use *cutoffs* for left and right trimming.
If the cutoffs are just a tuple or list of two scalar, all the channels except the alpha channel
will be stretched with the cutoffs.
If the cutoffs are a sequence of tuples/lists of two scalar:
- if there is the same number of tuples/lists as channels, each channel will be stretched with the respective
cutoff.
- if there is one less tuples/lists as channels, the same applies, except for the alpha channel which will
not be stretched.
If the cutoffs are just a tuple or list of two scalars, all the
channels except the alpha channel will be stretched with the cutoffs.
If the cutoffs are a sequence of tuples/lists of two scalars then:
- if there are the same number of tuples/lists as channels, each channel will be stretched with the respective
cutoff.
- if there is one less tuple/list as channels, the same applies, except for the alpha channel which will
not be stretched.
"""
logger.debug("Perform a linear contrast stretch.")
Expand Down

0 comments on commit 97231c0

Please sign in to comment.