-
Notifications
You must be signed in to change notification settings - Fork 5
Description
The Clay & Horne (1994) paper, in the line immediately after equation 13, says
and
Setting
To allow for testing and comparison of other KRM implementations, the fish shapes from the online KRM TS calculator (https://www.fisheries.noaa.gov/data-tools/krm-model) have been included in echoSMs in a toml-formatted file (or use the KRMorganism Python class for easy access).
The TS for the sardine shape from there can be calculated and compared to the online results with:
from echosms import KRMModel, KRMdata
import matplotlib.pyplot as plt
import numpy as np
mod = KRMModel()
fish = KRMdata().model('Sardine')
p = {'medium_c': 1490, 'medium_rho': 1030, 'organism': fish, 'theta': 90,
'f': np.arange(12, 121, 1)*1e3}
krm_ts = mod.calculate_ts(p)
noaa_ts = KRMdata.ts('Sardine')
d = np.mean(np.abs(np.array(krm_ts) - np.array(noaa_ts[' TS (dB).1'])))
print(f'Mean difference in results is {d:.2f} dB')
plt.plot(fish.body.x, fish.body.z_U, fish.body.x, fish.body.z_L, c='black')
for s in fish.inclusions:
plt.plot(s.x, s.z_U, s.x, s.z_L, c='C0' if s.boundary == 'fluid' else 'C1')
plt.gca().set_aspect('equal')
plt.show()