FindDensityMaxima_FixedSpread
Finds local density maxima in a set of values by looking for the highest number of samples withing a range determined by the given spread.
Applications:Can be used to determine histogram's local maxima without actually creating the histogram.
Syntax
C++
C#
Python
def FindDensityMaxima_FixedSpread( inValues: list[float], /, *, inSpread: float = 2.0, inMinCount: int = 1, inAllowOverlapping: bool = False, inCycle: float | None = None, inModeFunction: DataModeFunction = DataModeFunction.Mean, inLocalBlindness: LocalBlindness | None = None ) -> ( outModes: list[float], outCounts: list[int] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inValues | list[float] | Data points array | ||
![]() |
inSpread | float | 0.0 - ![]() |
2.0 | Maximum spread of a single window |
![]() |
inMinCount | int | 1 - ![]() |
1 | Windows with a smaller count will not be considered |
![]() |
inAllowOverlapping | bool | False | If true all local maxima will be returned otherwise for each group of ranges that overlap only the one with the smallest real spread will be returned | |
![]() |
inCycle | float | None | None | Length of the cycle if data is to be considered cyclically | |
![]() |
inModeFunction | DataModeFunction | DataModeFunction.Mean | Method of calculating the center of a data mode | |
![]() |
inLocalBlindness | LocalBlindness | None | None | Helps to sieve out unnecessary points | |
![]() |
outModes | list[float] | Computed data modes | ||
![]() |
outCounts | list[int] | Sizes of windows that had a mode |



