-
Notifications
You must be signed in to change notification settings - Fork 25
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
initial commit #560
initial commit #560
Conversation
a4c2043
to
e54b389
Compare
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.
comments on draft
#: The number of times the detector can go through a complete cycle of kickoff and | ||
#: complete without needing to re-arm. This is important for detectors where the | ||
#: process of arming is expensive in terms of time | ||
iteration: int = 0 |
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.
iterations or max_iterations may be slightly clearer?
can go through or will?
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.
This field also appears to not be used yet?
@@ -73,32 +77,36 @@ class DetectorControl(ABC): | |||
arming and disarming a detector | |||
""" | |||
|
|||
_arm_status = AsyncStatus |
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.
_arm_status = AsyncStatus | |
_arm_status: AsyncStatus | None |
This does require that all subclasses of DetectorControl have this field, and that it is this type. As arm is abstract, and we're leaving implementation to the implementations I'd avoid having any required fields like this.
Args: | ||
num: Expected number of frames | ||
TriggerInfo which contains |
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.
Update to the new prepare params
@abstractmethod | ||
async def arm(self): | ||
""" | ||
Arm the detector and save the status of arm in _arm_status |
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.
Arm the detector and save the status of arm in _arm_status | |
Arm the detector |
assert self._trigger_info, "Trigger Info cannot be none after prepare" | ||
assert ( | ||
self._trigger_info.trigger == DetectorTrigger.internal | ||
), "It can only be triggered for internal trigger" |
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.
), "It can only be triggered for internal trigger" | |
), "Cannot internally trigger with {self._trigger_info.trigger}" |
trigger=self._trigger_info.trigger, | ||
exposure=self._trigger_info.livetime, | ||
) | ||
if value.trigger != DetectorTrigger.internal: |
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.
if value.trigger != DetectorTrigger.internal: | |
if value.trigger is not DetectorTrigger.internal: |
Should use is
for enums
closed as duplicate #568 |
No description provided.