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

Pulser gating #241

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Pulser gating #241

wants to merge 6 commits into from

Conversation

luojing1211
Copy link
Collaborator

@luojing1211 luojing1211 commented Dec 16, 2021

This Pull request provides a class to gate a stream of pulsar data. @mhvk Please take a look.

raise ValueError("The requested gate index is beyond the total data"
"stream.")

gsh = GetSlice(self.ih, slice(self.gate_offsets[0][gate_index],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make a new get_slice method that returns this slice (everything from the top of this method to here) and then use that for read?

self.gate_offsets[1][gate_index]))
data = gsh.read()
self.pulse_offset = gate_index + 1
return data, gsh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Override __getitem__ to give output of get_slice if the item is an integer?

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.

2 participants