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..3bdaf31 --- /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 |
|
get_model_parameters(name)
+
+Get the 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 |
|
get_model_specification(name)
+
+Get the 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 |
|
model_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 |
|
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 |
|
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
+ +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 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 |
|
dataset_angle()
+
+Provide the angle benchmark data.
+ + +Returns:
+Type | +Description | +
---|---|
+ Pandas DataFrame
+ |
+
+
+
+ The TS as a function of incidence angle. + |
+
src/echosms/benchmarkdata.py
28 +29 +30 +31 +32 +33 +34 +35 +36 |
|
dataset_freq()
+
+Provide the frequency benchmark data.
+ + +Returns:
+Type | +Description | +
---|---|
+ Pandas DataFrame
+ |
+
+
+
+ The TS as a function of frequency. + |
+
src/echosms/benchmarkdata.py
38 +39 +40 +41 +42 +43 +44 +45 +46 |
|
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 |
|