Instrument#

class osekit.core_api.instrument.Instrument(sensitivity: float = 1.0, peak_voltage: float = 1.0, gain_db: float = 0.0, end_to_end_db: float | None = None)#

Represent the audio acquisition chain.

It embeds the technical properties of the hydrophone, the gain applied to the measured signal etc.

Initialize an Instrument object.

Parameters#

sensitivity: float

Sensitivity (in Volt per Pascal) of the sensor. Defaulted to 1.

peak_voltage: float

Voltage that leads to a 0 dB FS signal. Defaulted to 1 V.

gain_db: float

Total gain (in dB) of the chain of amplifiers. Defaulted to 0 dB.

end_to_end_db: float | None

End-to-end calibration value, as given by e.g. SoundTrap datasheets. If provided, it will overwrite the former parameters.

property end_to_end: float#

Total ratio between digital signal value and aoustic pressure.

property end_to_end_db: float#

Total ratio between digital signal value and acoustic pressure level (re 1uPa).

classmethod from_dict(data: dict | None) Instrument | None#

Deserialize an Instrument from a dictionary.

property gain: float#

Total voltage ratio of the chain of amplifiers.

property gain_db: float#

Total gain (in dB) of the chain of amplifiers.

n_to_p(digit_value: float) float#

Convert raw digital data to acoustic pressure (in Pa).

Parameters#

digit_value: float

Raw digital value.

Returns#

float:

Acoustic pressure (in Pa).

property peak_voltage: float#

Voltage that leads to a 0 dB FS signal.

property sensitivity: float#

Sensitivity of the sensor, in V/Pa.

to_dict() dict#

Return a dictionary that is used for serialization.