radar.components.response
Module Contents
Classes
API
- class radar.components.response.FrequencyResponse(freq: radar.utils.typing.Frequency | None = None, df: polars.DataFrame | None = None)[source]
Initialization
- response(freq: radar.utils.typing.Frequency, unit: radar.utils.typing.AmplitudeUnit = AmplitudeUnit.DECIBEL) float[source]
Retrieves or interpolates the amplitude gain for a given frequency.
This method queries the underlying DataFrame for the exact frequency requested. If the exact frequency does not exist but falls within the range of the dataset, it performs a linear interpolation between the two closest neighboring frequencies.
- freqfloat
The frequency to query, typically specified in Hertz (Hz).
- unitAmplitudeUnit, default AmplitudeUnit.DECIBEL
The unit format for the returned gain value. Supports DECIBEL (dB) or LINEAR ratio.
- float
The calculated or interpolated gain value in the requested unit.
- ValueError
If the requested frequency is out of the dataset bounds.