HvsrCurve
- class HvsrCurve(frequency, amplitude, meta=None)
Class for creating and manipulating
HvsrCurveobjects.- Variables:
frequency (ndarray) – Vector of frequencies, must be same length as
amplitude.amplitude (ndarray) – Vector of HVSR amplitude values, one value per
frequency.peak_frequency (float) – Frequency of highest amplitude peak of HVSR curve.
peak_amplitude (float) – Amplitude of highest amplitude peak of HVSR curve.
- __init__(frequency, amplitude, meta=None)
Create
HvsrCurvefrom iterables of frequency and amplitude.- Parameters:
frequency (ndarray) – Vector of frequencies, one per
amplitude.amplitude (ndarray) – Vector of HVSR amplitudes, one per
frequency.meta (dict, optional) – Meta information about the object, default is None.
- Returns:
HvsrCurve – Initialized with
amplitudeandfrequency.
- static _find_peak_bounded(frequency, amplitude, search_range_in_hz=(None, None), find_peaks_kwargs=None)
Finds frequency and amplitude associated with highest peak over a bounded range.
Warning
Private methods are subject to change without warning.
- static _search_range_to_index_range(frequency, search_range_in_hz)
Convert search range values in Hz to index range values.
Warning
Private methods are subject to change without warning.
- is_similar(other, atol=1e-09, rtol=0.0)
Check if
otheris similar toself.
- update_peaks_bounded(search_range_in_hz=(None, None), find_peaks_kwargs=None)
Update peak associated with HVSR curve, can be over bounded range.
- Parameters:
search_range_in_hz (tuple, optional) – Frequency range to be searched for peaks. Half open ranges can be specified with
None, default is(None, None)indicating the full frequency range will be searched.find_peaks_kwargs (dict) – Keyword arguments for the
scipyfunction find_peaks seescipydocumentation for details.
- Returns:
None – Updates internal peak-related attributes.