From 3c599a295cb171a051dafae36d7ba907393a27eb Mon Sep 17 00:00:00 2001 From: Clea Parcerisas Date: Wed, 4 Sep 2024 17:59:31 +0200 Subject: [PATCH] added the option to pass a calibration file to the class SoundTrapHF and also kwargs --- pyhydrophone/soundtrap.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyhydrophone/soundtrap.py b/pyhydrophone/soundtrap.py index 53af327..5b14d05 100644 --- a/pyhydrophone/soundtrap.py +++ b/pyhydrophone/soundtrap.py @@ -177,7 +177,8 @@ def test_calibration(self, signal): class SoundTrapHF(SoundTrap): - def __init__(self, name, model, serial_number, sensitivity=None, gain_type='High', string_format="%y%m%d%H%M%S"): + def __init__(self, name, model, serial_number, sensitivity=None, gain_type='High', string_format="%y%m%d%H%M%S", + calibration_file=None, **kwargs): """ Init a SoundTrap HF reader @@ -195,8 +196,11 @@ def __init__(self, name, model, serial_number, sensitivity=None, gain_type='High 'High' or 'Low', depending on the settings of the recorder string_format : string Format of the datetime string present in the filename + calibration_file : string or Path + File where the frequency dependent sensitivity values for the calibration are """ - super().__init__(name, model, serial_number, sensitivity, gain_type, string_format) + super().__init__(name, model, serial_number, sensitivity, gain_type, string_format, + calibration_file=calibration_file, **kwargs) def read_HFfolder(self, main_folder_path, zip_mode=False, include_dirs=False): """