-
Notifications
You must be signed in to change notification settings - Fork 5
/
parameters.py
52 lines (44 loc) · 2.41 KB
/
parameters.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import logging
from hyo2.openbst.lib.processing.process_methods.dicts import ProcessMethods
from hyo2.openbst.lib.processing.process_methods.area_correction import AreaCorrectionParameters
from hyo2.openbst.lib.processing.process_methods.calibration import CalibrationParameters
from hyo2.openbst.lib.processing.process_methods.interpolation import InterpParameters
from hyo2.openbst.lib.processing.process_methods.raw_decoding import RawDecodeParameters
from hyo2.openbst.lib.processing.process_methods.raytracing import RayTraceParams
from hyo2.openbst.lib.processing.process_methods.source_level import SourceLevelParameters
from hyo2.openbst.lib.processing.process_methods.static_gain_compensation import StaticGainParameters
from hyo2.openbst.lib.processing.process_methods.transmission_loss import TransmissonLossParameters
from hyo2.openbst.lib.processing.process_methods.tvg import TVGCorrectionParameters
logger = logging.getLogger(__name__)
class Parameters:
"""Class to store processing parameters"""
def __init__(self):
self.area_correction = AreaCorrectionParameters()
self.calibration = CalibrationParameters()
self.rawdecode = RawDecodeParameters()
self.static_gains = StaticGainParameters()
self.source_level = SourceLevelParameters()
self.tvg = TVGCorrectionParameters()
self.interpolation = InterpParameters()
self.raytrace = RayTraceParams()
self.transmissionloss = TransmissonLossParameters()
# TODO: Can there be a check here to create object if not yet created
def get_process_params(self, process_type: ProcessMethods):
if process_type == ProcessMethods.RAWDECODE:
return self.rawdecode
elif process_type == ProcessMethods.INSONIFIEDAREA:
return self.area_correction
elif process_type == ProcessMethods.CALIBRATION:
return self.calibration
elif process_type == ProcessMethods.INTERPOLATION:
return self.interpolation
elif process_type == ProcessMethods.STATICGAIN:
return self.static_gains
elif process_type == ProcessMethods.SOURCELEVEL:
return self.source_level
elif process_type == ProcessMethods.TVG:
return self.tvg
elif process_type == ProcessMethods.RAYTRACE:
return self.raytrace
elif process_type == ProcessMethods.TRANSMISSIONLOSS:
return self.transmissionloss