From 954f33e50ec16ee65b0f7b92ad9a381ffd4f4ce0 Mon Sep 17 00:00:00 2001 From: <> Date: Tue, 20 Aug 2024 23:29:35 +0000 Subject: [PATCH] Deployed bb5f2ab with MkDocs version: 1.6.0 --- .nojekyll | 0 404.html | 384 + api_reference/index.html | 5665 ++++++++++++++ assets/_mkdocstrings.css | 119 + assets/images/favicon.png | Bin 0 -> 1870 bytes assets/javascripts/bundle.471ce7a9.min.js | 29 + assets/javascripts/bundle.471ce7a9.min.js.map | 7 + assets/javascripts/lunr/min/lunr.ar.min.js | 1 + assets/javascripts/lunr/min/lunr.da.min.js | 18 + assets/javascripts/lunr/min/lunr.de.min.js | 18 + assets/javascripts/lunr/min/lunr.du.min.js | 18 + assets/javascripts/lunr/min/lunr.el.min.js | 1 + assets/javascripts/lunr/min/lunr.es.min.js | 18 + assets/javascripts/lunr/min/lunr.fi.min.js | 18 + assets/javascripts/lunr/min/lunr.fr.min.js | 18 + assets/javascripts/lunr/min/lunr.he.min.js | 1 + assets/javascripts/lunr/min/lunr.hi.min.js | 1 + assets/javascripts/lunr/min/lunr.hu.min.js | 18 + assets/javascripts/lunr/min/lunr.hy.min.js | 1 + assets/javascripts/lunr/min/lunr.it.min.js | 18 + assets/javascripts/lunr/min/lunr.ja.min.js | 1 + assets/javascripts/lunr/min/lunr.jp.min.js | 1 + assets/javascripts/lunr/min/lunr.kn.min.js | 1 + assets/javascripts/lunr/min/lunr.ko.min.js | 1 + assets/javascripts/lunr/min/lunr.multi.min.js | 1 + assets/javascripts/lunr/min/lunr.nl.min.js | 18 + assets/javascripts/lunr/min/lunr.no.min.js | 18 + assets/javascripts/lunr/min/lunr.pt.min.js | 18 + assets/javascripts/lunr/min/lunr.ro.min.js | 18 + assets/javascripts/lunr/min/lunr.ru.min.js | 18 + assets/javascripts/lunr/min/lunr.sa.min.js | 1 + .../lunr/min/lunr.stemmer.support.min.js | 1 + assets/javascripts/lunr/min/lunr.sv.min.js | 18 + assets/javascripts/lunr/min/lunr.ta.min.js | 1 + assets/javascripts/lunr/min/lunr.te.min.js | 1 + assets/javascripts/lunr/min/lunr.th.min.js | 1 + assets/javascripts/lunr/min/lunr.tr.min.js | 18 + assets/javascripts/lunr/min/lunr.vi.min.js | 1 + assets/javascripts/lunr/min/lunr.zh.min.js | 1 + assets/javascripts/lunr/tinyseg.js | 206 + assets/javascripts/lunr/wordcut.js | 6708 +++++++++++++++++ .../workers/search.b8dbb3d2.min.js | 42 + .../workers/search.b8dbb3d2.min.js.map | 7 + assets/stylesheets/main.3cba04c6.min.css | 1 + assets/stylesheets/main.3cba04c6.min.css.map | 1 + assets/stylesheets/palette.06af60db.min.css | 1 + .../stylesheets/palette.06af60db.min.css.map | 1 + benchmark_data/index.html | 604 ++ contributing/index.html | 551 ++ index.html | 819 ++ objects.inv | Bin 0 -> 470 bytes other_software/index.html | 443 ++ resources/coordinate_system.svg | 23 + resources/echoSMs_logo.png | Bin 0 -> 2993 bytes resources/herring.stl | Bin 0 -> 5511984 bytes search/search_index.json | 1 + sitemap.xml | 3 + sitemap.xml.gz | Bin 0 -> 127 bytes src/make_coordinate_system_figure.py | 167 + usage/index.html | 491 ++ 60 files changed, 16560 insertions(+) create mode 100644 .nojekyll create mode 100644 404.html create mode 100644 api_reference/index.html create mode 100644 assets/_mkdocstrings.css create mode 100644 assets/images/favicon.png create mode 100644 assets/javascripts/bundle.471ce7a9.min.js create mode 100644 assets/javascripts/bundle.471ce7a9.min.js.map create mode 100644 assets/javascripts/lunr/min/lunr.ar.min.js create mode 100644 assets/javascripts/lunr/min/lunr.da.min.js create mode 100644 assets/javascripts/lunr/min/lunr.de.min.js create mode 100644 assets/javascripts/lunr/min/lunr.du.min.js create mode 100644 assets/javascripts/lunr/min/lunr.el.min.js create mode 100644 assets/javascripts/lunr/min/lunr.es.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.fr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.he.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hu.min.js create mode 100644 assets/javascripts/lunr/min/lunr.hy.min.js create mode 100644 assets/javascripts/lunr/min/lunr.it.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ja.min.js create mode 100644 assets/javascripts/lunr/min/lunr.jp.min.js create mode 100644 assets/javascripts/lunr/min/lunr.kn.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ko.min.js create mode 100644 assets/javascripts/lunr/min/lunr.multi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.nl.min.js create mode 100644 assets/javascripts/lunr/min/lunr.no.min.js create mode 100644 assets/javascripts/lunr/min/lunr.pt.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ro.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ru.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sa.min.js create mode 100644 assets/javascripts/lunr/min/lunr.stemmer.support.min.js create mode 100644 assets/javascripts/lunr/min/lunr.sv.min.js create mode 100644 assets/javascripts/lunr/min/lunr.ta.min.js create mode 100644 assets/javascripts/lunr/min/lunr.te.min.js create mode 100644 assets/javascripts/lunr/min/lunr.th.min.js create mode 100644 assets/javascripts/lunr/min/lunr.tr.min.js create mode 100644 assets/javascripts/lunr/min/lunr.vi.min.js create mode 100644 assets/javascripts/lunr/min/lunr.zh.min.js create mode 100644 assets/javascripts/lunr/tinyseg.js create mode 100644 assets/javascripts/lunr/wordcut.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js create mode 100644 assets/javascripts/workers/search.b8dbb3d2.min.js.map create mode 100644 assets/stylesheets/main.3cba04c6.min.css create mode 100644 assets/stylesheets/main.3cba04c6.min.css.map create mode 100644 assets/stylesheets/palette.06af60db.min.css create mode 100644 assets/stylesheets/palette.06af60db.min.css.map create mode 100644 benchmark_data/index.html create mode 100644 contributing/index.html create mode 100644 index.html create mode 100644 objects.inv create mode 100644 other_software/index.html create mode 100644 resources/coordinate_system.svg create mode 100644 resources/echoSMs_logo.png create mode 100644 resources/herring.stl create mode 100644 search/search_index.json create mode 100644 sitemap.xml create mode 100644 sitemap.xml.gz create mode 100644 src/make_coordinate_system_figure.py create mode 100644 usage/index.html diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..5d7b5d5 --- /dev/null +++ b/404.html @@ -0,0 +1,384 @@ + + + +
+ + + + + + + + + + + + + + +This is the API reference for the echoSMs package.
+Each type of model is contained in a separate Python class (with name ending in Model
), but with common calling signatures across all model classes, as defined in ScatterModelBase
. There are also classes to provide ready access to the benchmark models and reference model definitions. There are also utility functions.
+ Bases: ABC
Base class for a class that provides a scattering model.
+All scattering models should inherit from this class, have a name that +ends with 'Model', and provide initialisation and calculate_ts_single() functions.
+ + +Attributes:
+Name | +Type | +Description | +
---|---|---|
long_name |
+
+ str
+ |
+
+
+
+ The long name of the model. + |
+
short_name |
+
+ str
+ |
+
+
+
+ A short version of the model's long name, typically an ancronym. + |
+
analytical_type |
+
+ str
+ |
+
+
+
+ Whether the model implements an |
+
model_types |
+
+ list of str
+ |
+
+
+
+ The types of boundary conditions that the model provides. + |
+
shapes |
+
+ list of str
+ |
+
+
+
+ The shapes that the model can represent. + |
+
max_ka |
+
+ float
+ |
+
+
+
+ An approximate maximum ka value that will result in accurate target strength results. Note +that ka is often not the only parameter that determines the accuracy of the model (e.g., +aspect ratio and incident angle can also affect the accuracy). + |
+
src/echosms/scattermodelbase.py
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 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 |
|
calculate_ts(data, model_type, multiprocess=False)
+
+Calculate the TS for many parameter sets.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
data |
+
+ Pandas DataFrame or Xarray DataArray or dictionary
+ |
+
+
+
+ If a DataFrame, must contain column names as per the function parameters in the +calculate_ts_single() function in this class. Each row in the DataFrame will generate +one TS output. If a DataArray, must contain coordinate names as per the function +parameters in calculate_ts_single(). The TS will be calculated for all combinations of +the coordinate variables. If dictionary, it will be converted to a DataFrame first. + |
+ + required + | +
model_type |
+
+ string
+ |
+
+
+
+ The type of model boundary to apply. Valid values are given in the model_types class +variable. + |
+ + required + | +
multiprocess |
+
+ boolean
+ |
+
+
+
+ Split the ts calculation across CPU cores. + |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Numpy array
+ |
+
+
+
+ Returns the target strength calculated for all input parameters. + |
+
src/echosms/scattermodelbase.py
45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 |
|
calculate_ts_single()
+
+
+ abstractmethod
+
+
+Calculate the TS for one parameter set.
+ +src/echosms/scattermodelbase.py
97 + 98 + 99 +100 |
|
+ Bases: ScatterModelBase
Modal series solution (MSS) scattering model.
+This class calculates acoustic scatter from spheres and shells with various
+boundary conditions, as listed in the model_types
class attribute.
src/echosms/mssmodel.py
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 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 |
|
calculate_ts(data, model_type, multiprocess=False)
+
+Calculate the TS for many parameter sets.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
data |
+
+ Pandas DataFrame or Xarray DataArray or dictionary
+ |
+
+
+
+ If a DataFrame, must contain column names as per the function parameters in the +calculate_ts_single() function in this class. Each row in the DataFrame will generate +one TS output. If a DataArray, must contain coordinate names as per the function +parameters in calculate_ts_single(). The TS will be calculated for all combinations of +the coordinate variables. If dictionary, it will be converted to a DataFrame first. + |
+ + required + | +
model_type |
+
+ string
+ |
+
+
+
+ The type of model boundary to apply. Valid values are given in the model_types class +variable. + |
+ + required + | +
multiprocess |
+
+ boolean
+ |
+
+
+
+ Split the ts calculation across CPU cores. + |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Numpy array
+ |
+
+
+
+ Returns the target strength calculated for all input parameters. + |
+
src/echosms/scattermodelbase.py
45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 |
|
calculate_ts_single(medium_c, medium_rho, a, theta, f, model_type, target_c=None, target_rho=None, shell_c=None, shell_rho=None, shell_thickness=None, **kwargs)
+
+Calculate the scatter using the mss model for one set of parameters.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
medium_c |
+
+ float
+ |
+
+
+
+ Sound speed in the fluid medium surrounding the target [m/s]. + |
+ + required + | +
medium_rho |
+
+ float
+ |
+
+
+
+ Density of the fluid medium surrounding the target [kg/m³]. + |
+ + required + | +
a |
+
+ float
+ |
+
+
+
+ Radius of the spherical target [m]. + |
+ + required + | +
theta |
+
+ float
+ |
+
+
+
+ Pitch angle(s) to calculate the scattering at [°]. An angle of 0 is head on, +90 is dorsal, and 180 is tail on. + |
+ + required + | +
f |
+
+ float
+ |
+
+
+
+ Frequencies to calculate the scattering at [Hz]. + |
+ + required + | +
model_type |
+
+ str
+ |
+
+
+
+ The model type. Supported model types are given in the model_types class variable. + |
+ + required + | +
target_c |
+
+ float
+ |
+
+
+
+ Sound speed in the fluid inside the sphere [m/s].
+Only required for |
+
+ None
+ |
+
target_rho |
+
+ float
+ |
+
+
+
+ Density of the fluid inside the sphere [kg/m³].
+Only required for |
+
+ None
+ |
+
shell_c |
+
+ float
+ |
+
+
+
+ Sound speed in the spherical shell [m/s].
+Only required for |
+
+ None
+ |
+
shell_rho |
+
+ float
+ |
+
+
+
+ Density in the spherical shell [kg/m³].
+Only required for |
+
+ None
+ |
+
shell_thickness |
+
+ float
+ |
+
+
+
+ Thickness of the spherical shell [m]. This value is subtracted from |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ float
+ |
+
+
+
+ The target strength (re 1 m²) of the target [dB]. + |
+
The class implements the code in Section A.1 of [1].
+[1] Jech, J.M., Horne, J.K., Chu, D., Demer, D.A., Francis, D.T.I., Gorska, N., +Jones, B., Lavery, A.C., Stanton, T.K., Macaulay, G.J., Reeder, D.B., Sawada, K., 2015. +Comparisons among ten models of acoustic backscattering used in aquatic ecosystem +research. Journal of the Acoustical Society of America 138, 3742–3764. +https://doi.org/10.1121/1.4937607
+src/echosms/mssmodel.py
29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 |
|
+ Bases: ScatterModelBase
Prolate spheroidal modal series (PSMS) scattering model.
+ +src/echosms/psmsmodel.py
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 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 |
|
calculate_ts(data, model_type, multiprocess=False)
+
+Calculate the TS for many parameter sets.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
data |
+
+ Pandas DataFrame or Xarray DataArray or dictionary
+ |
+
+
+
+ If a DataFrame, must contain column names as per the function parameters in the +calculate_ts_single() function in this class. Each row in the DataFrame will generate +one TS output. If a DataArray, must contain coordinate names as per the function +parameters in calculate_ts_single(). The TS will be calculated for all combinations of +the coordinate variables. If dictionary, it will be converted to a DataFrame first. + |
+ + required + | +
model_type |
+
+ string
+ |
+
+
+
+ The type of model boundary to apply. Valid values are given in the model_types class +variable. + |
+ + required + | +
multiprocess |
+
+ boolean
+ |
+
+
+
+ Split the ts calculation across CPU cores. + |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Numpy array
+ |
+
+
+
+ Returns the target strength calculated for all input parameters. + |
+
src/echosms/scattermodelbase.py
45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 |
|
calculate_ts_single(medium_c, medium_rho, a, b, theta, f, model_type, target_c=None, target_rho=None)
+
+Prolate spheroid modal series (PSMS) solution model.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
medium_c |
+
+ float
+ |
+
+
+
+ Sound speed in the fluid medium surrounding the target [m/s]. + |
+ + required + | +
medium_rho |
+
+ float
+ |
+
+
+
+ Density of the fluid medium surrounding the target [kg/m³]. + |
+ + required + | +
a |
+
+ float
+ |
+
+
+
+ Prolate spheroid major axis radius [m]. + |
+ + required + | +
b |
+
+ float
+ |
+
+
+
+ Prolate spheroid minor axis radius [m]. + |
+ + required + | +
theta |
+
+ float
+ |
+
+
+
+ Pitch angle(s) to calculate the scattering at [°]. An angle of 0 is head on, +90 is dorsal, and 180 is tail on. + |
+ + required + | +
f |
+
+ float
+ |
+
+
+
+ Frequencies to calculate the scattering at [Hz]. + |
+ + required + | +
model_type |
+
+ str
+ |
+
+
+
+ The model type. Supported model types are given in the model_types class variable. + |
+ + required + | +
target_c |
+
+ float
+ |
+
+
+
+ Sound speed in the fluid inside the target [m/s].
+Only required for |
+
+ None
+ |
+
target_rho |
+
+ float
+ |
+
+
+
+ Density of the fluid inside the target [kg/m³].
+Only required for |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ float
+ |
+
+
+
+ The target strength (re 1 m²) of the target [dB]. + |
+
The backscattered target strength of a pressure release or fluid-filled prolate spheroid +is calculated using the PSMS method of Furusawa [1] and corrections [2].
+.. [1] Furusawa, M. (1988). "Prolate spheroidal models for predicting general + trends of fish target strength," J. Acoust. Soc. Jpn. 9, 13-24. +.. [2] Furusawa, M., Miyanohana, Y., Ariji, M., and Sawada, Y. (1994). + “Prediction of krill target strength by liquid prolate spheroid + model,” Fish. Sci., 60, 261–265.
+src/echosms/psmsmodel.py
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 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 |
|
+ Bases: ScatterModelBase
Modal series deformed cylinder model (DCM).
+This class contains methods to calculate acoustic scatter from finite straight cylinders with +various boundary conditions.
+ +src/echosms/dcmmodel.py
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 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 |
|
calculate_ts(data, model_type, multiprocess=False)
+
+Calculate the TS for many parameter sets.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
data |
+
+ Pandas DataFrame or Xarray DataArray or dictionary
+ |
+
+
+
+ If a DataFrame, must contain column names as per the function parameters in the +calculate_ts_single() function in this class. Each row in the DataFrame will generate +one TS output. If a DataArray, must contain coordinate names as per the function +parameters in calculate_ts_single(). The TS will be calculated for all combinations of +the coordinate variables. If dictionary, it will be converted to a DataFrame first. + |
+ + required + | +
model_type |
+
+ string
+ |
+
+
+
+ The type of model boundary to apply. Valid values are given in the model_types class +variable. + |
+ + required + | +
multiprocess |
+
+ boolean
+ |
+
+
+
+ Split the ts calculation across CPU cores. + |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ Numpy array
+ |
+
+
+
+ Returns the target strength calculated for all input parameters. + |
+
src/echosms/scattermodelbase.py
45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 |
|
calculate_ts_single(medium_c, medium_rho, a, b, theta, f, model_type, target_c=None, target_rho=None, **kwargs)
+
+Calculate the scatter from a finite cylinder using the modal series deformed cylinder model.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
medium_c |
+
+ float
+ |
+
+
+
+ Sound speed in the fluid medium surrounding the target [m/s]. + |
+ + required + | +
medium_rho |
+
+ float
+ |
+
+
+
+ Density of the fluid medium surrounding the target [kg/m³]. + |
+ + required + | +
a |
+
+ float
+ |
+
+
+
+ Radius of the cylinderical target [m]. + |
+ + required + | +
b |
+
+ float
+ |
+
+
+
+ Length of the cylinderical target [m]. + |
+ + required + | +
theta |
+
+ float
+ |
+
+
+
+ Pitch angle(s) to calculate the scattering at [°]. An angle of 0 is head on, +90 is dorsal, and 180 is tail on. + |
+ + required + | +
f |
+
+ float
+ |
+
+
+
+ Frequencies to calculate the scattering at [Hz]. + |
+ + required + | +
model_type |
+
+ str
+ |
+
+
+
+ The model type. Supported model types are given in the model_types class attribute. + |
+ + required + | +
target_c |
+
+ float
+ |
+
+
+
+ Sound speed in the fluid inside the sphere [m/s].
+Only required for |
+
+ None
+ |
+
target_rho |
+
+ float
+ |
+
+
+
+ Density of the fluid inside the sphere [kg/m³].
+Only required for |
+
+ None
+ |
+
Returns:
+Type | +Description | +
---|---|
+ float
+ |
+
+
+
+ The target strength (re 1 m²) of the target [dB]. + |
+
The class implements the code in Section B.1 of [1].
+[1] Jech, J.M., Horne, J.K., Chu, D., Demer, D.A., Francis, D.T.I., Gorska, N., Jones, B., +Lavery, A.C., Stanton, T.K., Macaulay, G.J., Reeder, D.B., Sawada, K., 2015. +Comparisons among ten models of acoustic backscattering used in aquatic ecosystem +research. Journal of the Acoustical Society of America 138, 3742–3764. +https://doi.org/10.1121/1.4937607
+src/echosms/dcmmodel.py
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 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 |
|
Reference models are the models and parameters defined in the Jech et al, 2015 paper. The parameters are stored in a TOML-formatted file in the echoSMs repository and the ReferenceModels
class provides easy access to the data in that file.
Additional reference models may be defined in the future and can be added to the TOML file.
+ + +Provide access to reference scattering model parameters.
+ +src/echosms/referencemodels.py
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 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 |
|
models()
+
+Provide the full set of model definitions.
+ + +Returns:
+Type | +Description | +
---|---|
+ dict
+ |
+
+
+
+ The contents of the |
+
src/echosms/referencemodels.py
29 +30 +31 +32 +33 +34 +35 +36 +37 |
|
names()
+
+Names of all model definitions.
+ + +Returns:
+Type | +Description | +
---|---|
+ iterable of str
+ |
+
+
+
+ All model names in the |
+
src/echosms/referencemodels.py
39 +40 +41 +42 +43 +44 +45 +46 +47 |
|
parameters(name)
+
+Model parameters for a particular model.
+Model parameters are a subset of the model specification where the non-numerical +items have been removed.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
name |
+
+ str
+ |
+
+
+
+ The name of a model in the |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ dict
+ |
+
+
+
+ The model parameters for the requested model or |
+
src/echosms/referencemodels.py
70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 |
|
specification(name)
+
+Model defintions for a particular model.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
name |
+
+ str
+ |
+
+
+
+ The name of a model in the |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ dict
+ |
+
+
+
+ The model definitions for the requested model or |
+
src/echosms/referencemodels.py
49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 |
|
Convenient interface to the benchmark dataset.
+This dataset contains the TS results from Jech et al., 2015.
+Jech, J.M., Horne, J.K., Chu, D., Demer, D.A., Francis, D.T.I., Gorska, N., Jones, B., +Lavery, A.C., Stanton, T.K., Macaulay, G.J., Reeder, D.B., Sawada, K., 2015. +Comparisons among ten models of acoustic backscattering used in aquatic ecosystem research. +Journal of the Acoustical Society of America 138, 3742–3764. https://doi.org/10.1121/1.4937607
+ + +Attributes:
+Name | +Type | +Description | +
---|---|---|
angle_dataset |
+
+ Pandas DataFrame
+ |
+
+
+
+ The angle dataset from the benchmark model runs. + |
+
freq_dataset |
+
+ Pandas DataFrame
+ |
+
+
+
+ The frequency dataset from the benchmark model runs. + |
+
src/echosms/benchmarkdata.py
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 |
|
Miscellaneous utility functions.
+ + + +
da_from_dict(params)
+
+Convert model parameters from dict form to a Xarray DataArray.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
params |
+
+ dict
+ |
+
+
+
+ A dictionary containing model parameters. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ DataArray
+ |
+
+
+
+ Returns a multi-dimensional DataArray generated from the Cartesian product of all items +in the input dict. + |
+
src/echosms/utils.py
30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 |
|
df_from_dict(params)
+
+Convert model parameters from dict form to a Pandas DataFrame.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
params |
+
+ dict
+ |
+
+
+
+ A dictionary containing model parameters. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ DataFrame
+ |
+
+
+
+ Returns a Pandas DataFrame generated from the Cartesian product of all items in the +input dict. + |
+
src/echosms/utils.py
8 + 9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 |
|
eta(m)
+
+Neumann number.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
m |
+
+ int
+ |
+
+
+
+ The input integer. + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ int
+ |
+
+
+
+ The Neumann number. + |
+
src/echosms/utils.py
55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 |
|
h1(n, z, derivative=False)
+
+Spherical Hankel function of the first kind or its' derivative.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
n |
+
+ int
+ |
+
+
+
+ Order (n ≥ 0). + |
+ + required + | +
z |
+
+ float
+ |
+
+
+
+ Argument of the Hankel function. + |
+ + required + | +
derivative |
+ + | +
+
+
+ if True, the value of the derivative (rather than the function itself) is returned. + |
+
+ False
+ |
+
Returns:
+Type | +Description | +
---|---|
+ complex
+ |
+
+
+
+ Value of the spherical Hankel function + |
+
Raises:
+Type | +Description | +
---|---|
+ ValueError
+ |
+
+
+
+ For negative n values. + |
+
The value of the Hankel function is calculated from spherical Bessel functions [1].
+The derivative is computed from spherical Hankel functions [2].
+src/echosms/utils.py
93 + 94 + 95 + 96 + 97 + 98 + 99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 |
|
k(c, f)
+
+Calculate the acoustic wavenumber.
+ + +Parameters:
+Name | +Type | +Description | +Default | +
---|---|---|---|
c |
+
+ float
+ |
+
+
+
+ Sound speed [m/s] + |
+ + required + | +
f |
+
+ float
+ |
+
+
+
+ Frequency [Hz] + |
+ + required + | +
Returns:
+Type | +Description | +
---|---|
+ float
+ |
+
+
+
+ The acoustic wavenumber [m⁻¹]. + |
+
src/echosms/utils.py
74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 |
|