GlobalUtils Namespace Reference


Functions

def stringOrNone
def intOrNone
def list_of_int_from_list_of_str
def list_of_str_from_list_of_int
def create_directory
def create_path
def get_list_of_files_in_dir
def print_all_files_in_dir
def get_list_of_files_in_dir_for_ext
def get_list_of_files_in_dir_for_part_fname
def print_list_of_files_in_dir
def get_path_owner
def get_path_mode
def get_tempfile
def call
def subproc_in_log
def subproc
def batch_job_submit
def batch_job_check
def bsub_is_available
def batch_job_kill
def batch_job_status
def batch_job_status_and_nodename
def remove_file
def load_textfile
def save_textfile
def xtc_fname_parser_helper
def parse_xtc_file_name
def parse_xtc_path
def parse_xtc_path_v0
def xtc_fname_for_all_chunks
def list_of_calib_files_with_run_range
def get_text_content_of_calib_dir_for_detector
def print_parsed_path
def parse_path
def get_dirname_from_path
def get_pwd
def get_cwd
def get_hostname
def get_enviroment
def get_login
def get_pid
def split_string
def get_item_last_name
def get_item_path_to_last_name
def get_item_path_and_last_name
def get_item_second_to_last_name
def get_item_third_to_last_name
def get_item_name_for_title
def sleep_sec
def get_time_sec
def get_current_local_time_tuple
def get_current_gm_time_tuple
def get_local_time_tuple
def get_gm_time_tuple
def get_current_local_time_stamp
def get_current_gm_time_stamp
def get_local_time_str
def get_gm_time_str
def selectFromListInPopupMenu
def changeCheckBoxListInPopupMenu
def selectRadioButtonInPopupMenu
def get_array_from_file
def get_image_array_from_file
def get_text_list_from_file
def get_list_of_enumerated_file_names
def get_list_of_files_for_list_of_insets
def printStyleInfo
def get_save_fname_through_dialog_box
def get_open_fname_through_dialog_box
def confirm_dialog_box
def confirm_or_cancel_dialog_box
def help_dialog_box
def arr_rot_n90
def has_kerberos_ticket
def check_token
def get_afs_token
def parse_token
def ready_to_start
def text_status_of_queues
def msg_and_status_of_queue
def text_sataus_of_lsf_hosts
def msg_and_status_of_lsf
def get_pkg_version
def get_pkg_tag
def is_good_lustre_version
def create_directory
def subproc
def send_msg_with_att_to_elog_v0
def get_text_file_content
def det_type_from_source
def string_from_source
 ----------------------------- ------------------------------
def shape_nda_to_2d
 -----------------------------
def shape_nda_to_3d
 -----------------------------
def reshape_nda_to_2d
 -----------------------------
def reshape_nda_to_3d
 -----------------------------
def merge_masks
def mask_neighbors
def mask_edges
def str_tstamp
 -----------------------------
def calib_dir
def exp_name
def alias_for_src_name
def test_mask_neighbors_2d
def test_mask_neighbors_3d
def test_mask_edges_2d
def test_mask_edges_3d
def do_test

Variables

string __version__ = "$Revision: 12682 $"
tuple pwd = get_pwd()
string fname = '/reg/g/psdm/logs/calibman/2016/09/2016-00-00-00:00:00-log-dubrovin-12345.txt'
string __version__ = "$Revision: 12601 $"
tuple pwd = get_pwd()
string __version__ = "$Revision: 13028 $"
int PEDESTALS = 0
int PIXEL_STATUS = 1
int PIXEL_RMS = 2
int PIXEL_GAIN = 3
int PIXEL_MASK = 4
int PIXEL_BKGD = 5
int COMMON_MODE = 6
int GEOMETRY = 7
tuple calib_types = ( PEDESTALS, PIXEL_STATUS, PIXEL_RMS, PIXEL_GAIN, PIXEL_MASK, PIXEL_BKGD, COMMON_MODE, GEOMETRY)
tuple calib_names = ('pedestals', 'pixel_status', 'pixel_rms', 'pixel_gain', 'pixel_mask', 'pixel_bkgd', 'common_mode', 'geometry')
tuple calib_dtypes = ( np.float32, np.uint16, np.float32, np.float32, np.uint8, np.float32, np.double, str)
tuple dic_calib_type_to_name = dict(zip(calib_types, calib_names))
tuple dic_calib_name_to_type = dict(zip(calib_names, calib_types))
tuple dic_calib_type_to_dtype = dict(zip(calib_types, calib_dtypes))
int LOADED = 1
int DEFAULT = 2
int UNREADABLE = 3
int UNDEFINED = 4
int WRONGSIZE = 5
int NONFOUND = 6
int DCSTORE = 7
tuple calib_statvalues = ( LOADED, DEFAULT, UNREADABLE, UNDEFINED, WRONGSIZE, NONFOUND, DCSTORE)
tuple calib_statnames = ('LOADED', 'DEFAULT', 'UNREADABLE', 'UNDEFINED', 'WRONGSIZE', 'NONFOUND', 'DCSTORE')
tuple dic_calib_status_value_to_name = dict(zip(calib_statvalues, calib_statnames))
tuple dic_calib_status_name_to_value = dict(zip(calib_statnames, calib_statvalues))
int UNDEFINED = 0
int CSPAD = 1
int CSPAD2X2 = 2
int PRINCETON = 3
int PNCCD = 4
int TM6740 = 5
int OPAL1000 = 6
int OPAL2000 = 7
int OPAL4000 = 8
int OPAL8000 = 9
int ORCAFL40 = 10
int EPIX = 11
int EPIX10K = 12
int EPIX100A = 13
int FCCD960 = 14
int ANDOR = 15
int ACQIRIS = 16
int IMP = 17
int QUARTZ4A150 = 18
int RAYONIX = 19
int EVR = 20
int FCCD = 21
int TIMEPIX = 22
int FLI = 23
int PIMAX = 24
int ANDOR3D = 25
int JUNGFRAU = 26
tuple list_of_det_type
tuple list_of_det_names
tuple list_of_calib_groups
tuple dic_det_type_to_name = dict(zip(list_of_det_type, list_of_det_names))
tuple dic_det_type_to_calib_group = dict(zip(list_of_det_type, list_of_calib_groups))
 bld_names = \


Function Documentation

def GlobalUtils::stringOrNone (   value  ) 

Definition at line 54 of file GlobalUtils.py.

def GlobalUtils::intOrNone (   value  ) 

Definition at line 58 of file GlobalUtils.py.

def GlobalUtils::list_of_int_from_list_of_str (   list_in  ) 

Converts  ['0001', '0202', '0203', '0204',...] to [1, 202, 203, 204,...]

Definition at line 64 of file GlobalUtils.py.

def GlobalUtils::list_of_str_from_list_of_int (   list_in,
  fmt = '%04d' 
)

Converts [1, 202, 203, 204,...] to ['0001', '0202', '0203', '0204',...]

Definition at line 74 of file GlobalUtils.py.

def GlobalUtils::create_directory (   dir,
  mode = 0777 
)

Definition at line 84 of file GlobalUtils.py.

Referenced by Translator::SplitScanMgr::createCCSubDirIfNeeded().

def GlobalUtils::create_path (   path,
  depth = 5,
  mode = 0777 
)

Definition at line 95 of file GlobalUtils.py.

def GlobalUtils::get_list_of_files_in_dir (   dirname  ) 

Definition at line 109 of file GlobalUtils.py.

def GlobalUtils::print_all_files_in_dir (   dirname  ) 

Definition at line 113 of file GlobalUtils.py.

def GlobalUtils::get_list_of_files_in_dir_for_ext (   dir,
  ext = '.xtc' 
)

Returns the list of files in the directory for specified extension or None if directory is None.

Definition at line 120 of file GlobalUtils.py.

def GlobalUtils::get_list_of_files_in_dir_for_part_fname (   dir,
  pattern = '-r0022' 
)

Returns the list of files in the directory for specified file name pattern or [] - empty list.

Definition at line 133 of file GlobalUtils.py.

def GlobalUtils::print_list_of_files_in_dir (   dirname,
  path_or_fname 
)

Definition at line 147 of file GlobalUtils.py.

def GlobalUtils::get_path_owner (   path  ) 

Definition at line 157 of file GlobalUtils.py.

def GlobalUtils::get_path_mode (   path  ) 

Definition at line 167 of file GlobalUtils.py.

def GlobalUtils::get_tempfile (   mode = 'r+b',
  suffix = '.txt' 
)

Definition at line 172 of file GlobalUtils.py.

def GlobalUtils::call (   command_seq,
  shell = False 
)

Definition at line 178 of file GlobalUtils.py.

def GlobalUtils::subproc_in_log (   command_seq,
  logname,
  env = None,
  shell = False 
)

Definition at line 183 of file GlobalUtils.py.

def GlobalUtils::subproc (   command_seq,
  env = None,
  shell = False 
)

Definition at line 192 of file GlobalUtils.py.

def GlobalUtils::batch_job_submit (   command,
  queue = 'psnehq',
  log_file = 'batch-log.txt' 
)

Definition at line 279 of file GlobalUtils.py.

def GlobalUtils::batch_job_check (   job_id_str,
  queue = 'psnehq' 
)

Definition at line 308 of file GlobalUtils.py.

def GlobalUtils::bsub_is_available (  ) 

Definition at line 314 of file GlobalUtils.py.

def GlobalUtils::batch_job_kill (   job_id_str  ) 

Definition at line 326 of file GlobalUtils.py.

def GlobalUtils::batch_job_status (   job_id_str,
  queue = 'psnehq' 
)

Returns the batch job status, for example 'RUN', 'PEND', 'EXIT', 'DONE', etc.

Definition at line 334 of file GlobalUtils.py.

def GlobalUtils::batch_job_status_and_nodename (   job_id_str,
  queue = 'psnehq' 
)

Definition at line 350 of file GlobalUtils.py.

def GlobalUtils::remove_file (   path  ) 

Definition at line 367 of file GlobalUtils.py.

def GlobalUtils::load_textfile (   path  ) 

Returns entire content of the text file or standard str presentation of numpy array for *.npy file

Definition at line 376 of file GlobalUtils.py.

def GlobalUtils::save_textfile (   text,
  path,
  mode = 'w' 
)

Saves text in file specified by path. mode: 'w'-write, 'a'-append 

Definition at line 389 of file GlobalUtils.py.

def GlobalUtils::xtc_fname_parser_helper (   part,
  prefix 
)

Definition at line 398 of file GlobalUtils.py.

def GlobalUtils::parse_xtc_file_name (   fname  ) 

Parse the file name like e170-r0003-s00-c00.xtc and return ('170', '0003', '00', '00', '.xtc')

Definition at line 408 of file GlobalUtils.py.

def GlobalUtils::parse_xtc_path (   path = '.'  ) 

Definition at line 434 of file GlobalUtils.py.

def GlobalUtils::parse_xtc_path_v0 (   path = '.'  ) 

Definition at line 474 of file GlobalUtils.py.

def GlobalUtils::xtc_fname_for_all_chunks (   path = 'e167-r0015-s00-c00.xtc'  ) 

Converts the xtc file name e167-r0015-s00-c00.xtc or complete path
   path/reg/d/psdm/XCS/xcsi0112/xtc/e167-r0015-s00-c00.xtc to the wildname:
   e167-r0015-*.xtc

Definition at line 496 of file GlobalUtils.py.

def GlobalUtils::list_of_calib_files_with_run_range (   list_of_files  ) 

Definition at line 509 of file GlobalUtils.py.

def GlobalUtils::get_text_content_of_calib_dir_for_detector (   path,
  det = 'cspad',
  subdir = 'CsPad::CalibV1',
  level = 0,
  calib_type = None 
)

Definition at line 530 of file GlobalUtils.py.

def GlobalUtils::print_parsed_path (   path  ) 

Definition at line 582 of file GlobalUtils.py.

def GlobalUtils::parse_path (   path  ) 

Definition at line 595 of file GlobalUtils.py.

def GlobalUtils::get_dirname_from_path (   path  ) 

Definition at line 601 of file GlobalUtils.py.

def GlobalUtils::get_pwd (  ) 

Definition at line 607 of file GlobalUtils.py.

def GlobalUtils::get_cwd (  ) 

get corrent work directory

Definition at line 613 of file GlobalUtils.py.

def GlobalUtils::get_hostname (  ) 

Returns login name

Definition at line 617 of file GlobalUtils.py.

def GlobalUtils::get_enviroment (   env = 'USER'  ) 

Returns the value of specified by string name environment variable

Definition at line 621 of file GlobalUtils.py.

def GlobalUtils::get_login (  ) 

Returns login name

Definition at line 626 of file GlobalUtils.py.

def GlobalUtils::get_pid (  ) 

Returns pid - process id

Definition at line 631 of file GlobalUtils.py.

def GlobalUtils::split_string (   str,
  separator = '-s' 
)

Definition at line 638 of file GlobalUtils.py.

def GlobalUtils::get_item_last_name (   dsname  ) 

Returns the last part of the full item name (after last slash)

Definition at line 645 of file GlobalUtils.py.

def GlobalUtils::get_item_path_to_last_name (   dsname  ) 

Returns the path to the last part of the item name

Definition at line 650 of file GlobalUtils.py.

def GlobalUtils::get_item_path_and_last_name (   dsname  ) 

Returns the path and last part of the full item name

Definition at line 655 of file GlobalUtils.py.

