Content
Jungfrau 0.5M, 1M, 4M
photo from https://lcls.slac.stanford.edu/detectors/jungfrau
photo from Kaz on 2020-10-04
Information from Philip
Test runs
3/6/2017 Philip: The data is in cxi11216. There is one tile. I appear to be using runs 9,
11, and 12 as pedestals for gain 0, 1, 2. Runs 18-22 have some data,
which is highly non-optimal; we have better stuff but in a painful format.
First look at 1-st event of exp=cxi11216:run=40
Philip's code in /reg/neh/home/philiph/psana/jungfrau/singleModule/makeTuple.py (copy on 2017-05-10)
Dark runs processing
Command to process dark runs: jungfrau_ndarr_dark_proc, e.g.
jungfrau_ndarr_dark_proc -h jungfrau_ndarr_dark_proc -d exp=cxi11216:run=9,11,12:smd -s CxiEndstation.0:Jungfrau.0 -n 2000 -u
Correction
det.calib method is used to get Jungfrau calibrated data. Implementation in Detector/UtilsJungfrau.py
Apply pedestals' correction to the same data which were used for calibration of cxi11216, run 9,11,12, use "working" part of the segment:
img.shape = (512,1024)
img = img[:512,:]
Run 9, gain 0
- raw:
- calib:
- common mode corrections in half-rows and columns for gain0 pixel as mask:
Run 11, gain 2
- raw:
- calib:
Run 12, gain 1
- raw:
- calib:
Default gain factors
Script jungfrau_deploy_constants
deploys gain constants as explained in Jungfrau and Epix10ka Calibration with default gain factors listed in table
Gain range | Default gain, ADU/keV | Averaged of pixel gains from file |
---|---|---|
0 | 41.5 | /reg/g/psdm/detector/gains/jungfrau/MDEF/g0_gain.npy |
1 | -1.39 | /reg/g/psdm/detector/gains/jungfrau/MDEF/g1_gain.npy |
2 | -0.11 | /reg/g/psdm/detector/gains/jungfrau/MDEF/g2_gain.npy |
Geometry
Segment/detector geometry is explained in 2017-10-11-JF-sensor-layout.pdf
Basic segment geometry is implemented in PSCalib.SegGeometryJungfrauV1.py
mask of edges:
Calibration constants
Example of geometry constants for 1-segment detector is in
/reg/g/psdm/detector/alignment/jungfrau/
calib/Jungfrau::CalibV1/CxiEndstation.0:Jungfrau.0/geometry/1-end.data
Gungfrau 4M geometry
2020-01-13 drawing from Rebecca: LCL5004-007815_Sheet3.pdf
Script in LCLS psana: Detector/examples/ex_jungfrau_seg_coordinates.py
Jungfrau 4M image
/reg/d/psdm/DET/detdaq17/calib/Jungfrau::CalibV1/DetLab.0:Jungfrau.2/geometry/1-end.data (panels in geometry swapped after det.raw)
imajes of det.raw, det.calib, and sequentially numerated pixels for (8,512,1024)
Ex: Detector/examples/ex_jungfrau_images.py 41 and 42
Detector interface
Calibration constant types
Detector interface expects to find constant in calib directory of few types:
pedestals
- from dark runs processingpixel_status
- from dark runs processingpixel_gain
- supplied by Philippixel_offset
- supplied by Philippixel_mask
- user defined ROI maskgeometry - in
/reg/g/psdm/detector/alignment/jungfrau/
Examples
- Detector/examples/ex_jungfrau_det.py
- Detector/examples/ex_jungfrau_raw_plot.py
- Detector/examples/ex_jungfrau_ipython.py
- PSCalib/src/SegGeometryStore.py 5
- PSCalib/src/SegGeometryJungfrauV1.py [0,...6]
Data type and shape
- raw data: shape:(1, 512, 1024) size:524288 dtype:uint16
- calib data: shape:(1, 512, 1024) size:524288 dtype:float32
- mask: shape:(1, 512, 1024) size:524288 dtype:uint8
- status_as_mask: shape:(1, 512, 1024) size:524288 dtype:uint8
- mask_geo: shape:(1, 512, 1024) size:524288 dtype:uint8
- mask_calib: shape:(1, 512, 1024) size:524288 dtype:uint8
- pedestals: shape:(3, 1, 512, 1024) size:1572864 dtype:float32
- rms: shape:(3, 1, 512, 1024) size:1572864 dtype:float32
- gain: shape:(3, 1, 512, 1024) size:1572864 dtype:float32
- offset: shape:(3, 1, 512, 1024) size:1572864 dtype:float32
- datast: shape:(3, 1, 512, 1024) size:1572864 dtype:uint16
- status: shape:(3, 1, 512, 1024) size:1572864 dtype:uint16
- coords_x: shape:(1, 512, 1024) size:524288 dtype:float64
- coords_y: shape:(1, 512, 1024) size:524288 dtype:float64
- area: shape:(1, 512, 1024) size:524288 dtype:float64
- image (calibrated data or raw): shape:(514, 1030) size:529420 dtype:float32
- image_xaxis: shape:(514,) size:514 dtype:float64
- image_yaxis: shape:(1030,) size:1030 dtype:float64
- common_mod: shape:(16,) size:16 dtype:float64 [ 7. 1. 100. 0. 0.]
1M Jungfrau test
Code fix
Add V2 of data and configuration objects
Dark run processing
Philip wrote:
xcsx22015 run 513. I see gain 0 and 1. 508, 509, 510: normal, forced gain1, forced gain2 dark runs 516, 517, 518: ditto
jungfrau_ndarr_dark_proc -d exp=xcsx22015:run=503,504,505:smd -s XcsEndstation.0:Jungfrau.0 -u jungfrau_ndarr_dark_proc -d exp=xcsx22015:run=508,509,510:smd -s XcsEndstation.0:Jungfrau.0 -u jungfrau_ndarr_dark_proc -d exp=xcsx22015:run=516,517,518:smd -s XcsEndstation.0:Jungfrau.0 -u
Constants of types
- pedestals
- pixel_max
- pixel_min
- pixel_rms
- pixel_status
are deployed in
/reg/d/psdm/xcs/xcsx22015/calib/Jungfrau::CalibV1/XcsEndstation.0:Jungfrau.0/
- geometry - is also deployed for two segments. Sensor orientation may need to be tuned.
Constants of
- pixel_gain
- pixel_offset
were merged from Philip's files per segment per gain constants. Merging script example is Detector/example/ex_jungfrau_merge_constants.py
Total gain correction formula is
Energy[keV or ADU] = (code - pedestal - offset) / gain
Gain files in units of [ADU/keV] are supplied by PSI and account for correct scale orientation sign. Offset is going to be calibrated by Philip.
Common mode correction is going to be applied to the numerator (for same gain mode pixels?).
Image
python Detector/examples/ex_jungfrau_det.py 3
python Detector/examples/ex_jungfrau_images.py 3 # or 4 loops over dataset events plots calibrated image and raw spectrum:
3 - exp=xcsx22015:run=513 - data
4 - exp=xcsx22015:run=552 - Silver behenate
Alignment for MFX
- 2017-11-30
- exp=mfx11116:run=624-626
MfxEndstation.0:Jungfrau.0
References
- Jungfrau References
- Jungfrau and Epix10ka Calibration
- Detector interface
- https://lcls.slac.stanford.edu/detectors/jungfrau