Support being able to configure baseline data with DeviceManager
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 56/100
Rechercherichtung
Start by reading DeviceManager and BlueskyContext, which the issue identifies as the integration points; compare how BlueskyContext currently creates its RunEngine with the proposed DeviceManager-provided configuration. Check the existing tests for those components and add coverage for applying baseline metadata to runs. Done means a configured RunEngine can add baseline metadata to each run through Blueapi.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Within Bluesky, you are able to record baseline data. This is so that whenever a plan is ran which collects data, these devices will always record data at start and end of scan. This currently done in GDA with before_scan metadata. There are currently two ways (I think) to achieve this
- via a plan decorator e.g baseline_decorator
- Add preprocessor SupplementalData to
RunEngine(doc string below)
Create an instance of SupplementalData and apply it to a RunEngine.
>>> sd = SupplementalData(baseline=[some_motor, some_detector]),
... monitors=[some_signal],
... flyers=[some_flyer])
>>> RE = RunEngine({})
>>> RE.preprocessors.append(sd)
Now all plans executed by RE will be modified to add baseline readings
(before and after each run), monitors (during each run), and flyers
(kicked off before each run and collected afterward).
Currently, the only way for us to add metadata is via option 1. The issue with this is we are now forced to wrap ever single plan we have with this decorator. It would much easier and simpler if we can add global metadata to be added to each run via option 2. The issue is Blueapi has no way of exposing this utils to us.
I've had a thought how we could do this. The first option is to have DeviceManager have an instance of RunEngine inside which blueapi then pulls out. This allows us to then add our own configuration to the RunEngine. My thinking was something like this
devices = DeviceManager()
@devices.factory
def my_device1() -> Device:
return MyDevice(...)
@devices.factory
def my_device2() -> Device:
return MyDevice(...)
...
@devices.run_engine
def configure_run_engine(beamline: dict[str: Device]) -> RunEngine:
run_engine = RunEngine()
sd = SupplementalData(
baseline=[beamline["my_device1"]],
monitors=[beamline["my_device2"]],
flyers=[beamline["my_device3"]]
)
run_engine.preprocessors.append(sd)
return run_engine
Then on Blueapi side, you update DeviceManager to support a run_engine method and then in BlueskyContext, you update to use the one we provided rather than your own. You then reuse what we have then add your additional blueapi configuration.
Acceptance Criteria
- We can configure run engine with baseline metadata
- Vorherrschende Sprache
- Python
- Sterne
- 14
- Forks
- 15
- Ø Merge
- 3 T. 2 Std.
- Gemergte PRs (30 T.)
- 35
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus DiamondLightSource/blueapi
-
bug support: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
DiamondLightSource/blueapi#1802 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
support: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
DiamondLightSource/blueapi#1772 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
deployment dev-environment
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
DiamondLightSource/blueapi#1623 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Cannot Install SoftiocOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
DiamondLightSource/blueapi#1605 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
DiamondLightSource/blueapi#1494 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in DiamondLightSource/blueapi
Ähnliche Issues
-
intake mcp-intake needs-human-review priority:high type:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Ikalus1988/MisakaNet#6081 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
521xueweihan/HelloGitHub#4655 ·
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount dueEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 79/100
developmentseed/titiler-covjson#164 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/install bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag