The utils.functions module

Utility Functions

A collection of functions frequently used in lifetime estimation business.

pylife.utils.functions.rossow_cumfreqs(N)[source]

Cumulative frequency estimator according to Rossow.

Parameters:

N (int) – The sample size of the statistical population

Returns:

cumfreqs – The estimated cumulated frequencies of the N samples

Return type:

numpy.ndarray

Notes

The returned value is the probability that the next taken sample is below the value of the i-th sample of n sorted samples.

Examples

>>> rossow_cumfreqs(1)
array([0.5])

If we have one sample, the probability that the next sample will be below it is 0.5.

>>> rossow_cumfreqs(3)
array([0.2, 0.5, 0.8])

If we have three sorted samples, the probability that the next sample will be * below the first is 0.2 * below the second is 0.5 * below the third is 0.8

References

Statistics of Metal Fatigue in Engineering’ page 16

https://books.google.de/books?isbn=3752857722

pylife.utils.functions.scattering_range_to_std(T)[source]

Convert a scattering range (TS or TN in DIN 50100:2016-12) into standard deviation.

Parameters:

T (float) – inverted scattering range

Returns:

std – standard deviation corresponding to TS or TN assuming a normal distribution

Return type:

float

Notes

Actually 1/(2*norm.ppf(0.9))*np.log10(T)

Inverse of std_to_scattering_range()

pylife.utils.functions.std_to_scattering_range(std)[source]

Convert a standard deviation into scattering range (TS or TN in DIN 50100:2016-12).

Parameters:

std (float) – standard deviation

Returns:

T – inverted scattering range corresponding to std assuming a normal distribution

Return type:

float

Notes

Actually 10**(2*norm.ppf(0.9)*std

Inverse of scattering_range_to_std()