Coverage for python/bellhop/environment.py: 100%

3 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2025-09-23 13:34 +0000

1 

2from bellhop.constants import _Strings 

3 

4def new(): 

5 """Get default environment dictionary for 2D underwater acoustic modeling. 

6 

7 This function provides the shared default values used by both create_env2d() 

8 and read_env2d() to avoid duplication. 

9 

10 :returns: dictionary with default environment parameters 

11 """ 

12 return { 

13 'name': 'bellhop/python default', 

14 'type': '2D', # 2D/3D 

15 'frequency': 25000, # Hz 

16 'ssp_env': None, # 

17 'soundspeed': 1500, # m/s 

18 'soundspeed_interp': _Strings.spline, # spline/linear 

19 'bottom_soundspeed': 1600, # m/s 

20 'bottom_soundspeed_shear': 0, # m/s 

21 'bottom_density': 1600, # kg/m^3 

22 'bottom_absorption': None, # dB/wavelength?? 

23 'bottom_absorption_shear': None, # dB/wavelength?? 

24 'bottom_roughness': 0, # m (rms) 

25 'bottom_beta': None, # 

26 'bottom_transition_freq': None, # Hz 

27 'bottom_boundary_condition': _Strings.acousto_elastic, 

28 'bottom_reflection_coefficient': None, 

29 '_bottom_bathymetry': _Strings.flat, # 

30 'surface': None, # surface profile 

31 'surface_interp': _Strings.linear, # curvilinear/linear 

32 'tx_depth': 5, # m 

33 'tx_ndepth': None, # 

34 'tx_directionality': None, # [(deg, dB)...] 

35 'rx_depth': 10, # m 

36 'rx_ndepth': None, # 

37 'rx_range': 1000, # m 

38 'rx_nrange': None, # 

39 'depth': 25, # m 

40 'depth_interp': _Strings.linear, # curvilinear/linear 

41 'depth_npts': 0, # 

42 'depth_sigmaz': 0, # 

43 'depth_max': None, # m 

44 'min_angle': -80, # deg 

45 'max_angle': 80, # deg 

46 'nbeams': 0, # number of beams (0 = auto) 

47 'top_boundary_condition': _Strings.vacuum, 

48 'volume_attenuation': 'none', 

49 'attenuation_units': 'frequency dependent', 

50 'step_size': None, 

51 'box_depth': None, 

52 'box_range': None, 

53 'tx_type': 'default', 

54 'beam_type': 'default', 

55 'grid': 'default', 

56 # francois_garrison volume attenuation parameters: 

57 'fg_salinity': None, 

58 'fg_temperature': None, 

59 'fg_pH': None, 

60 'fg_depth': None, 

61 }