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
Adding __add__ and merge to ChannelTS #136
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## clients #136 +/- ##
===========================================
+ Coverage 53.34% 58.43% +5.08%
===========================================
Files 58 117 +59
Lines 7500 12217 +4717
===========================================
+ Hits 4001 7139 +3138
- Misses 3499 5078 +1579
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Adding the
__add__
andmerge
methods toChannelTS
for easier combination of channels.Under the hood using
xarray.combine_by_coords(combine_attrs="override")
. This will combine along time as long as the components of the input channels are the same. Then the combinedxr.Dataset
is reindexed to be a monotonically increasing time series with the proper start and end times. Any time gaps will be filled with thenearest
values.ChannelTS.merge()
will do the same but a list of channels can be input, and a sample rate can be set in the event that you want to downsample the data.__add__
methodmerge
method