Skip to content

Commit 18b5bc8

Browse files
committed
Improve documentation layout and some minor code polishing
1 parent 7595a2e commit 18b5bc8

File tree

8 files changed

+23
-71
lines changed

8 files changed

+23
-71
lines changed

docs/api_reference.md

Lines changed: 16 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4,85 +4,39 @@ This is the API reference for the echoSMs package.
44

55
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.
66

7-
## ScatterModelBase
7+
## ::: echosms.ScatterModelBase
88

9-
::: echosms.ScatterModelBase
10-
11-
## DCMModel
12-
13-
::: echosms.DCMModel
9+
## ::: echosms.DCMModel
1410

1511
## DWBA models
1612

17-
There are several models that use the distorted-wave Born approximation, documented below:
18-
19-
### DWBA
13+
There are several models that use the distorted-wave Born approximation, documented below. There are also some functions to
14+
make cylinder and spheroid shapes for use in the DWBA models.
2015

2116
::: echosms.DWBAModel
22-
options:
23-
heading_level: 4
24-
25-
### PT-DWBA
26-
2717
::: echosms.PTDWBAModel
28-
options:
29-
heading_level: 4
30-
31-
### SDWBA
32-
3318
::: echosms.SDWBAModel
34-
options:
35-
heading_level: 4
36-
37-
### Utilities
19+
::: echosms.dwbautils
3820

39-
::: echosms.utilsdwba
40-
options:
41-
heading_level: 4
21+
## ::: echosms.ESModel
4222

43-
## ESModel
23+
## ::: echosms.HPModel
4424

45-
::: echosms.ESModel
25+
## ::: echosms.KAModel
4626

47-
## HPModel
48-
49-
::: echosms.HPModel
50-
51-
## KAModel
52-
53-
::: echosms.KAModel
54-
55-
## KRMModel
27+
## KRM model & utilities
5628

5729
::: echosms.KRMModel
30+
::: echosms.KRMdata
31+
::: echosms.KRMorganism
32+
::: echosms.KRMshape
5833

59-
## MSSModel
60-
61-
::: echosms.MSSModel
62-
63-
## PSMSModel
64-
65-
::: echosms.PSMSModel
66-
67-
## ReferenceModels
68-
69-
::: echosms.ReferenceModels
70-
71-
## BenchmarkData
34+
## ::: echosms.MSSModel
7235

73-
::: echosms.BenchmarkData
36+
## ::: echosms.PSMSModel
7437

7538
## Utilities
7639

40+
::: echosms.BenchmarkData
41+
::: echosms.ReferenceModels
7742
::: echosms.utils
78-
79-
## KRMData
80-
::: echosms.KRMdata
81-
82-
## KRMfish
83-
84-
::: echosms.KRMfish
85-
86-
## KRMshape
87-
88-
::: echosms.KRMshape

docs/benchmark_data.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ The benchmark data for the acoustic scattering models in [Jech et al. (2015)](ht
55
- Model runs over a range of frequencies
66
- Model runs over a range of incident angles at a frequency of 38 kHz
77

8-
These are provided as text files (see below), or as Pandas DataFrames via the
9-
[BenchmarkData][benchmarkdata] class.
8+
These are provided as text files (see below), or as Pandas DataFrames via the [benchmarkdata] class.
109

1110
## TS(f)
1211

docs/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ The `multiprocess = True` parameter in the call to `calculate_ts` will cause ech
170170

171171
## Reference model definitions
172172

173-
[Jech et al., (2015)](https://doi.org/10.1121/1.4937607) presented _reference_ models for a range of scattering objects: spheres, spherical shells, prolate spheroids, and finite cylinders for several boundary conditions (fixed rigid, pressure release, fluid-filled) and parameters (backscatter as a function of frequency and incident angle). These model definitions are included in echoSMs via the [`ReferenceModels`](api_reference.md#referencemodels) class, along with other objects, such as calibration spheres. For example, the names of all the model definitions are available with:
173+
[Jech et al., (2015)](https://doi.org/10.1121/1.4937607) presented _reference_ models for a range of scattering objects: spheres, spherical shells, prolate spheroids, and finite cylinders for several boundary conditions (fixed rigid, pressure release, fluid-filled) and parameters (backscatter as a function of frequency and incident angle). These model definitions are included in echoSMs via the [`ReferenceModels`](api_reference.md#echosms.ReferenceModels) class, along with other objects, such as calibration spheres. For example, the names of all the model definitions are available with:
174174

175175
```py
176176
from echosms import ReferenceModels
@@ -272,7 +272,7 @@ Note that the `parameters()` call does not return all of the parameters needed b
272272

273273
## Benchmark model TS
274274

275-
[Jech et al., (2015)](https://doi.org/10.1121/1.4937607) presented _benchmark_ model runs for the reference models. The TS results from these benchmarks are available in echoSMs via the [`BenchMarkData`](api_reference.md#benchmarkdata) class. This class is a simple wrapper around code that reads the CSV-formatted file of benchmark values into a Pandas DataFrame, whereupon they can be accessed like this:
275+
[Jech et al., (2015)](https://doi.org/10.1121/1.4937607) presented _benchmark_ model runs for the reference models. The TS results from these benchmarks are available in echoSMs via the [`BenchMarkData`](api_reference.md#echosms.BenchmarkData) class. This class is a simple wrapper around code that reads the CSV-formatted file of benchmark values into a Pandas DataFrame, whereupon they can be accessed like this:
276276

277277
```py
278278
from echosms import BenchmarkData

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ plugins:
6161
merge_init_into_class: true
6262
show_bases: true
6363
inherited_members: true
64-
show_root_heading: false
64+
show_root_heading: true
6565
show_root_toc_entry: false
6666
show_source: true
6767
heading_level: 3

src/echosms/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
from .kamodel import KAModel
1717
from .krmmodel import KRMModel
1818
from .hpmodel import HPModel
19-
from .krmdata import KRMdata, KRMfish, KRMshape
19+
from .krmdata import KRMdata, KRMorganism, KRMshape
2020

2121
__all__ = ['ScatterModelBase', 'BenchmarkData', 'ReferenceModels',
2222
'MSSModel', 'PSMSModel', 'DCMModel', 'ESModel', 'PTDWBAModel',
2323
'DWBAModel', 'SDWBAModel', 'KAModel', 'KRMModel', 'HPModel',
2424
'wavenumber', 'wavelength', 'Neumann', 'h1', 'spherical_jnpp', 'prolate_swf',
25-
'theoretical_Sa', 'KRMdata', 'KRMfish', 'KRMshape',
25+
'theoretical_Sa', 'KRMdata', 'KRMorganism', 'KRMshape',
2626
'pro_rad1', 'pro_rad2', 'pro_ang1',
2727
'as_dataframe', 'as_dataarray', 'as_dict', 'split_dict',
2828
'create_dwba_spheroid', 'create_dwba_cylinder']

src/echosms/benchmarkdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class BenchmarkData:
2020
Notes
2121
-----
2222
The column names in the source benchmark files have been changed to be the same as those used
23-
in the [ReferenceModels][referencemodels] model definitions.
23+
in the [referencemodels] model definitions.
2424
2525
References
2626
----------
File renamed without changes.

src/example_code.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import matplotlib.pyplot as plt
55
import numpy as np
6-
import pandas as pd
76
import trimesh
87

98
from echosms import MSSModel, PSMSModel, DCMModel, ESModel, PTDWBAModel, KAModel, DWBAModel

0 commit comments

Comments
 (0)