OSOceanAcoustics / echopype

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

Does `signal.convolve` use dask under the hood? #1164

Closed lsetiawan closed 6 months ago

lsetiawan commented 11 months ago

Within the ek80_complex module we use signal.convolve, which might not be optimized for xarray dataset. Some investigation is needed to see if the code below would properly perform FFT using dask in a parallel fashion.

https://github.com/OSOceanAcoustics/echopype/blob/3ca028f04a4fd3643bb0ad350dc09a699883ee1e/echopype/calibrate/ek80_complex.py#L275-L293

lsetiawan commented 11 months ago

Look into potentially using: https://xrft.readthedocs.io/en/latest/

anantmittal commented 11 months ago

Confirm if a test function exists for the compress_pulse function in echopype/echopype/calibrate/ek80_complex.py.

lsetiawan commented 10 months ago

@anantmittal You should be able to use the same test data like in the test_ek80_BB_power_Sv test: https://github.com/OSOceanAcoustics/echopype/blob/9dfe5ba9cd656eb2f5dc9007fcb960231108cf1e/echopype/tests/calibrate/test_calibrate_ek80.py#L155-L156

The function that get called is compress_pulse, which is called when waveform_mode is "BB":

https://github.com/OSOceanAcoustics/echopype/blob/3ca028f04a4fd3643bb0ad350dc09a699883ee1e/echopype/calibrate/calibrate_ek.py#L443-L446

From the test above, as you can see, all of this is called during a compute_Sv:

https://github.com/OSOceanAcoustics/echopype/blob/9dfe5ba9cd656eb2f5dc9007fcb960231108cf1e/echopype/tests/calibrate/test_calibrate_ek80.py#L193-L197

leewujung commented 6 months ago

Addressed by #1208.