Closed carueda closed 1 year ago
Hi Carlos,
The problem is that your dataset has a 'time' dimension instead of 'datetime', which is the standard pypam output. To use this functionality the output should be the one from pypam. However, we could add arguments where the user can select the names of the coordinates which represent time and frequency to make it more general.
And indeed, tests are in development
Sorry, I removed some other comments here as I was actually given the renaming steps you provided offline, but overlooked those when I tried this! All seems to work as you indicated.
daily_ds = xr.open_dataset("/.../generated/MARS_20220909.nc")
daily_ds = daily_ds.rename({'time': 'datetime', 'frequency': 'frequency_bins'})
pypam.plots.plot_hmb_ltsa(daily_ds.psd, show=True)
I just tried exercising the recently introduced
plot_hmb_ltsa
function on one of our data products. I'm using an example code snippet given to me as a basis (there's no unit test or documentation yet AFAICT).Below is the code and error. I'd say this ticket is more of a heads-up as the new function may still be undergoing pending updates(?).
My primary dev env is Mac but I can try reproducing on Linux if needed. Thanks!