PythonDOOCS

Last modified by sndueste on 2025/02/05 15:06

How to read and write DOOCS properties with Python:

See also a link to DOOCSPIE for easy access to DOOCS via Python

image2023-10-4_13-30-7.png

In the following there is a short introduction to a few basic first steps:

Quickstart - Pydoocs

pydoocs_read-write.png

How to read Train IDs at FLASH synchronous readout

It is possible to pass the trainID (historically called macropulse) in pydoocs read methode and ensure related data. For this purpose the DAQmonitor provides a ring buffer. An example how to read the data from the ring buffer can be found in the repository

pydoocs_read-trainID.png

In development - Conda virtual environments

There are currently efforts to build a pydoocs conda package and distribute and manage python on the FLASH user consoles via virtual environments. On this way it is possible to use pydoocs on the Maxwell cluster and the corresponding  JupyterHub.

Examples

  • There are basic examples explained via jupyter notebooks for accessing camera images and ADC traces. Further examples will be added gradually.
  • Demo how to read ADC data partially. There are also options to only read part of the trace to limit the network traffic for online analysis:   Pydoocs_read sliced ADC data.pdf  (and as html)
  • and some useful scripts from PG2 - mono-scan.py  and delay-scan.py- as always be careful using DOOCS adresses that you know what you are doing / moving !!

Caveat

for images

Returns the camera images as seen on the jDDD panel (including e.g. ROIs):
doocspath = 'FLASH.FEL/FBL1.CAM/FOCUS_MICROSCOPE/IMAGE_EXT'

Returns the raw camera image:
doocspath = 'FLASH.FEL/FBL1.CAM/FOCUS_MICROSCOPE/IMAGE_EXT_ZMQ'

for ADC traces

Returns the whole trace which is acquird from the ADC:
doocspath ='FLASH.FEL/ADC.ADQ.BL1/EXP1.CH01/CH00.TD'

Returns the trace which is written to DAQ (the range is adjustable via jDDD) :
doocspath ='FLASH.FEL/ADC.ADQ.BL1/EXP1.CH01/CH00.DAQ.TD'

Big caveat: anaconda5

As this is an quite big caveat it is possible to compile pydoocs yourself and is done for all linux console in the FLASH1 &2 hall.

With the introduction of pydoocs as a conda package this will be redundant in the near future.