vocalpy / crowsetta

A tool to work with any format for annotating animal sounds
https://crowsetta.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
51 stars 3 forks source link

CLN: rename `on/offsets_Hz` -> `on/offset_inds`, fix #87 #128

Closed NickleDave closed 2 years ago

NickleDave commented 2 years ago

This PR renames onset_Hz and offset_Hz to onset_ind and offset_ind respectively. As discussed in #87.

The reason is that Hz doesn't make sense as the unit to use here; it's a sampling rate.

I went with ind even though I think that sample is technically the most correct term to use -- there is some number of samples per second. Even though from googling I get the sense DSP people would rarely refer to a single sample.

The problem with sample besides it not being immediately apparent what a "sample" is, is that pluralization makes it even weirder -- onset_samples and offset_samples sounds like we're providing the samples themselves?

I'm going with ind because it's (1) concise, (2) relatively self-evident (I don't have to put on my DSP hat to guess what it means) and (3) pluralizes well, onset_ind, offset_ind -> onset_inds, offset_inds. I think ind is a conventional shortening of index that's used widely enough that most people will get what it means

codecov-commenter commented 2 years ago

Codecov Report

Merging #128 (de67b78) into main (38b5eac) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #128   +/-   ##
=======================================
  Coverage   99.70%   99.70%           
=======================================
  Files          25       25           
  Lines         675      675           
=======================================
  Hits          673      673           
  Misses          2        2           
Impacted Files Coverage Δ
tests/fixtures/segment.py 100.00% <100.00%> (ø)
tests/fixtures/sequence.py 100.00% <100.00%> (ø)
tests/helpers/keywords.py 100.00% <100.00%> (ø)
tests/test_csv.py 100.00% <100.00%> (ø)
tests/test_phn.py 100.00% <100.00%> (ø)
tests/test_segment.py 100.00% <100.00%> (ø)
tests/test_sequence.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c44f9a8...de67b78. Read the comment docs.