Draft: Actor button
A simple component to launch an actor on click from SampleScans. Supports a simple inline form to set params (or none at all) from the actor Schema. For the future need to also add a way to retrieve params from the store. Also probably some room to improve the styling of the inline form
Layout yaml would look something like:
component: actorbutton
options:
actor: ct
title: 'CT Update'
params:
exposure: 1
And the basic actor in samplescans:
from marshmallow import fields
from daiquiri.core.components import (
ComponentActor,
ComponentActorSchema,
)
from daiquiri.core.hardware.bliss.session import *
class CtSchema(ComponentActorSchema):
enqueue = fields.Bool(default=False)
sampleid = fields.Int()
exposure = fields.Float(required=True, metadata={"title": "Exposure Time"})
class Meta:
uischema = {
"sampleid": {"classNames": "hidden-row", "ui:widget": "hidden"},
"enqueue": {"classNames": "hidden-row", "ui:widget": "hidden"},
# "exposure": {"classNames": "hidden-row", "ui:widget": "hidden"},
}
class CtActor(ComponentActor):
# this is important to stop daiquiri saving metadata associated with this scan
# default is 'experiment'
metatype = None
schema = CtSchema
name = "ct"
def method(self, **kwargs):
lima = config.get("lima_simulator")
ct(kwargs["exposure"], lima)
and actor activate in samplescans.yml with
component: samplescan
scans:
- actor: exafs
- actor: exafsramp
- actor: scandisplay
- actor: ct
Edited by Stuart Fisher
Merge request reports
Activity
Filter activity
requested review from @valentin.valls
mentioned in issue daiquiri#17
added 6 commits
-
f0f180d0...33ee3528 - 2 commits from branch
master
- 6b8e5fea - allow setting className on SimpleSchemaForm
- b3713520 - add initial ActorButton component to allow executing arb actors via simple button click
- 9ac5903d - style
- 86ca588e - tidy debug
Toggle commit list-
f0f180d0...33ee3528 - 2 commits from branch
added 537 commits
-
86ca588e...4fbb0669 - 534 commits from branch
master
- 875846c4 - allow setting className on SimpleSchemaForm
- 5b051037 - add initial ActorButton component to allow executing arb actors via simple button click
- 67ec16cf - tidy debug
Toggle commit list-
86ca588e...4fbb0669 - 534 commits from branch
Please register or sign in to reply