Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add audiomoth GPS sync tools and refactor localization into modules #1064

Merged
merged 18 commits into from
Oct 8, 2024

Conversation

sammlapp
Copy link
Collaborator

@sammlapp sammlapp commented Oct 7, 2024

Separated localization module into folder with submodules because it was becoming bloated

resolves #914 by adding sync tools (Audiomoth GPS firmware only for now)

module was bloated, now have folder with __init__ that imports the public-facing API classes/functions, and separate modules for localization_algorithms.py, spatial_event.py, synchronized_recorder_array.py

refactored top-level imports and tests accordingly
resolves Audio.trim with datetime #926

adds tests for various behaviors
needs tests

where should example script go? bioacoustics cookbook or tutorials?  I've added an example script to tutorials
this is now the type returned by SpatialEvent.estimate_location, instead of modifying itself in place and returning itself

resolves Some attributes of SpatialEvent are vague #932

updates tutorial and tests
renames some variables, adds docstrings to variables, adds comments, and adds thorough documentation to docstrings
was using list(set(files)) which can result in changing order of files, noticed because tests sometimes failed when assuming order of label df rows was retained
creates a `localize_events_parallel` function and moves most of the input validation in localize_detections to create_candidate_events() where it makes sense for it to be. Now, localize_detections() just wraps create_candidate_events() with localize_events_parallel() and filters the returned events into localized and unlocalized lists.

resolves SynchronizedRecorderArray API should allow localizing a list of already-created events #1041

instead of adding a method to SynchronizedRecorderArray, it made more sense to add a function to the spatial_event module: this function is not dependent on anything within the SynchronizedRecorderArray object, it works directly on a list of SpatialEvent objects
resolves add tools for reviewing localized SpatialEvents #981

the full review process should be provided in a notebook, but this may be the only functionality we want to include within opso for now: loads audio clips used to localize a PositionEstimate with offsets based on tdoa, such that the signal should align in time if tdoas are correct. Provides example for visualizing, and test.
resolves add tools for reviewing localized SpatialEvents #981
had only changed one occurrence of list(set(files)), not both, on previous commit

throughout code, use unique() function that retains order instead of list(set(x))
@sammlapp sammlapp linked an issue Oct 8, 2024 that may be closed by this pull request
@sammlapp sammlapp merged commit 95ee5de into develop Oct 8, 2024
3 checks passed
@sammlapp sammlapp deleted the feat_914_sync branch October 8, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant