Skip to content

Commit

Permalink
MRG: #225 from vocalpy/add-data-file-to-howto-user-annot
Browse files Browse the repository at this point in the history
DOC: Add data file download to howto-user-format.md
  • Loading branch information
NickleDave committed Feb 28, 2023
2 parents 791a679 + ec125c9 commit 38c7a68
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions doc/howto/howto-user-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,21 @@ through the steps we outlined above.
### 1. get your annotation into some variables in Python

Let’s look at this complicated data structure that we have our
annotation in. The `BatLAB` GUI saves annotation into `annotation.mat`
files with two variables:
annotation in. For this tutorial you'll need the
file `bat1_annotation.mat` that you should be able to download
from [this link](./bat1_annotation.mat)
or by going to
<https://github.com/vocalpy/crowsetta/blob/main/doc/howto/bat1_annotation.mat>.

The `BatLAB` GUI saves annotation into these `annotation.mat`
files, with two variables in each mat file:
- `filenames`: a vector where each element is the name of an audio file
- `annotations`: a `struct` that has a record for each element in `filenames`,
and that record is the annotation corresponding
to the audio file with the same index in `filenames`

The following snippet will let you load and inspect the data:

```{code-cell} ipython3
from scipy.io import loadmat
bat1_annotation = loadmat('bat1_annotation.mat')
Expand Down

0 comments on commit 38c7a68

Please sign in to comment.