Wrench.by_samples

classmethod Wrench.by_samples(wrenches, proportion_to_cut=0.1)

Construct the wrench by sampled data, allowing to filter.

Parameters
  • wrenches (list of Wrench) – List of wrenches.

  • proportion_to_cut (float) – Fraction to cut off of both tails of the distribution

Returns

Wrench – The mean wrench after trimming distribution from both tails.

Examples

>>> w1 = Wrench([1, 1, 1], [.1,.1,.1])
>>> w2 = Wrench([2, 2, 2], [.2,.2,.2])
>>> w3 = Wrench([3, 3, 3], [.3,.3,.3])
>>> w = Wrench.by_samples([w1, w2, w3])
>>> print(w)
Wrench(Vector(2.000, 2.000, 2.000), Vector(0.200, 0.200, 0.200))