prsctrl.prsctrl_interactive.add_sample#
- add_sample(key: str | None = None, name: str | None = None, save: bool = True, **metadata) Sample[source]#
Add a sample to the sample database and return it.
Prompts on the command line for missing key and name.
- Parameters:
key – Sample key. Prompts if not given.
name – Full sample name, used for plot titles. Prompts if not given.
save – If True, save the sample database after adding.
metadata – Additional metadata key-value pairs, e.g. batch_nr, substrate or notes.
- Raises:
RuntimeError – If the sample database is not initialized, i.e. init() was not run.