def GlobalUtils::get_item_second_to_last_name (   dsname  ) 

Returns the 2nd to last part of the full item name

Definition at line 662 of file GlobalUtils.py.

def GlobalUtils::get_item_third_to_last_name (   dsname  ) 

Returns the 3nd to last part of the full item name

Definition at line 670 of file GlobalUtils.py.

def GlobalUtils::get_item_name_for_title (   dsname  ) 

Returns the last 3 parts of the full item name (after last slashes)

Definition at line 683 of file GlobalUtils.py.

def GlobalUtils::sleep_sec (   sec  ) 

Definition at line 694 of file GlobalUtils.py.

def GlobalUtils::get_time_sec (  ) 

Definition at line 699 of file GlobalUtils.py.

def GlobalUtils::get_current_local_time_tuple (  ) 

Definition at line 709 of file GlobalUtils.py.

def GlobalUtils::get_current_gm_time_tuple (  ) 

Definition at line 712 of file GlobalUtils.py.

def GlobalUtils::get_local_time_tuple (   t_sec_epoch  ) 

Definition at line 717 of file GlobalUtils.py.

def GlobalUtils::get_gm_time_tuple (   t_sec_epoch  ) 

Definition at line 720 of file GlobalUtils.py.

def GlobalUtils::get_current_local_time_stamp (   fmt = '%Y-%m-%d %H:%M:%S %Z'  ) 

Definition at line 725 of file GlobalUtils.py.

def GlobalUtils::get_current_gm_time_stamp (   fmt = '%Y-%m-%d %H:%M:%S %Z'  ) 

Definition at line 728 of file GlobalUtils.py.

def GlobalUtils::get_local_time_str (   time_sec,
  fmt = '%Y-%m-%d %H:%M:%S %Z' 
)

Definition at line 733 of file GlobalUtils.py.

def GlobalUtils::get_gm_time_str (   time_sec,
  fmt = '%Y-%m-%d %H:%M:%S %Z' 
)

Definition at line 739 of file GlobalUtils.py.

def GlobalUtils::selectFromListInPopupMenu (   list  ) 

Shows the list as a pop-up menu and returns the selected item as a string or None

Definition at line 745 of file GlobalUtils.py.

def GlobalUtils::changeCheckBoxListInPopupMenu (   list,
  win_title = 'Set check boxes' 
)

Shows the list of check-boxes as a dialog pop-up menu and returns the (un)changed list

Definition at line 758 of file GlobalUtils.py.

def GlobalUtils::selectRadioButtonInPopupMenu (   dict_of_pars,
  win_title = 'Select option',
  do_confirm = False 
)

Popup GUI to select radio button from the list:  dict_of_pars = {'checked':'radio1', 'list':['radio0', 'radio1', 'radio2']}

Definition at line 777 of file GlobalUtils.py.

def GlobalUtils::get_array_from_file (   fname,
  dtype = np.float32 
)

Definition at line 787 of file GlobalUtils.py.

def GlobalUtils::get_image_array_from_file (   fname,
  dtype = np.float32 
)

Definition at line 809 of file GlobalUtils.py.

def GlobalUtils::get_text_list_from_file (   fname  ) 

Definition at line 839 of file GlobalUtils.py.

def GlobalUtils::get_list_of_enumerated_file_names (   path1 = 'file.dat',
  len_of_list = 0 
)

From pattern of the path it makes a list of files with indexes.
For example, for path1='file.dat', it returns [file-00.dat, file-01.dat, ..., file-<N-1>.dat], where N = len_of_list

Definition at line 856 of file GlobalUtils.py.

def GlobalUtils::get_list_of_files_for_list_of_insets (   path1 = 'file.dat',
  list_of_insets = [] 
)

Returns the list of file names, where the file name is a combination of path1 and inset from list

Definition at line 866 of file GlobalUtils.py.

def GlobalUtils::printStyleInfo (   widg  ) 

Definition at line 877 of file GlobalUtils.py.

def GlobalUtils::get_save_fname_through_dialog_box (   parent,
  path0,
  dial_title,
  filter = '*.txt' 
)

Definition at line 888 of file GlobalUtils.py.

def GlobalUtils::get_open_fname_through_dialog_box (   parent,
  path0,
  dial_title,
  filter = '*.txt' 
)

Definition at line 903 of file GlobalUtils.py.

def GlobalUtils::confirm_dialog_box (   parent = None,
  text = 'Please confirm that you aware!',
  title = 'Please acknowledge' 
)

Pop-up MODAL box for confirmation

Definition at line 917 of file GlobalUtils.py.

def GlobalUtils::confirm_or_cancel_dialog_box (   parent = None,
  text = 'Please confirm or cancel',
  title = 'Confirm or cancel' 
)

Pop-up MODAL box for confirmation

Definition at line 945 of file GlobalUtils.py.

def GlobalUtils::help_dialog_box (   parent = None,
  text = 'Help message goes here',
  title = 'Help' 
)

Pop-up NON-MODAL box for help etc.

Definition at line 966 of file GlobalUtils.py.

def GlobalUtils::arr_rot_n90 (   arr,
  rot_ang_n90 = 0 
)

Definition at line 982 of file GlobalUtils.py.

def GlobalUtils::has_kerberos_ticket (  ) 

Checks to see if the user has a valid Kerberos ticket

Definition at line 991 of file GlobalUtils.py.

def GlobalUtils::check_token (   do_print = False  ) 

Definition at line 999 of file GlobalUtils.py.

def GlobalUtils::get_afs_token (   do_print = False  ) 

Definition at line 1009 of file GlobalUtils.py.

def GlobalUtils::parse_token (   token  ) 

from string like: User's (AFS ID 5269) tokens for afs@slac.stanford.edu [Expires Feb 28 19:16] 54 75 Expires Feb 28 19:16
    returns date/time: Feb 28 19:16

Definition at line 1015 of file GlobalUtils.py.

def GlobalUtils::ready_to_start (   check_bits = 0777,
  fatal_bits = 0777 
)

Check availability of services and credentuals marked by the check_bits

Definition at line 1036 of file GlobalUtils.py.

def GlobalUtils::text_status_of_queues (   lst_of_queues = ['psanaq',
  psnehq,
  psfehq,
  psnehprioq,
  psfehprioq 
)

Checks status of queues

Definition at line 1077 of file GlobalUtils.py.

def GlobalUtils::msg_and_status_of_queue (   queue = 'psnehq'  ) 

Returns status of queue for command: bqueues <queue-name>

Definition at line 1083 of file GlobalUtils.py.

def GlobalUtils::text_sataus_of_lsf_hosts (   farm = 'psnehfarm'  ) 

Returns text output of the command: bhosts farm

Definition at line 1098 of file GlobalUtils.py.

def GlobalUtils::msg_and_status_of_lsf (   farm = 'psnehfarm',
  print_bits = 0 
)

Checks the LSF status for requested farm

Definition at line 1104 of file GlobalUtils.py.

def GlobalUtils::get_pkg_version (   pkg_name = 'CalibManager'  ) 

Returns the latest revision number of the package

Definition at line 1142 of file GlobalUtils.py.

def GlobalUtils::get_pkg_tag (   pkg_name = 'CalibManager'  ) 

Returns the latest version of the package - VERY SLOW COMMAND

Definition at line 1149 of file GlobalUtils.py.

def GlobalUtils::is_good_lustre_version (  ) 

Checks the lustre version and returns True/False for new/ols version

Definition at line 1167 of file GlobalUtils.py.

def GlobalUtils::create_directory (   dir  ) 

Definition at line 65 of file GlobalUtils.py.

def GlobalUtils::subproc (   command_seq,
  env = None 
)

Definition at line 96 of file GlobalUtils.py.

def GlobalUtils::send_msg_with_att_to_elog_v0 (   inst = 'AMO',
  expt = 'amodaq09',
  run = '825',
  tag = 'TAG1',
  msg = 'EMPTY MESSAGE',
  fname_text = None,
  fname_att = None,
  resp = None 
)

Definition at line 127 of file GlobalUtils.py.

def GlobalUtils::get_text_file_content (   path  ) 

Definition at line 265 of file GlobalUtils.py.

def GlobalUtils::det_type_from_source (   source  ) 

Returns enumerated detector type for string source

Definition at line 256 of file GlobalUtils.py.

def GlobalUtils::string_from_source (   source  ) 

----------------------------- ------------------------------

Returns string like "CxiDs2.0:Cspad.0" from "Source('DetInfo(CxiDs2.0:Cspad.0)')" or "Source('DsaCsPad')"

Definition at line 292 of file GlobalUtils.py.

def GlobalUtils::shape_nda_to_2d (   arr  ) 

-----------------------------

Return shape of np.array to reshape to 2-d

Definition at line 301 of file GlobalUtils.py.

def GlobalUtils::shape_nda_to_3d (   arr  ) 

-----------------------------

Return shape of np.array to reshape to 3-d

Definition at line 310 of file GlobalUtils.py.

def GlobalUtils::reshape_nda_to_2d (   arr  ) 

-----------------------------

Reshape np.array to 2-d

Definition at line 319 of file GlobalUtils.py.

def GlobalUtils::reshape_nda_to_3d (   arr  ) 

-----------------------------

Reshape np.array to 3-d

Definition at line 329 of file GlobalUtils.py.

def GlobalUtils::merge_masks (   mask1 = None,
  mask2 = None,
  dtype = np.uint8 
)

Merging masks using np.logical_and rule: (0,1,0,1)^(0,0,1,1) = (0,0,0,1) 

Definition at line 339 of file GlobalUtils.py.

def GlobalUtils::mask_neighbors (   mask,
  allnbrs = True,
  dtype = np.uint8 
)

Return mask with masked eight neighbor pixels around each 0-bad pixel in input mask.

   mask    : int - n-dimensional (n>1) array with input mask
   allnbrs : bool - False/True - masks 4/8 neighbor pixels.

Definition at line 357 of file GlobalUtils.py.

def GlobalUtils::mask_edges (   mask,
  mrows = 1,
  mcols = 1,
  dtype = np.uint8 
)

Return mask with a requested number of row and column pixels masked - set to 0.
   mask  : int - n-dimensional (n>1) array with input mask
   mrows : int - number of edge rows to mask
   mcols : int - number of edge columns to mask

Definition at line 404 of file GlobalUtils.py.

def GlobalUtils::str_tstamp (   fmt = '%Y-%m-%dT%H:%M:%S',
  time_sec = None 
)

-----------------------------

Returns string timestamp for specified format and time in sec or current time by default

Definition at line 468 of file GlobalUtils.py.

def GlobalUtils::calib_dir (   env  ) 

Definition at line 533 of file GlobalUtils.py.

Referenced by TimeTool::Analyze::beginRun(), CSPadPixCoords::CSPadInterpolImageProducer::beginRun(), ImgAlgos::NDArrImageProducer::getCalibPars(), ImgAlgos::NDArrCalib::getCalibPars(), CSPadImageProducer::getCalibPars(), and CSPadPixCoords::CSPad2x2ImageProducer::getCalibPars().

def GlobalUtils::exp_name (   env  ) 

Definition at line 542 of file GlobalUtils.py.

def GlobalUtils::alias_for_src_name (   env  ) 

Definition at line 549 of file GlobalUtils.py.

def GlobalUtils::test_mask_neighbors_2d (   allnbrs = True  ) 

Definition at line 562 of file GlobalUtils.py.

def GlobalUtils::test_mask_neighbors_3d (   allnbrs = True  ) 

Definition at line 585 of file GlobalUtils.py.

def GlobalUtils::test_mask_edges_2d (   mrows = 1,
  mcols = 1 
)

Definition at line 611 of file GlobalUtils.py.

def GlobalUtils::test_mask_edges_3d (   mrows = 1,
  mcols = 1 
)

Definition at line 628 of file GlobalUtils.py.

def GlobalUtils::do_test (  ) 

Definition at line 658 of file GlobalUtils.py.


Variable Documentation

string GlobalUtils::__version__ = "$Revision: 12682 $" [static]

Definition at line 22 of file GlobalUtils.py.

tuple GlobalUtils::pwd = get_pwd() [static]

Definition at line 1215 of file GlobalUtils.py.

string GlobalUtils::fname = '/reg/g/psdm/logs/calibman/2016/09/2016-00-00-00:00:00-log-dubrovin-12345.txt' [static]

Definition at line 1268 of file GlobalUtils.py.

string GlobalUtils::__version__ = "$Revision: 12601 $" [static]

Definition at line 26 of file GlobalUtils.py.

tuple GlobalUtils::pwd = get_pwd() [static]

Definition at line 671 of file GlobalUtils.py.

string GlobalUtils::__version__ = "$Revision: 13028 $" [static]

Definition at line 51 of file GlobalUtils.py.

int GlobalUtils::PEDESTALS = 0 [static]

Definition at line 68 of file GlobalUtils.py.

int GlobalUtils::PIXEL_STATUS = 1 [static]

Definition at line 69 of file GlobalUtils.py.

int GlobalUtils::PIXEL_RMS = 2 [static]

Definition at line 70 of file GlobalUtils.py.

int GlobalUtils::PIXEL_GAIN = 3 [static]

Definition at line 71 of file GlobalUtils.py.

int GlobalUtils::PIXEL_MASK = 4 [static]

Definition at line 72 of file GlobalUtils.py.

int GlobalUtils::PIXEL_BKGD = 5 [static]

Definition at line 73 of file GlobalUtils.py.

int GlobalUtils::COMMON_MODE = 6 [static]

Definition at line 74 of file GlobalUtils.py.

int GlobalUtils::GEOMETRY = 7 [static]

Definition at line 75 of file GlobalUtils.py.

tuple GlobalUtils::calib_types = ( PEDESTALS, PIXEL_STATUS, PIXEL_RMS, PIXEL_GAIN, PIXEL_MASK, PIXEL_BKGD, COMMON_MODE, GEOMETRY) [static]

Definition at line 77 of file GlobalUtils.py.

tuple GlobalUtils::calib_names = ('pedestals', 'pixel_status', 'pixel_rms', 'pixel_gain', 'pixel_mask', 'pixel_bkgd', 'common_mode', 'geometry') [static]

Definition at line 78 of file GlobalUtils.py.

tuple GlobalUtils::calib_dtypes = ( np.float32, np.uint16, np.float32, np.float32, np.uint8, np.float32, np.double, str) [static]

Definition at line 79 of file GlobalUtils.py.

tuple GlobalUtils::dic_calib_type_to_name = dict(zip(calib_types, calib_names)) [static]

Definition at line 81 of file GlobalUtils.py.

tuple GlobalUtils::dic_calib_name_to_type = dict(zip(calib_names, calib_types)) [static]

Definition at line 82 of file GlobalUtils.py.

tuple GlobalUtils::dic_calib_type_to_dtype = dict(zip(calib_types, calib_dtypes)) [static]

Definition at line 83 of file GlobalUtils.py.

int GlobalUtils::LOADED = 1 [static]

Definition at line 85 of file GlobalUtils.py.

int GlobalUtils::DEFAULT = 2 [static]

Definition at line 86 of file GlobalUtils.py.

int GlobalUtils::UNREADABLE = 3 [static]

Definition at line 87 of file GlobalUtils.py.

int GlobalUtils::UNDEFINED = 4 [static]

Definition at line 88 of file GlobalUtils.py.

int GlobalUtils::WRONGSIZE = 5 [static]

Definition at line 89 of file GlobalUtils.py.

int GlobalUtils::NONFOUND = 6 [static]

Definition at line 90 of file GlobalUtils.py.

int GlobalUtils::DCSTORE = 7 [static]

Definition at line 91 of file GlobalUtils.py.

tuple GlobalUtils::calib_statvalues = ( LOADED, DEFAULT, UNREADABLE, UNDEFINED, WRONGSIZE, NONFOUND, DCSTORE) [static]

Definition at line 93 of file GlobalUtils.py.

tuple GlobalUtils::calib_statnames = ('LOADED', 'DEFAULT', 'UNREADABLE', 'UNDEFINED', 'WRONGSIZE', 'NONFOUND', 'DCSTORE') [static]

Definition at line 94 of file GlobalUtils.py.

tuple GlobalUtils::dic_calib_status_value_to_name = dict(zip(calib_statvalues, calib_statnames)) [static]

Definition at line 96 of file GlobalUtils.py.

tuple GlobalUtils::dic_calib_status_name_to_value = dict(zip(calib_statnames, calib_statvalues)) [static]

Definition at line 97 of file GlobalUtils.py.

int GlobalUtils::UNDEFINED = 0 [static]

Definition at line 104 of file GlobalUtils.py.

int GlobalUtils::CSPAD = 1 [static]

Definition at line 105 of file GlobalUtils.py.

int GlobalUtils::CSPAD2X2 = 2 [static]

Definition at line 106 of file GlobalUtils.py.

int GlobalUtils::PRINCETON = 3 [static]

Definition at line 107 of file GlobalUtils.py.

int GlobalUtils::PNCCD = 4 [static]

Definition at line 108 of file GlobalUtils.py.

int GlobalUtils::TM6740 = 5 [static]

Definition at line 109 of file GlobalUtils.py.

int GlobalUtils::OPAL1000 = 6 [static]

Definition at line 110 of file GlobalUtils.py.

int GlobalUtils::OPAL2000 = 7 [static]

Definition at line 111 of file GlobalUtils.py.

int GlobalUtils::OPAL4000 = 8 [static]

Definition at line 112 of file GlobalUtils.py.

int GlobalUtils::OPAL8000 = 9 [static]

Definition at line 113 of file GlobalUtils.py.

int GlobalUtils::ORCAFL40 = 10 [static]

Definition at line 114 of file GlobalUtils.py.

int GlobalUtils::EPIX = 11 [static]

Definition at line 115 of file GlobalUtils.py.

int GlobalUtils::EPIX10K = 12 [static]

Definition at line 116 of file GlobalUtils.py.

int GlobalUtils::EPIX100A = 13 [static]

Definition at line 117 of file GlobalUtils.py.

int GlobalUtils::FCCD960 = 14 [static]

Definition at line 118 of file GlobalUtils.py.

int GlobalUtils::ANDOR = 15 [static]

Definition at line 119 of file GlobalUtils.py.

int GlobalUtils::ACQIRIS = 16 [static]

Definition at line 120 of file GlobalUtils.py.

int GlobalUtils::IMP = 17 [static]

Definition at line 121 of file GlobalUtils.py.

int GlobalUtils::QUARTZ4A150 = 18 [static]

Definition at line 122 of file GlobalUtils.py.

int GlobalUtils::RAYONIX = 19 [static]

Definition at line 123 of file GlobalUtils.py.

int GlobalUtils::EVR = 20 [static]

Definition at line 124 of file GlobalUtils.py.

int GlobalUtils::FCCD = 21 [static]

Definition at line 125 of file GlobalUtils.py.

int GlobalUtils::TIMEPIX = 22 [static]

Definition at line 126 of file GlobalUtils.py.

int GlobalUtils::FLI = 23 [static]

Definition at line 127 of file GlobalUtils.py.

int GlobalUtils::PIMAX = 24 [static]

Definition at line 128 of file GlobalUtils.py.

int GlobalUtils::ANDOR3D = 25 [static]

Definition at line 129 of file GlobalUtils.py.

int GlobalUtils::JUNGFRAU = 26 [static]

Definition at line 130 of file GlobalUtils.py.

tuple GlobalUtils::list_of_det_type [static]

Initial value:

(UNDEFINED, CSPAD, CSPAD2X2, PRINCETON, PNCCD, TM6740, \
                    OPAL1000, OPAL2000, OPAL4000, OPAL8000, \
                    ORCAFL40, EPIX, EPIX10K, EPIX100A, FCCD960, ANDOR, ACQIRIS, IMP, QUARTZ4A150, RAYONIX,
                    EVR, FCCD, TIMEPIX, FLI, PIMAX, ANDOR3D, JUNGFRAU)

Definition at line 140 of file GlobalUtils.py.

tuple GlobalUtils::list_of_det_names [static]

Initial value:

('UNDEFINED', 'Cspad', 'Cspad2x2', 'Princeton', 'pnCCD', 'Tm6740', \
                     'Opal1000', 'Opal2000', 'Opal4000', 'Opal8000', \
                     'OrcaFl40', 'Epix', 'Epix10k', 'Epix100a', 'Fccd960', 'Andor', 'Acqiris', 'Imp', 'Quartz4A150', 'Rayonix',\
                     'Evr', 'Fccd', 'Timepix', 'Fli', 'Pimax', 'Andor3d', 'Jungfrau')

Definition at line 146 of file GlobalUtils.py.

tuple GlobalUtils::list_of_calib_groups [static]

Initial value:

('UNDEFINED',
                        'CsPad::CalibV1',
                        'CsPad2x2::CalibV1',
                        'Princeton::CalibV1',
                        'PNCCD::CalibV1',
                        'Camera::CalibV1',
                        'Camera::CalibV1',
                        'Camera::CalibV1',
                        'Camera::CalibV1',
                        'Camera::CalibV1',
                        'Camera::CalibV1',
                        'Epix::CalibV1',
                        'Epix10k::CalibV1',
                        'Epix100a::CalibV1',
                        'Camera::CalibV1',
                        'Andor::CalibV1',
                        'Acqiris::CalibV1',
                        'Imp::CalibV1',
                        'Camera::CalibV1',
                        'Camera::CalibV1',
                        'EvrData::CalibV1',
                        'Camera::CalibV1',
                        'Timepix::CalibV1',
                        'Fli::CalibV1',
                        'Pimax::CalibV1',
                        'Andor3d::CalibV1',
                        'Jungfrau::CalibV1'
                        )

Definition at line 152 of file GlobalUtils.py.

tuple GlobalUtils::dic_det_type_to_name = dict(zip(list_of_det_type, list_of_det_names)) [static]

Definition at line 182 of file GlobalUtils.py.

tuple GlobalUtils::dic_det_type_to_calib_group = dict(zip(list_of_det_type, list_of_calib_groups)) [static]

Definition at line 185 of file GlobalUtils.py.

GlobalUtils::bld_names = \ [static]

Definition at line 189 of file GlobalUtils.py.


Generated on 19 Dec 2016 for PSDMSoftware by  doxygen 1.4.7