Skip to content

Commit

Permalink
added the option to pass a calibration file to the class SoundTrapHF …
Browse files Browse the repository at this point in the history
…and also kwargs
  • Loading branch information
cparcerisas committed Sep 4, 2024
1 parent a84ea3f commit 3c599a2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyhydrophone/soundtrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
"""
Expand Down

0 comments on commit 3c599a2

Please sign in to comment.