Skip to content

Commit 25a095c

Browse files
committed
Update usage doc to match changes in BenchmarkData
1 parent 7c252d9 commit 25a095c

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

docs/usage.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -281,25 +281,18 @@ Note that the `parameters()` call does not return all of the parameters needed b
281281

282282
## Benchmark model TS
283283

284-
[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:
284+
[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 reads the CSV-formatted file of benchmark values. Methods in the `BenchmarkData` class provide a list of the benchmark names, access to individual TS and frequency/angle datasets, and also the frequency and angle datasets as Pandas DataFrames.
285285

286286
```py
287287
from echosms import BenchmarkData
288288
bm = BenchmarkData()
289-
bm.angle_dataset # the TS as a function of angle at 38 kHz
290-
bm.freq_dataset # the TS as a function of frequency
291-
```
292289

293-
The TS and frequency values for a particular benchmark are available with normal Pandas DataFrame indexing syntax. The DataFrame column names are the same as the ReferenceModels names. For example:
290+
bm.freq_names()
291+
bm.angle_names()
294292

295-
```py
296-
bm.freq_dataset['weakly scattering sphere']
297-
bm.freq_dataset['frequency (kHz)']
298-
```
293+
f, ts = bm.freq_data('fixed rigid sphere')
294+
theta, ts = bm.angle_data('fixed rigid prolate spheroid')
299295

300-
or for the angle dataset:
301-
302-
```py
303-
bm.angle_dataset['weakly scattering sphere']
304-
bm.angle_dataset['angle (deg)']
296+
bm.angle_as_dataframe()
297+
bm.freq_as_dataframe()
305298
```

0 commit comments

Comments
 (0)