Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to shift a TimeSeries by a given time delta but keep track of this #7631

Open
samaloney opened this issue May 17, 2024 · 0 comments

Comments

@samaloney
Copy link
Contributor

Describe the feature

With data from multiple locations in the heliosphere it is often necessary to shift timesseries data by a correction due to propagation (light travel time, particle travel time etc) and this is often done in an adhoc manner which can be very error prone e.g.

my_ts = TimeSeries(....)

my_ts_df = my_ts.to_dataframe()
my_ts_df.index = my_ts_df.index - pd.TimeDelta(minutes=5)
my_ts_shifted_df = my_ts_df.index = my_ts_df.index - pd.TimeDelta(minutes=5)

Proposed solution

Could a time_shift property or similar be added to TimeSeries which where the plot labels/titles are updated to indicate the shift.

One could then check if a TimeSeries is shifted or not with my_ts.time_shift and set a time shift with my_ts.time_shift = -5 u.min?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant