Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Based on e-mail exchange between Mikhail, Gabriel, Jack, Faisal, Philip.

...

For composite detectors see EPIX10KA2M and EPIX10KAQUAD

Table of Contents

Pictures from Gabriel's presentation

Image AddedImage Added

Chris Kenney:

  • sensor regular pixel size 100x100 µm²,
  •  shown on plot gap pixels 100x225 µm² and four central pixels 225x225 µm². 
  • See plot for composite detectors in EPIX10KA2M and EPIX10KAQUAD

Configuration objects for epix10ka

...

Each pixel value is represented over 16 bits; the lowest 14 bits (0 to 13) encode the 14-bit ADC value, and bit 14 encodes the gain mode as either High (bit14==1) or Medium/Low (bit14==0) !!! THIS IS WRONG. SHOULD BE bit14==1/0 for L/H,M !!!. The choice between Medium and Low is determined globally for the ASIC by the asic.trbit.

...

If you want to test a pixel e.g. run the internal pusler then AND its config with 0x1.

2020-06-30 Dan and Maciej about forced gain modes
Image Added

Calibration rowsCalibration rows

Each ASIC has (176+2 rows x 192 columns), the last two rows are the calibration rows. These rows are not connected to the sensor and are constructed without a pixel/sensor interface. They will be powered just like any other pixel in the ASIC, therefore, they see similar voltages, noise, etc just like other pixels.

...

# psana returns 4 rows: r0, r1, r2, r3 


 wirebonds
#|||||||||#
#¯¯¯¯|¯¯¯¯#

...

The force switch mode should be ignored. It is a debugging mode that should not be used for calibration.
Gabriel can explain how to do the calibration if needed.
 

Raw data

Code Block
titleepix10ka data available on 2018-07-05
collapsetrue
Command: find_detector_runs MFX epix10ka

    # mfxx32516: nruns 3-377, MfxEndstation.0:Epix10ka.0, MfxEndstation.0:Epix10ka.1
    # mfxx36916: runs 1-84,  MfxEndstation.0:Epix10ka.1

...

Code Block
titlegain correction files
collapsetrue
Camera1-AHL-H-Gain.txt
Camera1-AHL-L-Gain.txt
Camera1-AML-L-Gain.txt
Camera1-AML-M-Gain.txt
Camera1-FH-H-Gain.txt
Camera1-FL-L-Gain.txt
Camera1-FM-M-Gain.txt

Archived in /reg/g/psdm/detector/gains/epix10k/2018-06-04-Camera1/

Code Block
titleGain and offset Mean and RMS
collapsetrue
          Gain             Offset
          Mean   RMS       Mean   RMS
-------------------------------------------------------
FL-L      1.28   0.06         0     ?
FM-M     42.43   2.00      2331   150
FH-H    128.49   6.17      2354   151
AML-L     1.26   0.06      2115   164
AML-M    42.52   1.92      2334   150
AHL-L     1.29   0.06      2119   190
AHL-H   128.72   6.03      2358   151
-------------------------------------------------------

...

Control bits table

...

Code Block

...

AHL_L

...

titlecbits - pixel control bit array
collapsetrue
    #--------------------------------
    #   data bit 14 is moved here 1/0 for H,M/L
    #  / trbit  1/0 for H/M
    # V / bit3  1/0 for F/A
    #  V / bit2 1/0 for H,M/L
    #   V / M  mask
    #    V / T  test       gain range index
    #     V /             /  in calib files
    #      V             V 
    # x111xx =28 -  FH_H 0 
    # x011xx =12 -  FM_M 1 
    # xx10xx = 8 -  FL_L 2
    # 0100xx =16 - AHL_H 3
    # 0000xx = 0 - AML_M 4
    # 1100xx =48 - AHL_L 5
    # 1000xx =32 - AML_L 6
    # 1101xx =49 - AHL_FL 7
    # 1001xx =33 - AML_FL 8
    #--------------------------------


DataconfigasicPixelConfigArray
IndexGain modebit14trbitbit3: gabit2: gbit1: Maskbit0: Test
0FH_Hx111

1FM_Mx011

