You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Epoch question :
In the solve function the default epoch is defined as "The default corresponds to the Python standard library datetime proleptic Gregorian calendar, starting with 1 at 00:00 on January 1 of year 1"
On the other hand, in the notebook ["utide_real_data_example.ipynb"](url), time is defined as time = mdates.date2num(obs.index.to_pydatetime()) which epoch is correspond to calendar starting with 1 at 00:00 oon January 1 of year 1970.
Finally which epoch is used in the solve function?
Phase question :
I'm having hard time to recover the phase of my signal. I use real data (sea surface elevation in the Bay of biscay)
With t = mdates.date2num(obs.index.to_pydatetime())
and where obs.index=pd.date_range(start='2017-07-09 12:00:00',end='2017-07-30 12:30:00',freq='1min')
I recover the main correct component and their corresponding amplitude, but the phase is different then expected. May this be related to my first question?
I don't know if it's related but I then started by constructing a simple signal with a semi diurnal frequency such as : Acos(wt-p).
I recover my amplitude and pulsation (w) but I couldn't recover the phase p. When I computed the phase of the signal with p= 0, meaning : Acos(wt). The phase was around 114. I was then able to recover p when using a signal: Acos(wt-(p-114)). I thought I might use this trick for my real signal but I could'nt recover a correct phase, even with a signal made of sum of Aicos(wi*t), with i the indices of the main constituent of my signal.
The text was updated successfully, but these errors were encountered:
Chtululu
changed the title
Struggling with epoch and phase.
Python epoch and phase computation
Nov 16, 2021
The phase given by the code consider the epoch starting with 1 at 00:00 on January 1 of year 1 when python date2num starts with 0 at 00:00 on January 1 of year 1970.
As I use date2num I also need to use the keyword 'epoch='1970-01-01'' in coeff calculation to recover the correct phase. (This should also be the case in the notebook example)
Hello,
Epoch question :
In the solve function the default epoch is defined as "The default corresponds to the Python standard library
datetime
proleptic Gregorian calendar, starting with 1 at 00:00 on January 1 of year 1"On the other hand, in the notebook ["utide_real_data_example.ipynb"](url), time is defined as time = mdates.date2num(obs.index.to_pydatetime()) which epoch is correspond to calendar starting with 1 at 00:00 oon January 1 of year 1970.
Finally which epoch is used in the solve function?
Phase question :
I'm having hard time to recover the phase of my signal. I use real data (sea surface elevation in the Bay of biscay)
With t = mdates.date2num(obs.index.to_pydatetime())
and where obs.index=pd.date_range(start='2017-07-09 12:00:00',end='2017-07-30 12:30:00',freq='1min')
I recover the main correct component and their corresponding amplitude, but the phase is different then expected. May this be related to my first question?
The text was updated successfully, but these errors were encountered: