find_f0#

PySeismoSoil.helper_site_response.find_f0(x: ndarray) float[source]#

Find f_0 in a frequency spectrum (i.e., the frequency corresponding to the initial peak).

Parameters:

x (np.ndarray) – A two-column numpy array. The 0th column is the “reference array”, such as the frequency array, and the 1st column is the “value array” in which the peak is being searched.

Returns:

f0 – The value in the 0th column of x corresponding to the initial peak value in the 1st column of x.

Return type:

float