2FL_Lxx10

3AHL_H0100

4AML_M0000

5

AHL_L

1100

6AML_L1000

7AHL Forced L1101

8AML Forced L1001

pixel control bit array1<<5 =321<<4 =161<<3 =81<<2 =4Not usedNot used

Gain correction formula

corrected = (raw - pedestals)/gain

Anchor
MeetingWithGabriel
MeetingWithGabriel

Common mode correction

Anchor
common-mode
common-mode

Added on 2020-06-04.

The value (raw - pedestals) can be corrected for common mode effect.

First image below shows one epix10ka segment non-corrected image of shape (352, 384). Vertical stripes presumably arising from this hardware effect.

The same median algorithm is applied as for Jungfrau, but separately for up- and down- part of the segment with parameters

cmpars=(<algorithm-id>, <mode>, <maximal-correction>), where

  • algorithm-id is not used
  • mode=0 - no correction, bit1=1 - in rows (is not useful for epix10ka), bit2=1 - in columns (the best for epix10ka)
  • maximal-correction - maximal allowed correction in ADU

NOTE: currently mask on gain mode is not applied - all pixels are used to evaluate and correct for offset.

Examples of the command to get corrected image:

nda_cdata = det.calib(evt, cmpars=None)        # default - cm pars from calib directory/system

nda_cdata = det.calib(evt, cmpars=(0, 0, 100)) # use cmpars, do not apply cm correction
nda_cdata = det.calib(evt, cmpars=(0, 2, 100)) # use cmpars, apply cm correction in columns
Images before and after common mode correction:

Image AddedImage Added

Meeting with Gabriel

On 2018-07-06 15:13 meeting with Gabriel.

Summary:

  • control bit table is correct
  • formula should include pedestals in stead of offset
  • pedestals need to be generated and saved as txt file of shape (7, 1, 352, 384) under calib directory, for example:
    /reg/d/psdm/MFX/mfxx32516/calib/Epix10ka::CalibV1/MfxEndstation.0:Epix10ka.0/pedestals/0-end.data
  • Gabriel on pedestal calibration:
    • offsets and gain are calibrated not very often (say, once per month...)
    • pedestals should be calibrated pretty often (once per hour...)
    • pedestal calibration is implemented in AMI, using offsets,
    • script works on dark runs accumulated for 5 gain modes
    • + 2 gain modes are evaluated using combination of other 2 and offsets
    • pedestal calibration procedure needs to be completed.

Calibration Details

See this page: https://confluence.slac.stanford.edu/display/ppareg/ePix10K+Calibration

Per panel calibration constants

Algorithm for xtc data with charge injection processing is developed by Gabriel and is wrapped in psana environment as CLI

Detector/app/epix10ka_offset_calibration

Similarly, dark run processing script is

Detector/app/epix10ka_pedestals_calibration

These commands will be available in releases > ana-1.3.58. See description using option "-h", e.g.

command> epix10ka_offset_calibration -h

command> epix10ka_pedestals_calibration -h

File naming convention in panel calibration repository

/reg/g/psdm/detector/gains/epix10k/panels/ - default repository <dir-repo>, can be re-directed for test by option "-o <dir-name>".

<dir-repo>/3791847426-0170080513-1879048214-0191557724-0003673288-2996154369-0218103833/ - directory for particular panel includes its long id,

Sub-directories for each panel:

  • offset
  • pedestals
  • plots
  • work
  • gain # content will be provided by Philip

<dir-repo>/.aliases.txt - file with aliases for long panel ids,

<dir-repo>/panels/logs/ - directory for log files,

Panel calibration file name: epix10ka_0001_20180514120622_mfxx32516_r1021_pedestals_AHL-H.dat, where

  • epix10ka - detector type
  • 0001 - panel id alias as specified in /reg/g/psdm/detector/gains/epix10k/panels/.aliases.txt
  • 20180514120622 - run start time stamp in format '%Y%m%d%H%M%S'
  • mfxx32516_r1021 - experiment and run for production of this constants
  • pedestals - constants type
  • AHL-H - gain range (mode)

File with already processed arrays is saved as

