-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix issue 171 #172
Fix issue 171 #172
Conversation
- remove unneeded call when data are provided to ChannelTS - if self.ts is assigned, _update_xarray_metadata is called within the setter
If we are going to use the self_sample_rate property introduced, then the setting of sample rate should be done via self._sample_rate. The sample_rate setter should be checked for coverage, and possbly modified. Will add notes to issue #171
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #172 +/- ##
==========================================
- Coverage 58.88% 58.87% -0.01%
==========================================
Files 138 138
Lines 14896 14906 +10
==========================================
+ Hits 8771 8776 +5
- Misses 6125 6130 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
- sample_rate setter now updates self._sample_rate - test now uses the setter instead of accessing channel_ts._sample_rate
- self._sample_rate is now set on __init__() - because it can be None, dict, or mt_metadata.timeseries.Electric mt_metadata.timeseries.Magnetic, or mt_metadata.timeseries.Auxiliary and the dict can be flat or nested, a little bit of care was needed - created a method get_sample_rate_supplied_at_init() of ChannelTS to handle this
@kujaku11 This PR is ready for review.
This supports explicit assignment of sample_rate at The result when working with high frequency data is a significant speedup as the sample_rate attr is computed only once if not supplied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks more efficient
Notes are in issue #171.
Remaining things to be addressed: