Author: European XFEL Detector Group, Version: 1.0
Author: European XFEL Detector Group, Version: 1.0
The following is a processing for offset, noise, and Badpixels maps using dark images taken with Gotthard2 detector.
The following is a processing for offset, noise, and Badpixels maps using dark images taken with Gotthard2 detector.
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.
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 (calibration constants) can be injected to the database and stored locally.
The three maps (calibration constants) can be injected to the database and stored locally.
%% Cell type:code id:818e24e8 tags:
%% Cell type:code id:818e24e8 tags:
``` python
``` python
in_folder="/gpfs/exfel/exp/FXE/202231/p900298/raw"# the folder to read data from, required
in_folder="/gpfs/exfel/exp/FXE/202231/p900298/raw"# the folder to read data from, required
out_folder="/gpfs/exfel/data/scratch/ahmedk/test/gotthard2/darks"# the folder to output to, required
out_folder="/gpfs/exfel/data/scratch/ahmedk/test/gotthard2/darks"# the folder to output to, required
run_high=7# run number for G0 dark run, required
run_high=7# run number for G0 dark run, required
run_med=8# run number for G1 dark run, required
run_med=8# run number for G1 dark run, required
run_low=9# run number for G2 dark run, required
run_low=9# run number for G2 dark run, required
# Parameters used to access raw data.
# Parameters used to access raw data.
karabo_id="FXE_XAD_G2XES"# karabo prefix of Gotthard-II devices
karabo_id="FXE_XAD_G2XES"# karabo prefix of Gotthard-II devices
karabo_da=["GH201"]# data aggregators
karabo_da=["GH201"]# data aggregators
receiver_template="RECEIVER"# receiver template used to read INSTRUMENT keys.
receiver_template="RECEIVER"# receiver template used to read INSTRUMENT keys.
control_template="CONTROL"# control template used to read CONTROL keys.
control_template="CONTROL"# control template used to read CONTROL keys.
instrument_source_template='{}/DET/{}:daqOutput'# template for source name (filled with karabo_id & receiver_id). e.g. 'SPB_IRDA_JF4M/DET/JNGFR01:daqOutput' # noqa
instrument_source_template='{}/DET/{}:daqOutput'# template for source name (filled with karabo_id & receiver_id). e.g. 'SPB_IRDA_JF4M/DET/JNGFR01:daqOutput' # noqa
ctrl_source_template='{}/DET/{}'# template for control source name (filled with karabo_id_control)
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
karabo_id_control=""# Control karabo ID. Set to empty string to use the karabo-id
# Parameters for the calibration database.
# Parameters for the calibration database.
use_dir_creation_date=True
use_dir_creation_date=True
cal_db_interface="tcp://max-exfl016:8020"# calibration DB interface to use
cal_db_interface="tcp://max-exfl016:8020"# calibration DB interface to use
cal_db_timeout=300000# timeout on caldb requests
cal_db_timeout=300000# timeout on caldb requests
overwrite_creation_time=""# To overwrite the measured creation_time. Required Format: YYYY-MM-DD HR:MN:SC.00 e.g. "2022-06-28 13:00:00.00"
overwrite_creation_time=""# To overwrite the measured creation_time. Required Format: YYYY-MM-DD HR:MN:SC.00 e.g. "2022-06-28 13:00:00.00"
db_output=False# Output constants to the calibration database
db_output=False# Output constants to the calibration database
local_output=True# Output constants locally
local_output=True# Output constants locally
# Conditions used for injected calibration constants.
# Conditions used for injected calibration constants.
bias_voltage=-1# Detector bias voltage, set to -1 to use value in raw file.
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_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.
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.
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.
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.
# Parameters used during selecting raw data trains.
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.
max_trains=1000# Maximum number of trains to use for processing dark constants. Set to 0 to use all available trains.
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
badpixel_threshold_sigma=5.# bad pixels defined by values outside n times this std from median
# Don't delete! myMDC sends this by default.
# Don't delete! myMDC sends this by default.
operation_mode=''# Detector dark run acquiring operation mode, optional
operation_mode=''# Detector dark run acquiring operation mode, optional