porespy.tools.parse_steps#
- porespy.tools.parse_steps(steps, vals, mask=None, descending=True)#
Converts given steps into a list of sizes
- Parameters:
steps (int, tuple, list or ndarray, or None) – If an int then steps is treated as the number of steps between 1 and the maximum in vals. If a tuple is received then this is used as the first and last values of an integer range. If a list or ndarray is received they are used directly. If None then all unique values in vals are used.
vals (ndarray) – An array containing the values to be scanned, such as a distance or capillary transform.
mask (ndarray) – A boolean mask of which values in vals to use when finding limits. If not provided then all values vals are used, but if provided, then vals is converted as vals = vals[mask] beforehand.
descending (bool, optional) – If True (default), then the returned list of sizes is in descending order
- Returns:
bins – Array of values spanning the desired start and stop limits
- Return type:
ndarray