Unfortunately back processing (and the automation) is tripping up on a small number of files (halting the automation). The issue is caused by L0 files that contain a "DDM" array that has no DDM - instead it contains a single non-NaN value across all 40x5 elements.
These DDMs are causing the coherence function "get_RongowaiWAFRMSD" to break as it calculates the background noise, then subtracts this from the signal DDM, then calculates the SNR ratio in decibels. Unfortunately for the case above (a "flat" DDM of a single value) this means that the noise value is the same as the signal value, the signal_minus_noise becomes 0, and the SNR in decibles takes a log10 which fails for 0 values.
My guess is that it would be better to not process these DDMs at all rather than adjust the SNR calculation (not really DDMs?).
It would be great if someone could take a look and figure out how/where best to ignore these DDMs (or whether to tweak the coherence code which I doubt).
Unfortunately back processing (and the automation) is tripping up on a small number of files (halting the automation). The issue is caused by L0 files that contain a "DDM" array that has no DDM - instead it contains a single non-NaN value across all 40x5 elements.
These DDMs are causing the coherence function "get_RongowaiWAFRMSD" to break as it calculates the background noise, then subtracts this from the signal DDM, then calculates the SNR ratio in decibels. Unfortunately for the case above (a "flat" DDM of a single value) this means that the noise value is the same as the signal value, the signal_minus_noise becomes 0, and the SNR in decibles takes a log10 which fails for 0 values.
My guess is that it would be better to not process these DDMs at all rather than adjust the SNR calculation (not really DDMs?).
It would be great if someone could take a look and figure out how/where best to ignore these DDMs (or whether to tweak the coherence code which I doubt).