-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: main
Are you sure you want to change the base?
Pulser gating #241
Conversation
raise ValueError("The requested gate index is beyond the total data" | ||
"stream.") | ||
|
||
gsh = GetSlice(self.ih, slice(self.gate_offsets[0][gate_index], |
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.
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 |
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.
Override __getitem__
to give output of get_slice
if the item is an integer?
This Pull request provides a class to gate a stream of pulsar data. @mhvk Please take a look.