Installation ------------ To use elog printing, first install it using conda: .. code-block:: console (YOUR_ENV) $ conda install -c https://hasfcpkg.desy.de/doocsconda elog Available printer ----------------- .. code-block:: python from elog import ELogPrinter print(ELogPrinter.ELOGS) ['exphalllog', 'fl2_photlog', 'fl1_camplog', 'fl1_bl2log', 'fl1_bl3log', 'felpgmlog', 'fl2_fl23log', 'fl2_fl24log', 'fl2_fl26log', 'cpspectlog', 'fl1_ramlog', 'fl1_thzlog', 'fl_thzsrklog', 'hextoflog', 'wespelog', 'musixlog', 'flash2_hglog', 'pplaserlog', 'fl2_pplaslog', 'ttflog'] Send a message to a logbook --------------------------- A logbook entry needs an author, a title and a text which can be empty strings. .. code-block:: python from elog import ELogPrinter printer = ELogPrinter('fl1_camplog') author = 'author' title = 'title' text = 'text' printer.print(author=author, title=title, text=text) Send an image to a logbook -------------------------- As **Matplotlib** is still the default plotting library in python, we decided to use a ``matplotlib.pyplot.figure`` : .. code-block:: python import matplotlib.pyplot as plt from elog import ELogPrinter x = [-3, -2, -1, 0, 1, 2, 3] y = [9, 4, 1, 0, 1, 4, 9] fig = plt.figure() plt.plot(x,y, 'o--') plt.title('figure title') plt.xlabel('X') plt.ylabel('Y', rotation=0) plt.show() printer = ELogPrinter('fl1_camplog') printer.print(author=author, title=title, image=fig, text=text)