"in_folder = \"/gpfs/exfel/exp/FXE/202231/p900298/raw\" # the folder to read data from, required\n",
"in_folder = \"/gpfs/exfel/exp/SA1/202331/p900384/raw\" # the folder to read data from, required\n",
"out_folder = \"/gpfs/exfel/data/scratch/ahmedk/test/gotthard2/darks\" # the folder to output to, required\n",
"metadata_folder = '' # Directory containing calibration_metadata.yml when run by xfel-calibrate\n",
"run_high = 7 # run number for G0 dark run, required\n",
"run_med = 8 # run number for G1 dark run, required\n",
"run_low = 9 # run number for G2 dark run, required\n",
"run_high = 61 # run number for G0 dark run, required\n",
"run_med = 62 # run number for G1 dark run, required\n",
"run_low = 63 # run number for G2 dark run, required\n",
"\n",
"# Parameters used to access raw data.\n",
"karabo_id = \"FXE_XAD_G2XES\" # karabo prefix of Gotthard-II devices\n",
"karabo_da = [\"GH201\"] # data aggregators\n",
"receiver_template = \"RECEIVER\" # receiver template used to read INSTRUMENT keys.\n",
"control_template = \"CONTROL\" # control template used to read CONTROL keys.\n",
"karabo_id = \"SA1_XTD9_HIREX\" # karabo prefix of Gotthard-II devices\n",
"karabo_da = [\"\"] # data aggregators\n",
"receiver_template = \"RECEIVER{}\" # receiver template used to read INSTRUMENT keys.\n",
"receiver_suffixes = [\"\"] # Exact receiver names. This can be used for GH2 25um when each receiver has a unique name. Leave empty to use the receiver_template instead.\n",
"control_template = \"GOTTHARD2_CTRL\" # control template used to read CONTROL keys.\n",
"ctrl_source_template = '{}/DET/{}' # template for control source name (filled with karabo_id_control)\n",
"karabo_id_control = \"\" # Control karabo ID. Set to empty string to use the karabo-id\n",
Author: European XFEL Detector Group, Version: 1.0
The following is a processing for the dark constants (`Offset`, `Noise`, and `BadPixelsDark`) maps using dark images taken with Gotthard2 detector (GH2 50um or 25um).
All constants are evaluated per strip, per pulse, and per memory cell. The maps are calculated for each gain stage that is acquired in 3 separate runs.
The three maps are of shape (stripes, cells, gains): (1280, 2, 3). They can be injected to the database (`db_output`) and/or stored locally (`local_output`).
%% Cell type:code id:818e24e8 tags:
``` python
in_folder="/gpfs/exfel/exp/FXE/202231/p900298/raw"# the folder to read data from, required
in_folder="/gpfs/exfel/exp/SA1/202331/p900384/raw"# the folder to read data from, required
out_folder="/gpfs/exfel/data/scratch/ahmedk/test/gotthard2/darks"# the folder to output to, required
metadata_folder=''# Directory containing calibration_metadata.yml when run by xfel-calibrate
run_high=7# run number for G0 dark run, required
run_med=8# run number for G1 dark run, required
run_low=9# run number for G2 dark run, required
run_high=61# run number for G0 dark run, required
run_med=62# run number for G1 dark run, required
run_low=63# run number for G2 dark run, required
# Parameters used to access raw data.
karabo_id="FXE_XAD_G2XES"# karabo prefix of Gotthard-II devices
karabo_da=["GH201"]# data aggregators
receiver_template="RECEIVER"# receiver template used to read INSTRUMENT keys.
control_template="CONTROL"# control template used to read CONTROL keys.
karabo_id="SA1_XTD9_HIREX"# karabo prefix of Gotthard-II devices
karabo_da=[""]# data aggregators
receiver_template="RECEIVER{}"# receiver template used to read INSTRUMENT keys.
receiver_suffixes=[""]# Exact receiver names. This can be used for GH2 25um when each receiver has a unique name. Leave empty to use the receiver_template instead.
control_template="GOTTHARD2_CTRL"# control template used to read CONTROL keys.
ctrl_source_template='{}/DET/{}'# template for control source name (filled with karabo_id_control)
karabo_id_control=""# Control karabo ID. Set to empty string to use the karabo-id
# Parameters for the calibration database.
cal_db_interface="tcp://max-exfl-cal001:8020"# calibration DB interface to use
cal_db_timeout=300000# timeout on caldb requests
creation_time=""# To overwrite the measured creation_time. Required Format: YYYY-MM-DD HR:MN:SC e.g. "2022-06-28 13:00:00"
db_output=False# Output constants to the calibration database
local_output=True# Output constants locally
# Conditions used for injected calibration constants.
bias_voltage=-1# Detector bias voltage, set to -1 to use value in raw file.
exposure_time=-1.# Detector exposure time, set to -1 to use value in raw file.
exposure_period=-1.# Detector exposure period, set to -1 to use value in raw file.
acquisition_rate=-1.# Detector acquisition rate (1.1/4.5), set to -1 to use value in raw file.
single_photon=-1# Detector single photon mode (High/Low CDS), set to -1 to use value in raw file.
# Parameters used during selecting raw data trains.
min_trains=1# Minimum number of trains that should be available to process dark constants. Default 1.
max_trains=1000# Maximum number of trains to use for processing dark constants. Set to 0 to use all available trains.
badpixel_threshold_sigma=5.# bad pixels defined by values outside n times this std from median
# Don't delete! myMDC sends this by default.
operation_mode=''# Detector dark run acquiring operation mode, optional
"karabo_id = \"DETLAB_25UM_GH2\" # karabo prefix of Gotthard-II devices\n",
"karabo_da = [\"\"] # data aggregators\n",
"receiver_template = \"RECEIVER\" # receiver template used to read INSTRUMENT keys.\n",
"receiver_template = \"RECEIVER{}\" # receiver template used to read INSTRUMENT keys.\n",
"receiver_suffixes = [\"\"]\n",
"control_template = \"CONTROL\" # control template used to read CONTROL keys.\n",
"ctrl_source_template = \"{}/DET/{}\" # template for control source name (filled with karabo_id_control)\n",
"karabo_id_control = \"\" # Control karabo ID. Set to empty string to use the karabo-id\n",
"corr_data_source = \"{}/CORR/{}:daqOutput\" # Correction data source. filled with karabo_id and correction receiver\n",
"corr_receiver = \"\" # The name of the correction receiver name. Leave empty for using the same receiver name for the 50um GH2 or the first(Master) receiver for the 25um GH2.\n",
"\n",
"# Parameters for calibration database.\n",
"cal_db_interface = \"tcp://max-exfl-cal001:8016#8025\" # the database interface to use.\n",
...
...
@@ -234,11 +236,13 @@
"print(f\"Process modules: {db_modules} for run {run}\")\n",
in_folder="/gpfs/exfel/exp/DETLAB/202330/p900326/raw"# the folder to read data from, required
out_folder="/gpfs/exfel/data/scratch/ahmedk/test/gotthard2"# the folder to output to, required
metadata_folder=""# Directory containing calibration_metadata.yml when run by xfel-calibrate
run=20# run to process, required
sequences=[-1]# sequences to correct, set to [-1] for all, range allowed
sequences_per_node=1# number of sequence files per node if notebook executed through xfel-calibrate, set to 0 to not run SLURM parallel
# Parameters used to access raw data.
karabo_id="DETLAB_25UM_GH2"# karabo prefix of Gotthard-II devices
karabo_da=[""]# data aggregators
receiver_template="RECEIVER"# receiver template used to read INSTRUMENT keys.
receiver_template="RECEIVER{}"# receiver template used to read INSTRUMENT keys.
receiver_suffixes=[""]
control_template="CONTROL"# control template used to read CONTROL keys.
ctrl_source_template="{}/DET/{}"# template for control source name (filled with karabo_id_control)
karabo_id_control=""# Control karabo ID. Set to empty string to use the karabo-id
corr_data_source="{}/CORR/{}:daqOutput"# Correction data source. filled with karabo_id and correction receiver
corr_receiver=""# The name of the correction receiver name. Leave empty for using the same receiver name for the 50um GH2 or the first(Master) receiver for the 25um GH2.
# Parameters for calibration database.
cal_db_interface="tcp://max-exfl-cal001:8016#8025"# the database interface to use.
cal_db_timeout=180000# timeout on caldb requests.
creation_time=""# To overwrite the measured creation_time. Required Format: YYYY-MM-DD HR:MN:SC e.g. "2022-06-28 13:00:00"
# Parameters affecting corrected data.
constants_file=""# Use constants in given constant file path. /gpfs/exfel/data/scratch/ahmedk/dont_remove/gotthard2/constants/calibration_constants_GH2.h5
offset_correction=True# apply offset correction. This can be disabled to only apply LUT or apply LUT and gain correction for non-linear differential results.
gain_correction=True# apply gain correction.
chunks_data=1# HDF chunk size for pixel data in number of frames.
# Parameter conditions.
bias_voltage=-1# Detector bias voltage, set to -1 to use value in raw file.
exposure_time=-1.# Detector exposure time, set to -1 to use value in raw file.
exposure_period=-1.# Detector exposure period, set to -1 to use value in raw file.
acquisition_rate=-1.# Detector acquisition rate (1.1/4.5), set to -1 to use value in raw file.
single_photon=-1# Detector single photon mode (High/Low CDS), set to -1 to use value in raw file.
# Parameters for plotting
skip_plots=False# exit after writing corrected files
pulse_idx_preview=3# pulse index to preview. The following even/odd pulse index is used for preview. # TODO: update to pulseId preview.