The following code analyzes a set of dark images taken with the DSSC detector to deduce detector offsets and noise. Data for the detector is presented in one run and don't acquire multiple gain stages.
The notebook explicitely does what pyDetLib provides in its offset calculation method for streaming data.
%% Cell type:code id: tags:
``` python
cluster_profile="noDB"# The ipcluster profile to use
in_folder="/gpfs/exfel/exp/SCS/202030/p900125/raw"# path to input data, required
<<<<<<<HEAD
out_folder="/gpfs/exfel/data/scratch/ahmedk/test/DSSC"# path to output to, required
=======
out_folder="/gpfs/exfel/data/scratch/samartse/test/"# path to output to, required
>>>>>>>modifiednotebookforDSSCspecifics
sequences=[0]# sequence files to evaluate.
modules=[-1]# modules to run for
run=222# run numbr in which data was recorded, required
<<<<<<<HEAD
karabo_id="SCS_DET_DSSC1M-1"# karabo karabo_id
karabo_da=['-1']# a list of data aggregators names, Default [-1] for selecting all data aggregators
receiver_id="{}CH0"# inset for receiver devices
path_template='RAW-R{:04d}-{}-S{:05d}.h5'# the template to use to access data
h5path='/INSTRUMENT/{}/DET/{}:xtdf/image'# path in the HDF5 file to images
h5path_idx='/INDEX/{}/DET/{}:xtdf/image'# path in the HDF5 file to images
=======
run=203# run number in which data was recorded, required
>>>>>>>modifiednotebookforDSSCspecifics
use_dir_creation_date=True# use the dir creation date for determining the creation time
cal_db_interface="tcp://max-exfl016:8020"# the database interface to use
cal_db_timeout=3000000# timeout on caldb requests"
local_output=True# output constants locally
<<<<<<<HEAD
db_output=False# output constants to database
mem_cells=0# number of memory cells used, set to 0 to automatically infer
bias_voltage=300# detector bias voltage
=======
db_output=True# output constants to database
bias_voltage=100# detector bias voltage
cal_db_interface="tcp://max-exfl016:8020"# the database interface to use
>>>>>>>modifiednotebookforDSSCspecifics
rawversion=2# RAW file format version
thresholds_offset_sigma=3.# thresholds in terms of n sigma noise for offset deduced bad pixels
thresholds_offset_hard=[4,125]# thresholds in absolute ADU terms for offset deduced bad pixels
thresholds_noise_sigma=5.# thresholds in terms of n sigma noise for offset deduced bad pixels
thresholds_noise_hard=[0.1,10]# thresholds in absolute ADU terms for offset deduced bad pixels
offset_numpy_algorithm="mean"
instrument="SCS"# the instrument
<<<<<<<HEAD
high_res_badpix_3d=False# set this to True if you need high-resolution 3d bad pixel plots. Runtime: ~ 1h
=======
high_res_badpix_3d=False# set this to True if you need high-resolution 3d bad pixel plots. Runtime: ~ 1h
The calculation is performed per-pixel and per-memory-cell. Offsets are simply the median value for a set of dark data taken at a given gain, noise the standard deviation, and gain-bit values the medians of the gain array.
The following tables show summary information for the evaluated module. Values for currently evaluated constants are compared with values for pre-existing constants retrieved from the calibration database.