[Dark Request] Add operation mode to notebooks
Description
This is MR 2 of 3 to bring darks operation mode to xfel-calibrate
(ticket).
In the first PR, webservice.py
added support the new request parameters.
In this PR, the notebooks are be updated accordingly.
In the third PR, an end to end refactoring will be done to clear temporary hacks.
This PR depends on !401 (closed) to be merged in first, and then be rebased.
The changes are minor (last two commits), it should be reviewed once !401 (closed) is in.
How Has This Been Tested?
This was tested with the following command:
xfel-calibrate agipd DARK --concurrency-par karabo_da \
--slurm-scheduling 10 \
--request-time 2021-01-26T19:25:50 \
--slurm-name dark_CALLAB_agipd_202031_p900113_rr9985 \
--report-to /gpfs/exfel/d/cal_tst/caldb_store/xfel/reports/CALLAB/SPB_DET_
AGIPD1M-1/dark/dark_900113_r9985_210126_192550 \
--cal-db-interface tcp://max-exfl016:8015#8044 \
--db-output \
--receiver-id {}CH0 \
--karabo-id-control SPB_IRU_AGIPD1M1 \
--karabo-da-control AGIPD1MCTRL00 \
--h5path-ctrl /CONTROL/{}/MDL/FPGA_COMP \
--in-folder /gpfs/exfel/exp/CALLAB/202031/p900113/raw \
--out-folder /gpfs/exfel/u/usr/CALLAB/202031/p900113/xcaltstCalOutput/dark/runs_9985/SPB_DET_AGIPD1M_1 \
--karabo-id SPB_DET_AGIPD1M-1 \
--operation-mode FIXED_GAIN \
--run-high 9985 --run-med 0 --run-low 0
The integration with the webservice was tested with the following script:
import zmq
con = zmq.Context()
socket = con.socket(zmq.REQ)
con = socket.connect("tcp://max-exfl017:5555")
action = 'dark_request'
dark_run_id = '182'
sase = 'sase1'
instrument = 'CALLAB'
cycle = '202031'
proposal = '900113'
detector_id = 'SPB_DET_AGIPD1M-1'
pdu_physical_names = '["AGIPD00 (Q1M1)"', '"AGIPD01 (Q1M2)"', '"AGIPD02 (Q1M3)"', '"AGIPD03 (Q1M4)"', '"AGIPD04 (Q2M1)"', '"AGIPD05 (Q2M2)"', '"AGIPD06 (Q2M3)"', '"AGIPD07 (Q2M4)"', '"AGIPD08 (Q3M1)"', '"AGIPD09 (Q3M2)"', '"AGIPD10 (Q3M3)"', '"AGIPD11 (Q3M4)"', '"AGIPD12 (Q4M1)"', '"AGIPD13 (Q4M2)"', '"AGIPD14 (Q4M3)"', '"AGIPD15 (Q4M4)"]' # noqa
pdu_karabo_das = '["AGIPD00"', ' "AGIPD01"', ' "AGIPD02"', ' "AGIPD03"', ' "AGIPD04"', ' "AGIPD05"', ' "AGIPD06"', ' "AGIPD07"', ' "AGIPD08"', ' "AGIPD09"', ' "AGIPD10"', ' "AGIPD11"', ' "AGIPD12"', ' "AGIPD13"', ' "AGIPD14"', ' "AGIPD15"]' # noqa
operation_mode = 'FIXED_GAIN'
run_numbers = '[9985,]'
data = [action, dark_run_id, sase, instrument, cycle, proposal, detector_id,
operation_mode, *pdu_physical_names, *pdu_karabo_das, run_numbers]
socket.send(str(data).encode())
resp = socket.recv_multipart()[0]
print(resp.decode())
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
- My change requires a change to the documentation.
Reviewers
Edited by Philipp Schmidt