solarspatialtools.cmv.optimum_subset

solarspatialtools.cmv.optimum_subset(cmvx, cmvy, n=10)

Chooses a subset of vectors from within a full set of vectors, based on optimizing the most diverse angles available. Operates in 2 quadrants only, subject to the assumption that anti-parallels are also undesirable.

This is useful for getting vectors that represent a variety of directions. For example, given all the CMVs for a whole year, this will provide a list of the time periods with the most varied cloud motion directions. One use case is in field analysis where the most diverse set of CMVs is needed to get the highest probability of perpendicular vector pairs.

Parameters

cmvxpd.Series

A list of x-components of the CMVs

cmvypd.Series

A list of y-components of the CMVs

nint

The number of vectors to select

Returns

indiceslist

The indices of the CMVs that are most diverse. Indices are positional within the input arrays. For example, could be used to reduce a DataFrame to the most diverse CMVs by using df.iloc[indices]