<dir-repo>/<panel-id>/work/epix10ka_0001_20180514120622_mfxx32516_r1021_sp02-df.npz

with extra fields in name sp02  for charge injection spacing number of pixels.

Constants merging for multi-panel detectors

command> epix10ka_deploy_constants -h

shows description of command line options. This command with sufficient number of parameters (at least experiment, run, and detector name)

  • combines gain mode and panel calibration files in arrays of shape (7, <number-of-panels>, 352, 384)
  • deploys calibration files in the calib directory, e.g.

/reg/d/psdm/MFX/mfxx32516/calib/Epix10ka::CalibV1/MfxEndstation.0:Epix10ka.0/pixel_gain/0-end.data

/reg/d/psdm/MFX/mfxx32516/calib/Epix10ka::CalibV1/MfxEndstation.0:Epix10ka.0/pedestals/0-end.data

Pedestal Deployment Meeting Notes (8/2/18)

  • script that is use to drive the daq with hutch python: /reg/g/pcds/pyps/mfx/dev/mfx/experiments/mfxls3416.py
  • for epix, 5 gain ranges (3 fixed, 2 auto) generate 7 pedestals
  • maybe have "all range" option, and fast "selected ranges" option.
  • maybe "all range" at beginning of expt, but "selected ranges" during expt.
  • jason thinks medium/low is the default
  • in the "selected ranges" mode makepeds will reuse the current numbers for ranges that weren't selected.
  • multi-panel epix10k should be the same as jungfrau (might need to massage
  • the daq appropriately)
  • mikhail/gabriel: data processing call in makepeds script
  • silke/jason/dan: hutch python, makepeds wrapper
  • /reg/g/pcds/engineering_tools/R1.2.9/scripts/makepeds calls makepeds_psana calls mikhail's stuff (jungfrau_ndarr_dark_proc)

List of known detectors on 2018-11-12

command> find_detector_names

Code Block
#== type 0022 epix10ka
               'DetLab.0:Epix10ka.0': 'epix10ka_0000',\
     'MecTargetChamber.0:Epix10ka.0': 'epix10ka_0001',\
     'MecTargetChamber.0:Epix10ka.1': 'epix10ka_0002',\
        'MfxEndstation.0:Epix10ka.0': 'epix10ka_0003',\
        'MfxEndstation.0:Epix10ka.1': 'epix10ka_0004',\
        'MfxEndstation.0:Epix10ka.2': 'epix10ka_0005',\

Composite detectors

EPIX10KA2M and EPIX10KAQUAD - composite detectors made of epix10ka panels.

References

Gain correction formula

corrected = (raw - pedestals)/gain

...

Meeting with Gabriel

On 2018-07-06 15:13 meeting with Gabriel.

Summary:

  • control bit table is correct
  • formula should include pedestals in stead of offset
  • pedestals need to be generated and saved as txt file of shape (7, 1, 352, 384) under calib directory, for example:
    /reg/d/psdm/MFX/mfxx32516/calib/Epix10ka::CalibV1/MfxEndstation.0:Epix10ka.0/pedestals/0-end.data
  • Gabriel on pedestal calibration:
    • pedestal calibration is implemented in AMI, using offests,
    • script works on dark runs accumulated for 5 gain modes
    • + 2 gain modes are evaluated using combination of other 2 and offset
    • pedestal calibration procedure needs to be compleated.

Algorithm

  • per event make <uint8 control bit array>
  • convert to <array of indexes> using <control bits table>
  • generate <array of gains> and <array of offsets>
  • apply correction using formula

Constants production

Detector/examples/ex_epix10ka_merge_constants.py - generates files ./epix10k-gain(offset).txt(npy) for single segment shape (7, 1, 352, 384)

 

Deployed with calibman as

/reg/d/psdm/MFX/mfxx32516/calib/Epix10ka::CalibV1/MfxEndstation.0:Epix10ka.0/pixel_gain/0-end.data

/reg/d/psdm/MFX/mfxx32516/calib/Epix10ka::CalibV1/MfxEndstation.0:Epix10ka.0/pixel_offset/0-end.data

References

...

 

...