oceanhackweek / ohw21-proj-bioacoustics

0 stars 8 forks source link

Ipliment the Proud code in xarray #4

Open NickMortimer opened 3 years ago

NickMortimer commented 3 years ago

image

https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/2041-210X.12396

Have a look at this and xarray

http://xarray.pydata.org/en/stable/generated/xarray.core.rolling.DataArrayRolling.construct.html

NickMortimer commented 3 years ago

Here's Roland's implementation in numpy

https://github.com/rolandproud

NickMortimer commented 3 years ago

I think we are looking at something like this with a user function

pings = xr.open_dataset('https://s3-ap-southeast-2.amazonaws.com/imos-data/IMOS/SOOP/SOOP-BA/VLMJ_Investigator/Investigator_20160218-20160221/IMOS_SOOP-BA_AE_20160218T232139Z_VLMJ_FV02_Investigator-EK60-18-38-70-120_END-20160221T084435Z_C-20160630T221214Z.nc',chunks={'TIME':100})
pings.Sv.rolling(DEPTH=10).construct("window_dim").reduce(np.nanmean,dim=('window_dim'))
loicbachelot commented 3 years ago

It could also be good to run Roland's implementation on an example to verify our results

NickMortimer commented 3 years ago

It could also be good to run Roland's implementation on an example to verify our results

Yes that would be great