OSOceanAcoustics / echopype

Enabling interoperability and scalability in ocean sonar data analysis
https://echopype.readthedocs.io/
Apache License 2.0
99 stars 76 forks source link

Add Fielding transient noise mask #1352

Open leewujung opened 4 months ago

leewujung commented 4 months ago

The transient noise (TN) filter from Ryan et al. 2015 is slow due to the need to sort in calculating median for each window surrounding a given pixel.

Alejandro Ariza (@alejandro-ariza) and Sophie Fielding in British Antarctic Survey (BAS) has figured a new approach that works pretty well. It is implemented in echopy here and documented in the docstrings. It would be good to add this functionality.

The masking results look like:

ctuguinay commented 4 months ago

Ryan's implementation entails iterating through each ping time and each depth value, whereas Fielding's implementation entails iterating through each ping time and some of the depth values until a certain noise threshold condition is met. In this sense, Ryan's is ~O(n^2) whereas Fielding's approach is ~O(n * log(n) ).