Versions Compared

Key

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

...

parameter

default value

description

source

"DetInfo(:Cspad)"

input source of data

inputKey

 

key for input data, by default use raw data

outputKey

"bkgd_subtracted"

output key for the next data processing stage

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="78d36966ecf167a8-8c21b4e9-4b304428-8df79498-849952e553169ec5c6f3cdf9"><ac:plain-text-body><![CDATA[

bkgd_fname

"cspad_background.dat"

file with CSPad array [4*8*185][388] of averaged background

]]></ac:plain-text-body></ac:structured-macro>

norm_sector

0

CSPad sector in quad from 0 to 7

print_bits

0

module verbosity:

  • =0 - print nothing
  • +1 - input pars
  • +2 - event ID
  • +4 - normalization factor for each event
  • +8 - part of the background array

...

parameter

default value

description

source

"DetInfo(:Cspad)"

input source of data

inkey

 

key for input data, by default use raw data

outkey

"bkgd_subtracted"

output key for the next data processing stage

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="203f5269fcb5034f-15e0f913-48874a50-bb96a93a-641122e758a82beb6d2d9537"><ac:plain-text-body><![CDATA[

mask_fname

"cspad_mask.dat"

file with CSPad mask array [4*8*185][388]

]]></ac:plain-text-body></ac:structured-macro>

masked_amp

0

this amplitude will replace the amplitude in each masked pixel

mask_control_bits

1

control bits for applied mask:

  • =0 - do not apply any mask
  • +1 - apply mask from file
  • +2 - mask two long edges of 2x1
  • +4 - mask two short edges of 2x1
  • +8 - mask two short rows in the middle of 2x1 (rows with wide pixels)

print_bits

0

module verbosity:

  • =0 - print nothing
  • +1 - input pars (in beginJob)
  • +2 - event ID (in event)
  • +4 - mask statistics (in beginJob)
  • +8 - part of the mask array (in beginJob)

...

This package contains python modules which work with both frameworks pyana and psana. Functionality of many modules resembles package ImgAlgos

See also Examples for package py_img_algos

Module py_img_algos.cspad_arr_producer

This module gets data from evt store for CSAPD or CSPAD2x2 depending on unique detector name in parameter source, produce numpy array of full scale shape (4,8,185,388) or (185, 388, 2) of specified in dtype type, and saves it in the evt store with unique name key_out. In case of missing 2x1 sections, their pixel amplitudes substituted by the value form val_miss.

parameter

default value

type

description

source

*-*|Cspad-*

string

address of Detector-Id|Device-ID

data_type

int

string

output array data type (. Implemented types: int, int8, int16, int32, uint8, uint16, uint32, float, double) .

key_out

cspad_array

string

unique keyword for output array identification

val_miss

0

float

intensity value substituted for missing 2x1 sections in data

print_bits

1

int

module verbosity:

  • =0 - print nothing
  • +1 - input pars (in __init__)
  • +2 - configuration parameters (in beginjob)
  • +8 - part of the output 2-d array (in event)
  • +32 - per quad info (in event)

...

See also Examples for package py_img_algos

...

parameter

default value

type

description

Module py_img_algos.cspad_image_

...

producer

parameter

default value

type

description

Module py_img_algos.tahometer

Is intended to print records showing job performance current and integrated from the beginning of job:

calib_dir

'' (empty)

string

path to calibration directory for ex.: /reg/d/psdm/mec/meca6113/calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.1/

key_in

cspad_array

string

keyword for input numpy array, shape=(4, 8, 185, 388) - for cspad or (185, 388, 2) - for cspad2x2

key_out

cspad_image

string

unique keyword for output 2-d image numpy array

print_bits

1

int

module verbosity:

  • =0 - print nothing
  • +1 - input pars (in __init__)
  • +2 - calibration parameters (in the 1st event)
  • +4 - configuration parameters (in the 1st event)
  • +8 - part of CSPAD array (in event)
  • +16 - output image shape (in event)

See also Examples for package py_img_algos

Module py_img_algos.image_save_in_file

This module gets from evt store 2-d image numpy array for specified unique name in key_in and saves it in the file with name given by parameter ofname. File extension defimes the output file format. Run and event numbers are added to the name of the output file. For example, for ofname = image.tiff files will be created with names image-r####-ev######.tiff, where symbols # stands for number.

parameter

default value

type

description

key_in

image

string

unique keyword for input 2-d image numpy array

ofname

img.npy

string

output file name (type is selected by extension) supported formats: txt, tiff, gif, pdf, eps, png, jpg, jpeg, npy (default), npz

print_bits

1

int

module verbosity:

  • =0 - print nothing
  • +1 - input pars (in __init__)
  • +8 - part of the image array (in event)

See also Examples for package py_img_algos

Module py_img_algos.tahometer

Is intended to print records showing job performance current and integrated from the beginning of job:

Code Block
bgColor#AAFFFF

py_img_algos.tahometer: run:0049  
Code Block
bgColor#AAFFFF

py_img_algos.tahometer: run:0049  evt:000005  t[sec]:     2.575  dt[sec]:     2.575  n/t[1/sec]:     1.942  dn/dt[1/sec]:     1.942

parameter

default value

type

description

dn

100

int

interval in number of events to print current statistics

print_bits

1

int

module verbosity:

  • =0 - print nothing
  • +1 - input pars (once in __init__)
  • +2 - current event statistics (in event and endJob)

See also Examples for package py_img_algos