Author: European XFEL Detector Group, Version: 2.0
Offline Calibration for the Jungfrau Detector
%% Cell type:code id: tags:
``` python
in_folder="/gpfs/exfel/exp/HED/202331/p900360/raw"# the folder to read data from, required
out_folder="/gpfs/exfel/data/scratch/ahmedk/test/remove/jungfrau"# the folder to output to, required
run=20# run to process, required
metadata_folder=""# Directory containing calibration_metadata.yml when run by xfel-calibrate
sequences=[-1]# sequences to correct, set to [-1] for all, range allowed
sequences_per_node=1# number of sequence files per cluster node if run as slurm job, set to 0 to not run SLURM parallel
# Parameters used to access raw data.
karabo_id="HED_IA1_JF500K4"# karabo prefix of Jungfrau devices
karabo_da=['JNGFR04']# data aggregators
receiver_template="JNGFR{:02d}"# Detector receiver template for accessing raw data files. e.g. "JNGFR{:02d}"
instrument_source_template='{}/DET/{}:daqOutput'# template for source name (filled with karabo_id & receiver_id). e.g. 'SPB_IRDA_JF4M/DET/JNGFR01:daqOutput'
ctrl_source_template='{}/DET/CONTROL'# template for control source name (filled with karabo_id_control)
karabo_id_control=""# if control is on a different ID, set to empty string if it is the same a karabo-id
# Parameters for calibration database.
cal_db_interface="tcp://max-exfl-cal001:8017#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.
relative_gain=True# do relative gain correction.
strixel_sensor=""# reordering for strixel detector layout. Possible strixels to choose from are A0123 and A1256.
strixel_double_norm=2.0# normalization to use for double-size pixels, only applied for strixel sensors.
limit_trains=0# ONLY FOR TESTING. process only first N trains, Use 0 to process all.
chunks_ids=32# HDF chunk size for memoryCell and frameNumber.
chunks_data=1# HDF chunk size for pixel data in number of frames.
wrong_gain_pixels=[-1]# List of 5 values (e.g. [4, 0, 255, 896, 1024]) defining the module number (4 for JNGFR04). And using the indexes of the FEM row [pixel_x_0:pixel_x_1] and column [pixel_y_0:pixel_y_1]. Set to -1 to not pick pixels for gain replacement.
replace_wrong_gain_value=0# Force gain value into the chosen gain [0, 1, or 2] for pixels specified in `wrong_gain_pixels`. This has no effect if wrong_gain_pixels = [-1]
# Parameters for retrieving calibration constants
integration_time=-1# integration time in us. set to -1 to overwrite by value in file.
gain_setting=-1# 0 for dynamic gain, 1 for dynamic HG0. set to -1 to overwrite by value in file.
gain_mode=-1# 0 for runs with dynamic gain setting, 1 for fixed gain. Set to -1 to overwrite by value in file.
mem_cells=-1# Set mem_cells to -1 to automatically use the value stored in RAW data.
bias_voltage=-1# Bias Voltage. Set to -1 to overwrite by value in file.
# Parameters for plotting
skip_plots=False# exit after writing corrected files
plot_trains=500# Number of trains to plot for RAW and CORRECTED plots. Set to -1 to automatically plot all trains.
cell_id_preview=15# cell Id used for preview in single-shot plots
# Parameters for ROI selection and reduction
roi_definitions=[-1]# List with groups of 6 values defining ROIs, e.g. [3, 120, 180, 200, 550, -2] for module 3 (JNGFR03), slice 120:180, 200:550, average along axis -2 (slow scan, or -1 for fast scan)
roi_threshold=2.# Corrected pixels below the threshold will be excluded from ROI projections. Set to -1 to include all pixels.