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

Chunk interval index #519

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jmosbacher
Copy link
Contributor

Implementation of #433, lazily constructs an IntervalIndex for chunks. The index can be used for fast overlap tests
also added a overlaps method to strax.Chunk which returns all data that overlaps with a given interval.
Can you give a minimal working example (or illustrate with a figure)?

import strax
import straxen

st = straxen.contexts.demo()
c = next(st.get_iter( '180423_1021','raw_records',))
idx = np.random.randint(len(c.data))
row = c.data[idx]
overlapping_data = c.overlaps(row['time'] , row['time'] + row['dt'])

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 85.736% when pulling 210b923 on jmosbacher:chunk_interval_index into d3608ef on AxFoundation:master.

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.

3 participants