Implement soundevent.arrays Module for Enhanced DataArray Workflows #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature implementation: Arrays module
New array module for better handling of xarray DataArray objects. It is common to have numerical arrays in audio analysis with potentially multiple axes, where each bin has specific coordinates. For example, the raw audio signal can be thought of as a 1-dimensional array with one axis for time, where each bin was taken at a specific time after the start of the recording, and can potentially have another axis for the number of audio channels. Another great example is the spectrogram, where you have a 2-dimensional array; here, each bin corresponds to a particular time and frequency range.
It is much easier to work with these numerical arrays if the dimensions are labelled and there are easy ways of mapping the coordinates into the array bins. Hence soundevent has adopted xarray as a great library to ease working with these numerical arrays. We can take advantage of all of the hard work the geospatial community has been doing for decades working with their own numerical arrays, and repurpose it for audio analysis.
This arrays module adds functions for the standardization of dimension names and attributes, as well as for creation and manipulation of both data arrays and their dimensions.