Author: European XFEL Detector Group, Version: 1.0
Author: European XFEL Detector Group, Version: 1.0
Offline Calibration for the AGIPD Detector
Offline Calibration for the AGIPD Detector
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
in_folder="/gpfs/exfel/exp/MID/201931/p900107/raw"# the folder to read data from, required
in_folder="/gpfs/exfel/exp/MID/201931/p900107/raw"# the folder to read data from, required
run=11# runs to process, required
run=11# runs to process, required
out_folder="/gpfs/exfel/data/scratch/ahmedk/test/AGIPD_Corr"# the folder to output to, required
out_folder="/gpfs/exfel/data/scratch/ahmedk/test/AGIPD_Corr"# the folder to output to, required
calfile="/gpfs/exfel/data/scratch/haufs/agipd_on_demand/agipd_store_mid.h5"# path to calibration file. Leave empty if all data should come from DB
calfile="/gpfs/exfel/data/scratch/haufs/agipd_on_demand/agipd_store_mid.h5"# path to calibration file. Leave empty if all data should come from DB
sequences=[-1]# sequences to correct, set to -1 for all, range allowed
sequences=[-1]# sequences to correct, set to -1 for all, range allowed
mem_cells=0# number of memory cells used, set to 0 to automatically infer
mem_cells=0# number of memory cells used, set to 0 to automatically infer
interlaced=False# whether data is in interlaced layout
interlaced=False# whether data is in interlaced layout
overwrite=True# set to True if existing data should be overwritten
overwrite=True# set to True if existing data should be overwritten
relative_gain=False# do relative gain correction
relative_gain=False# do relative gain correction
cluster_profile="noDB"
cluster_profile="noDB"
max_pulses=[0,500,1]# range list [st, end, step] of maximum pulse indices. 3 allowed maximum list input elements.
max_pulses=[0,500,1]# range list [st, end, step] of maximum pulse indices. 3 allowed maximum list input elements.
local_input=False
local_input=False
bias_voltage=300
bias_voltage=300
cal_db_interface="tcp://max-exfl016:8015#8045"# the database interface to use
cal_db_interface="tcp://max-exfl016:8015#8045"# the database interface to use
use_dir_creation_date=True# use the creation data of the input dir for database queries
use_dir_creation_date=True# use the creation data of the input dir for database queries
sequences_per_node=2# number of sequence files per cluster node if run as slurm job, set to 0 to not run SLURM parallel
sequences_per_node=2# number of sequence files per cluster node if run as slurm job, set to 0 to not run SLURM parallel
photon_energy=9.2# photon energy in keV
photon_energy=9.2# photon energy in keV
index_v=2# version of RAW index type
index_v=2# version of RAW index type
nodb=False# if set only file-based constants will be used
nodb=False# if set only file-based constants will be used
blc_noise_threshold=5000# above this mean signal intensity now baseline correction via noise is attempted
blc_noise_threshold=5000# above this mean signal intensity now baseline correction via noise is attempted
blc_hist=False# if set, base line correction via histogram matching is attempted
blc_hist=False# if set, base line correction via histogram matching is attempted
corr_asic_diag=False# if set, diagonal drop offs on ASICs are correted
corr_asic_diag=False# if set, diagonal drop offs on ASICs are correted
melt_snow=""# if set to "none" snowy pixels are identified and resolved to NaN, if set to "interpolate", the value is interpolated from neighbouring pixels
melt_snow=""# if set to "none" snowy pixels are identified and resolved to NaN, if set to "interpolate", the value is interpolated from neighbouring pixels
cal_db_timeout=30000# in milli seconds
cal_db_timeout=30000# in milli seconds
max_cells_db_dark=0# set to a value different than 0 to use this value for dark data DB queries
max_cells_db_dark=0# set to a value different than 0 to use this value for dark data DB queries
max_cells_db=0# set to a value different than 0 to use this value for DB queries
max_cells_db=0# set to a value different than 0 to use this value for DB queries
chunk_size_idim=1# chunking size of imaging dimension, adjust if user software is sensitive to this.
chunk_size_idim=1# chunking size of imaging dimension, adjust if user software is sensitive to this.
creation_date_offset="00:00:00"# add an offset to creation date, e.g. to get different constants
creation_date_offset="00:00:00"# add an offset to creation date, e.g. to get different constants
instrument="MID"# the instrument the detector is installed at, required
instrument="MID"# the instrument the detector is installed at, required
force_hg_if_below=1000# set to a value other than 0 to force a pixel into high gain if it's high gain offset subtracted value is below this threshold
force_hg_if_below=1000# set to a value other than 0 to force a pixel into high gain if it's high gain offset subtracted value is below this threshold
force_mg_if_below=1000# set to a value other than 0 to force a pixel into medium gain if it's medium gain offset subtracted value is below this threshold
force_mg_if_below=1000# set to a value other than 0 to force a pixel into medium gain if it's medium gain offset subtracted value is below this threshold
mask_noisy_adc=0.25# set to a value other than 0 and below 1 to mask entire ADC if fraction of noisy pixels is above
mask_noisy_adc=0.25# set to a value other than 0 and below 1 to mask entire ADC if fraction of noisy pixels is above
acq_rate=0.# the detector acquisition rate, use 0 to try to auto-determine
acq_rate=0.# the detector acquisition rate, use 0 to try to auto-determine
# Correction Booleans
# Correction Booleans
only_offset=False# Apply only Offset correction.
only_offset=False# Apply only Offset correction.
pc_corr=False# Apply only Pulse Capictor correction.
pc_corr=False# Apply only Pulse Capictor correction.
ff_corr=False# Apply only Flat Field correction.
ff_corr=False# Apply only Flat Field correction.
blc_noise=False# if set, baseline correction via noise peak location is attempted
blc_noise=False# if set, baseline correction via noise peak location is attempted
match_asics=False# if set, inner ASIC borders are matched to the same signal level
match_asics=False# if set, inner ASIC borders are matched to the same signal level
adjust_mg_baseline=False# adjust medium gain baseline to match highest high gain value
adjust_mg_baseline=False# adjust medium gain baseline to match highest high gain value
dont_zero_nans=False# do not zero NaN values in corrected data
dont_zero_nans=False# do not zero NaN values in corrected data
dont_zero_orange=False# do not zero very negative and very large values
dont_zero_orange=False# do not zero very negative and very large values