orcasound / ambient-sound-analysis

This repository aims to hold code for UW MSDS capstone project analyzing ambient sounds in orcasound hydrophone data
MIT License
4 stars 4 forks source link

PCEN transformation sometimes results in NAN values #11

Closed CaseCal closed 1 year ago

ghost commented 1 year ago

Hello! Im new to opensource and im interested to learn more. Can you guide me through the issue. I wish i could give a try to fix it

veirs commented 1 year ago

I expect that the problem lies in the PCEN default parameters or the input acoustic data. Something is making a denominator go to zero. How about finding a way to isolate the situation where the NANs occur to see if the input acoustic data is 'weird' in some way. Maybe a whole bunch of zeros have come in as sound levels or something like that. The likely PCEN default parameters were set for birds or human speech but not likely for water sounds.

veirs commented 1 year ago

@GaneshK-RKE you might reach out to @CaseCal and see if he can identify just where the Nans were occuring.

veirs commented 1 year ago

@GaneshK-RKE PCEN transforms (Per Channel Energy Normalization) contain complicated mathematics. The normal Power Spectral Densities are integrated into frequency bins. Then the signals in each frequency bin are filtered and amplified to try to increase the signal to noise of signals that change quickly, think bird chirps, and decrease the strength of signals, assumed to be background, that change amplitude or frequency fairly slowly. Take a look at Wikipedia and the Labrosa python library.

ghost commented 1 year ago

@veirs Okay. I'll take a look at it.

So basically for the purpose, we are performing FFT and then trying to filter out right? The idea i got right now is we have to design a filter which would wipe out the background noises

CaseCal commented 1 year ago

Since the focus of this project is actually measuring noise levels across bands, we've decided to remove PCEN from the processing pipeline, and can close this issue.