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

Adding __add__ and merge to ChannelTS #136

Merged
merged 18 commits into from Mar 27, 2023
Merged

Adding __add__ and merge to ChannelTS #136

merged 18 commits into from Mar 27, 2023

Conversation

kujaku11
Copy link
Owner

@kujaku11 kujaku11 commented Mar 24, 2023

Adding the __add__ and merge methods to ChannelTS 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 combined xr.Dataset is reindexed to be a monotonically increasing time series with the proper start and end times. Any time gaps will be filled with the nearest 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.

  • Overwrite __add__ method
  • Add merge method
  • Update tests
  • Update documentation

@codecov-commenter
Copy link

codecov-commenter commented Mar 24, 2023

Codecov Report

Patch coverage: 44.65% and project coverage change: +5.08 🎉

Comparison is base (22387bf) 53.34% compared to head (7a85cbc) 58.43%.

📣 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     
Impacted Files Coverage Δ
mth5/groups/filter_groups/fir_filter_group.py 36.36% <0.00%> (ø)
mth5/io/miniseed/miniseed.py 45.45% <ø> (ø)
mth5/io/nims/response_filters.py 95.45% <ø> (ø)
mth5/io/phoenix/__init__.py 100.00% <ø> (ø)
mth5/io/phoenix/phoenix_collection.py 16.86% <ø> (ø)
mth5/io/phoenix/read.py 58.33% <ø> (ø)
mth5/io/phoenix/readers/__init__.py 100.00% <ø> (ø)
mth5/io/phoenix/readers/base.py 40.25% <ø> (ø)
mth5/io/phoenix/readers/contiguous/__init__.py 100.00% <ø> (ø)
.../readers/contiguous/decimated_continuous_reader.py 38.23% <ø> (ø)
... and 91 more

... 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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kujaku11 kujaku11 merged commit c473461 into clients Mar 27, 2023
5 of 6 checks passed
@kujaku11 kujaku11 deleted the ch_add branch March 27, 2023 19:09
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

Successfully merging this pull request may close these issues.

None yet

2 participants