" step_timer.done_step(f'Creating Offset and noise constants for a module.')"
" step_timer.done_step(f'Creating Offset and noise constants for a module.')"
]
]
},
},
...
...
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# Jungfrau Dark Image Characterization #
# Jungfrau Dark Image Characterization #
Author: European XFEL Detector Group, Version: 2.0
Author: European XFEL Detector Group, Version: 2.0
Analyzes Jungfrau dark image data to deduce offset, noise and resulting bad pixel maps
Analyzes Jungfrau dark image data to deduce offset, noise and resulting bad pixel maps
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
in_folder='/gpfs/exfel/exp/SPB/202130/p900204/raw/'# folder under which runs are located, required
in_folder='/gpfs/exfel/exp/SPB/202130/p900204/raw/'# folder under which runs are located, required
out_folder='/gpfs/exfel/data/scratch/ahmedk/test/remove'# path to place reports at, required
out_folder='/gpfs/exfel/data/scratch/ahmedk/test/remove'# path to place reports at, required
metadata_folder=''# Directory containing calibration_metadata.yml when run by xfel-calibrate
metadata_folder=''# Directory containing calibration_metadata.yml when run by xfel-calibrate
run_high=141# run number for G0 dark run, required
run_high=141# run number for G0 dark run, required
run_med=142# run number for G1 dark run, required
run_med=142# run number for G1 dark run, required
run_low=143# run number for G2 dark run, required
run_low=143# run number for G2 dark run, required
# Parameters used to access raw data.
# Parameters used to access raw data.
karabo_da=['JNGFR01','JNGFR02','JNGFR03','JNGFR04','JNGFR05','JNGFR06','JNGFR07','JNGFR08']# list of data aggregators, which corresponds to different JF modules
karabo_da=['JNGFR01','JNGFR02','JNGFR03','JNGFR04','JNGFR05','JNGFR06','JNGFR07','JNGFR08']# list of data aggregators, which corresponds to different JF modules
karabo_id='SPB_IRDA_JF4M'# karabo_id (detector identifier) prefix of Jungfrau detector to process.
karabo_id='SPB_IRDA_JF4M'# karabo_id (detector identifier) prefix of Jungfrau detector to process.
karabo_id_control=''# if control is on a different ID, set to empty string if it is the same a karabo-id
karabo_id_control=''# if control is on a different ID, set to empty string if it is the same a karabo-id
receiver_template='JNGFR{:02}'# inset for receiver devices
receiver_template='JNGFR{:02}'# inset for receiver devices
instrument_source_template='{}/DET/{}:daqOutput'# template for instrument source name (filled with karabo_id & receiver_id). e.g. 'SPB_IRDA_JF4M/DET/JNGFR01:daqOutput'
instrument_source_template='{}/DET/{}:daqOutput'# template for instrument 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)
ctrl_source_template='{}/DET/CONTROL'# template for control source name (filled with karabo_id_control)
# Parameters for calibration database and storing constants.
# Parameters for calibration database and storing constants.
use_dir_creation_date=True# use dir creation date
use_dir_creation_date=True# use dir creation date
cal_db_interface='tcp://max-exfl016:8016#8045'# calibrate db interface to connect to
cal_db_interface='tcp://max-exfl016:8016#8045'# calibrate db interface to connect to
cal_db_timeout=300000# timeout on caldb requests
cal_db_timeout=300000# timeout on caldb requests
local_output=True# output constants locally
local_output=True# output constants locally
db_output=False# output constants to database
db_output=False# output constants to database
# Parameters affecting creating dark calibration constants.
# Parameters affecting creating dark calibration constants.
badpixel_threshold_sigma=5.# bad pixels defined by values outside n times this std from median
badpixel_threshold_sigma=5.# bad pixels defined by values outside n times this std from median
offset_abs_threshold_low=[1000,10000,10000]# absolute bad pixel threshold in terms of offset, lower values
offset_abs_threshold_low=[1000,10000,10000]# absolute bad pixel threshold in terms of offset, lower values
offset_abs_threshold_high=[8000,15000,15000]# absolute bad pixel threshold in terms of offset, upper values
offset_abs_threshold_high=[8000,15000,15000]# absolute bad pixel threshold in terms of offset, upper values
max_trains=0# Maximum trains to process darks. Set to 0 to process all available train images.
max_trains=0# Maximum trains to process darks. Set to 0 to process all available train images.
min_trains=1# Minimum number of trains that should be available to process dark constants. Default 1.
min_trains=1# Minimum number of trains that should be available to process dark constants. Default 1.
manual_slow_data=False# if true, use manually entered bias_voltage and integration_time values
manual_slow_data=False# if true, use manually entered bias_voltage and integration_time values
time_limits=0.025# to find calibration constants later on, the integration time is allowed to vary by 0.5 us
time_limits=0.025# to find calibration constants later on, the integration time is allowed to vary by 0.5 us
# Parameters to be used for injecting dark calibration constants.
# Parameters to be used for injecting dark calibration constants.
integration_time=1000# integration time in us, will be overwritten by value in file
integration_time=1000# integration time in us, will be overwritten by value in file
gain_setting=0# 0 for dynamic, forceswitchg1, forceswitchg2, 1 for dynamichg0, fixgain1, fixgain2. Will be overwritten by value in file
gain_setting=0# 0 for dynamic, forceswitchg1, forceswitchg2, 1 for dynamichg0, fixgain1, fixgain2. Will be overwritten by value in file
gain_mode=0# 1 if medium and low runs are fixgain1 and fixgain2, otherwise 0. It will be overwritten by value in file, if manual_slow_data
gain_mode=0# 1 if medium and low runs are fixgain1 and fixgain2, otherwise 0. It will be overwritten by value in file, if manual_slow_data
bias_voltage=90# sensor bias voltage in V, will be overwritten by value in file
bias_voltage=90# sensor bias voltage in V, will be overwritten by value in file
memory_cells=16# number of memory cells
memory_cells=16# number of memory cells
# Parameters used for plotting
# Parameters used for plotting
detailed_report=False
detailed_report=False
# TODO: this is used for only Warning check at AGIPD dark.
# TODO: this is used for only Warning check at AGIPD dark.
# Need to rethink if it makes sense to use it here as well.
# Need to rethink if it makes sense to use it here as well.