Data populated ratio#330
Merged
mathieudpnt merged 23 commits intoProject-OSmOSE:mainfrom Feb 23, 2026
Merged
Conversation
Contributor
Author
mathieudpnt
requested changes
Feb 20, 2026
Contributor
mathieudpnt
left a comment
There was a problem hiding this comment.
LGTM but as we discussed I would like some possibility to trace the removed data
if remove_empty_data method returns the dismissed data that would be all good 👌
Contributor
Author
Contributor
Author
Done, you can use it like so: # Filter the returned AudioDataset
removed_data = audio_dataset.remove_empty_data(threshold=0.0)
# Ttake a look at which data has been removed:
print(f"{' REMOVED DATA ':#^60}")
print(f"{'Begin':<20}{'Duration':^20}{'Fill rate':>20}")
for data in removed_data:
print(
f"{data.begin.strftime('%H:%M:%S'):<20}{str(data.duration):^20}{str(data.populated_ratio) + ' %':>20}"
)
"""
prints:
####################### REMOVED DATA #######################
Begin Duration Fill rate
22:35:41 0 days 00:00:05 0.0 %
22:35:45 0 days 00:00:05 0.0 %
22:35:48 0 days 00:00:05 0.0 %
22:35:52 0 days 00:00:05 0.0 %
""" |
mathieudpnt
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


🐋 What's new?
This PR adds some stuff to the API to help the user filtering out data:
BaseData.populated_durationBaseData.populated_ratioSpectroData.populated_durationBaseDataset.remove_data_on_populated_ratio(threshold=0.)threshold🐬Note
This PR resove #295