id3c.callbacks.demo_spec_callback#

newSpecFile

User choice of the SPEC file name.

spec_comment

Make it easy for user to add comments to the data file.

specwriter

Attributes#

Functions#

spec_comment(→ None)

Make it easy for user to add comments to the data file.

newSpecFile(→ None)

User choice of the SPEC file name.

init_specwriter_with_RE(→ Any)

Initialize specwriter with the run engine and return it.

Module Contents#

id3c.callbacks.demo_spec_callback.logger[source]#
id3c.callbacks.demo_spec_callback.specwriter = None[source]#
id3c.callbacks.demo_spec_callback.file_extension = None[source]#
id3c.callbacks.demo_spec_callback.spec_comment(comment: str, doc: Any | None = None) None[source]#

Make it easy for user to add comments to the data file.

id3c.callbacks.demo_spec_callback.newSpecFile(title: str, scan_id: int | None = None, RE: Any | None = None) None[source]#

User choice of the SPEC file name.

Cleans up title, prepends month and day and appends file extension. If RE is passed, then resets RE.md["scan_id"] = scan_id.

If the SPEC file already exists, then scan_id is ignored and RE.md["scan_id"] is set to the last scan number in the file.

id3c.callbacks.demo_spec_callback.init_specwriter_with_RE(RE: Any, iconfig: dict[str, Any]) Any[source]#

Initialize specwriter with the run engine and return it.