This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Extracting annual amplitude and phase of xarray dataset for each pixel using xarray.DataArray.curvefit #6968
Labels
You can continue the conversation there. Go to discussion →
What is your issue?
I was wondering how can I extract annual amplitude and phase of xarray time series using xarray.DataArray.curvefit. We fit a 1d function in time to return annual and seasonal amplitude and phase with dims (x, y)
We can use formula similar to https://stats.stackexchange.com/questions/77543/how-do-i-get-the-amplitude-and-phase-for-sine-wave-from-lm-summary but I have difficulty to extract a0,a1,a2 pixelwise for the dataset.I have tried also to convert time to julian day to use instead of ds.time in ds.curvefit but it didn't work. I really appreciate if you can help me. Similar problem with numpy is solved in https://stackoverflow.com/questions/15094619/fitting-a-3d-array-of-data-to-a-1d-function-with-numpy-or-scipy
The text was updated successfully, but these errors were encountered: