"_ = ax.set_title(\"Corrected data, mean across one train\")"
"_ = ax.set_title(\"Corrected data, mean across one train\")"
]
]
...
...
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# Gain Characterization Summary #
# Gain Characterization Summary #
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
in_folder=""# in this notebook, in_folder is not used as the data source is in the destination folder
in_folder=""# in this notebook, in_folder is not used as the data source is in the destination folder
out_folder=""# the folder to output to, required
out_folder=""# the folder to output to, required
hist_file_template="hists_m{:02d}_sum.h5"
hist_file_template="hists_m{:02d}_sum.h5"
proc_folder=""# Path to corrected image data used to create histograms and validation plots
proc_folder=""# Path to corrected image data used to create histograms and validation plots
raw_folder="/gpfs/exfel/exp/MID/202030/p900137/raw"# folder of raw data. This is used to save information of source data of generated constants, required
raw_folder="/gpfs/exfel/exp/MID/202030/p900137/raw"# folder of raw data. This is used to save information of source data of generated constants, required
run=449# runs of image data used to create histograms
run=449# runs of image data used to create histograms
karabo_id="MID_DET_AGIPD1M-1"# karabo karabo_id
karabo_id="MID_DET_AGIPD1M-1"# karabo karabo_id
receiver_id="{}CH0"# inset for receiver devices
receiver_id="{}CH0"# inset for receiver devices
path_template='RAW-R{:04d}-{}-S{:05d}.h5'# the template to use to access data
path_template='RAW-R{:04d}-{}-S{:05d}.h5'# the template to use to access data
h5path='INSTRUMENT/{}/DET/{}:xtdf/'# path in the HDF5 file to images
h5path='INSTRUMENT/{}/DET/{}:xtdf/'# path in the HDF5 file to images
h5path_idx='INDEX/{}/DET/{}:xtdf/'# path in the HDF5 file to images
h5path_idx='INDEX/{}/DET/{}:xtdf/'# path in the HDF5 file to images
h5path_ctrl='/CONTROL/{}/MDL/FPGA_COMP'# path to control information
h5path_ctrl='/CONTROL/{}/MDL/FPGA_COMP'# path to control information
karabo_id_control="MID_IRU_AGIPD1M1"# karabo-id for control device
karabo_id_control="MID_IRU_AGIPD1M1"# karabo-id for control device
karabo_da_control='AGIPD1MCTRL00'# karabo DA for control infromation
karabo_da_control='AGIPD1MCTRL00'# karabo DA for control infromation
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
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
cal_db_timeout=30000# in milli seconds
cal_db_timeout=30000# in milli seconds
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
# Fit parameters
# Fit parameters
peak_range=[-30,30,35,65,80,130,145,200]# where to look for the peaks, [a0, b0, a1, b1, ...] exactly 8 elements
peak_range=[-30,30,35,65,80,130,145,200]# where to look for the peaks, [a0, b0, a1, b1, ...] exactly 8 elements
peak_width_range=[0,30,0,35,0,40,0,45]# fit limits on the peak widths, [a0, b0, a1, b1, ...] exactly 8 elements
peak_width_range=[0,30,0,35,0,40,0,45]# fit limits on the peak widths, [a0, b0, a1, b1, ...] exactly 8 elements
# Bad-pixel thresholds
# Bad-pixel thresholds
d0_lim=[10,70]# hard limits for d0 value (distance between noise and first peak)
d0_lim=[10,70]# hard limits for d0 value (distance between noise and first peak)
peak_width_lim=[0.97,1.43,1.03,1.57]# hard limits on the peak widths, [a0, b0, a1, b1, ...] in units of the noise peak. 4 parameters.
peak_width_lim=[0.97,1.43,1.03,1.57]# hard limits on the peak widths, [a0, b0, a1, b1, ...] in units of the noise peak. 4 parameters.
chi2_lim=[0,3.0]# Hard limit on chi2/nDOF value
chi2_lim=[0,3.0]# Hard limit on chi2/nDOF value
gain_lim=[0.80,1.2]# Threshold on gain in relative number. Contribute to BadPixel bit "Gain_deviation"
gain_lim=[0.80,1.2]# Threshold on gain in relative number. Contribute to BadPixel bit "Gain_deviation"
cell_range=[1,5]# range of cell to be considered, [0,0] for all
cell_range=[1,5]# range of cell to be considered, [0,0] for all
pixel_range=[0,0,512,128]# range of pixels x1,y1,x2,y2 to consider [0,0,512,128] for all
pixel_range=[0,0,512,128]# range of pixels x1,y1,x2,y2 to consider [0,0,512,128] for all
max_bins=250# Maximum number of bins to consider
max_bins=250# Maximum number of bins to consider
batch_size=[1,8,8]# batch size: [cell,x,y]
batch_size=[1,8,8]# batch size: [cell,x,y]
n_peaks_fit=4# Number of gaussian peaks to fit including noise peak
n_peaks_fit=4# Number of gaussian peaks to fit including noise peak
fix_peaks=True# Fix distance between photon peaks
fix_peaks=True# Fix distance between photon peaks
# Detector conditions
# Detector conditions
max_cells=0# number of memory cells used, set to 0 to automatically infer
max_cells=0# number of memory cells used, set to 0 to automatically infer
bias_voltage=300# Bias voltage
bias_voltage=300# Bias voltage
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
gain_setting=0.1# the gain setting, use 0.1 to try to auto-determine
gain_setting=0.1# the gain setting, use 0.1 to try to auto-determine
photon_energy=8.05# photon energy in keV
photon_energy=8.05# photon energy in keV
integration_time=-1# integration time, negative values for auto-detection.
integration_time=-1# integration time, negative values for auto-detection.