Skip to content

Commit 0fdea17

Browse files
committed
DOC: Suppress cell output, other clean-ups, in how-to
1 parent c228809 commit 0fdea17

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

doc/howto/remove-silent-labels-textgrid.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,11 @@ Here's the steps we'll follow:
8383

8484
For this vignette, we use annotations from the
8585
[Bengalese finch song dataset](https://osf.io/r6paq/),
86-
by Tachibana and Morita 2021, adapted under
86+
by Tachibana and Morita 2021 [^1], adapted under
8787
[CC BY 4.0 License](https://creativecommons.org/licenses/by/4.0/).
8888

89+
[^1]: Tachibana, R. O., & Morita, T. (2021). Bengalese finch song dataset. https://doi.org/10.17605/OSF.IO/R6PAQ
90+
8991
+++
9092

9193
## 0. Write code for analysis
@@ -97,14 +99,14 @@ and test it with some toy data that you generate.
9799
We also do this first to help understand what format we're going to need to get our data into below.
98100

99101
Our goal here is to fit a first-order Markov model of the transition probabilities in the song of Bengalese finches.
100-
This model has been used in several previous studies[^1][^2],
101-
although it was later shown[^3] that such a model does not completely describe the statistics of the song.
102+
This model has been used in several previous studies[^2][^3],
103+
although it was later shown[^4] that such a model does not completely describe the statistics of the song.
102104
In spite of that, a first-order Markov model is very convenient to fit,
103105
and can give us a useful first-order approximation (literally!) of singing behavior.
104106

105-
[^1]: Woolley SM, Rubel EW (1997) Bengalese finches lonchura striata domestica depend upon auditory feedback for the maintenance of adult song. J Neurosci 17: 6380–90.
106-
[^2]: Honda E, Okanoya K (1999) Acoustical and syntactical comparisons between songs of the white-backed munia (lonchura striata) and its domesticated strain, the bengalese finch (lonchura striata var. domestica). Zool Sci 16: 319–326.
107-
[^3]: Jin DZ, Kozhevnikov AA (2011) A Compact Statistical Model of the Song Syntax in Bengalese Finch. PLOS Computational Biology 7(3): e1001108. https://doi.org/10.1371/journal.pcbi.1001108
107+
[^2]: Woolley SM, Rubel EW (1997) Bengalese finches lonchura striata domestica depend upon auditory feedback for the maintenance of adult song. J Neurosci 17: 6380–90.
108+
[^3]: Honda E, Okanoya K (1999) Acoustical and syntactical comparisons between songs of the white-backed munia (lonchura striata) and its domesticated strain, the bengalese finch (lonchura striata var. domestica). Zool Sci 16: 319–326.
109+
[^4]: Jin DZ, Kozhevnikov AA (2011) A Compact Statistical Model of the Song Syntax in Bengalese Finch. PLOS Computational Biology 7(3): e1001108. https://doi.org/10.1371/journal.pcbi.1001108
108110

109111
To build such a model for Bengalese finch song,
110112
we consider the song syllables to be states.
@@ -140,7 +142,7 @@ when it computes the transition matrix.
140142

141143
```{note}
142144
This code is adapted from
143-
https://github.com/yardencsGitHub/tweetynet/blob/master/article/src/article/bfbehav/sequence.py
145+
<https://github.com/yardencsGitHub/tweetynet/blob/master/article/src/article/bfbehav/sequence.py>
144146
under [BSD license](https://github.com/yardencsGitHub/tweetynet/blob/master/LICENSE).
145147
146148
As used for the paper
@@ -414,6 +416,8 @@ project_id = project_url.split('/')[-2] # -2 because -1 is an empty string from
414416
We make an instance of the `osfclient` class `OSF` that represents the API,
415417
and then use that instance's `project` method to make a `Project` instance
416418
that represents the project we want to access programmatically.
419+
(We suppress the output of this cell,
420+
because the progress bar for the downloads creates many lines of text.)
417421

418422
```{code-cell} ipython3
419423
osf = osfclient.OSF()
@@ -436,6 +440,7 @@ project_files = [file for file in project_files if file.endswith('TextGrid')]
436440
The last step before we can clean our data is to fetch the files from the storage.
437441

438442
```{code-cell} ipython3
443+
:tags: [hide-cell]
439444
fetch_files(project, project_files, output_dir='./data')
440445
```
441446

0 commit comments

Comments
 (0)