dodal.plan_stubs.data_session#

Functions

attach_data_session_metadata_decorator(plan)

Attach data session metadata to the runs within a plan and make it correlate with an ophyd-async PathProvider.

attach_data_session_metadata_wrapper(plan[, ...])

Attach data session metadata to the runs within a plan and make it correlate with an ophyd-async PathProvider.

dodal.plan_stubs.data_session.attach_data_session_metadata_wrapper(plan: Generator[Msg, Any, P], provider: UpdatingPathProvider | None = None) Generator[Msg, Any, P][source]#

Attach data session metadata to the runs within a plan and make it correlate with an ophyd-async PathProvider.

This updates the path provider (which in turn makes a call to to a service to figure out which scan number we are using for such a scan), and ensures the start document contains the correct data session.

Parameters:
  • plan (Generator[Msg, Any, TypeVar(P)]) – The plan to preprocess

  • provider (UpdatingPathProvider | None, default: None) – The path provider that participating detectors are aware of.

Returns:

A plan

Return type:

MsgGenerator

Yields:

Iterator[Msg] – Plan messages

dodal.plan_stubs.data_session.attach_data_session_metadata_decorator(plan: Generator[Msg, Any, P], provider: UpdatingPathProvider | None = None) Generator[Msg, Any, P]#

Attach data session metadata to the runs within a plan and make it correlate with an ophyd-async PathProvider.

This updates the path provider (which in turn makes a call to to a service to figure out which scan number we are using for such a scan), and ensures the start document contains the correct data session.

Parameters:
  • plan (Generator[Msg, Any, TypeVar(P)]) – The plan to preprocess

  • provider (UpdatingPathProvider | None, default: None) – The path provider that participating detectors are aware of.

Returns:

A plan

Return type:

MsgGenerator

Yields:

Iterator[Msg] – Plan messages