Functions | |
def | is_good_fname |
def | evt_to_tsec |
def | add_constants_to_file |
def | add_constants |
def | get_constants_from_file |
def | get_constants |
def | delete_version_from_file |
def | delete_version |
def | delete_range_from_file |
def | delete_range |
def | delete_ctype_from_file |
def | delete_ctype |
def | print_content_from_file |
def | print_content |
def | get_constants_v0 |
def | test_add_constants |
def | test_add_constants_to_file |
def | test_add_text |
def | test_add_text_to_file |
def | test_add_constants_two |
def | test_get_constants |
def | test_get_constants_from_file |
def | test_delete_version |
def | test_delete_version_from_file |
def | test_delete_range |
def | test_delete_range_from_file |
def | test_delete_ctype |
def | test_delete_ctype_from_file |
def | test_print_content |
def | test_print_content_from_file |
def | test_misc |
def | set_parameters |
def | do_test |
Variables | |
string | __version__ = "$Revision: 12894 $" |
sp = dcu.sp | |
gu = dcu.gu |
def DCMethods::is_good_fname | ( | fname, | ||
verb = False | ||||
) |
Checks the hdf5 file name parameter fname validity, returns True or False. Parameters fname : str - full path to the file
Definition at line 103 of file DCMethods.py.
def DCMethods::evt_to_tsec | ( | par | ) |
Checks if par is float or assumes that it is psana.Event and returns event time in (float) sec or None. Parameters par : psana.Event | float - tsec event time | None
Definition at line 128 of file DCMethods.py.
def DCMethods::add_constants_to_file | ( | data, | ||
fname, | ||||
par, | ||||
env = None , |
||||
ctype = gu.PIXEL_MASK , |
||||
vers = None , |
||||
pred = None , |
||||
succ = None , |
||||
cmt = None , |
||||
verb = False | ||||
) |
Adds specified numpy array to the hdf5 file. Parameters data : numpy.array or str - array or string of calibration constants/data to save in file fname: full path to the hdf5 file par : psana.Event | float - tsec event time env : psana.Env -> full detector name for psana.Source ctype: gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK vers : int - calibration version pred : str - predecessor name succ : str - successor name cmt : str - comment saved as a history record within DCRange verb : bool - verbosity, default=False - do not prnt any message Back to :py:class:`PSCalib.DCMethods`
Definition at line 142 of file DCMethods.py.
def DCMethods::add_constants | ( | data, | ||
evt, | ||||
env, | ||||
src = 'Epix100a.' , |
||||
ctype = gu.PIXEL_MASK , |
||||
calibdir = None , |
||||
vers = None , |
||||
pred = None , |
||||
succ = None , |
||||
cmt = None , |
||||
verb = False | ||||
) |
Adds specified numpy array to the hdf5 file. Parameters data : numpy.array or str - array or string of calibration constants/data to save in file env : psana.Env -> full detector name for psana.Source evt : psana.Event -> event time src : str - source short/full name, alias or full ctype: gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK calibdir : str - fallback path to calib dir (if xtc file is copied - calib and experiment name are lost) vers : int - calibration version pred : str - predecessor name succ : str - successor name cmt : str - comment saved as a history record within DCRange verb : bool - verbosity, default=False - do not prnt any message Back to :py:class:`PSCalib.DCMethods`
Definition at line 225 of file DCMethods.py.
def DCMethods::get_constants_from_file | ( | fname, | ||
par, | ||||
ctype = gu.PIXEL_MASK , |
||||
vers = None , |
||||
verb = False | ||||
) |
Returns specified array of calibration constants. Parameters fname : full path to the hdf5 file par : psana.Event | float - tsec event time ctype : gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK vers : int - calibration version Back to :py:class:`PSCalib.DCMethods`
Definition at line 268 of file DCMethods.py.
def DCMethods::get_constants | ( | par, | ||
env, | ||||
src = 'Epix100a.' , |
||||
ctype = gu.PIXEL_MASK , |
||||
calibdir = None , |
||||
vers = None , |
||||
verb = False | ||||
) |
Returns specified array of calibration constants. Parameters par : psana.Event | float - tsec event time env : psana.Env -> full detector name for psana.Source src : str - source short/full name, alias or full ctype : gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK calibdir : str - fallback path to calib dir (if xtc file is copied - calib and experiment name are lost) vers : int - calibration version Back to :py:class:`PSCalib.DCMethods`
Definition at line 309 of file DCMethods.py.
def DCMethods::delete_version_from_file | ( | fname, | ||
par, | ||||
ctype = gu.PIXEL_MASK , |
||||
vers = None , |
||||
cmt = None , |
||||
verb = False | ||||
) |
Delete specified version from calibration constants. Parameters fname : full path to the hdf5 file par : psana.Event | float - tsec event time ctype : gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK vers : int - calibration version cmt : str - comment verb : bool - verbousity Back to :py:class:`PSCalib.DCMethods`
Definition at line 340 of file DCMethods.py.
def DCMethods::delete_version | ( | evt, | ||
env, | ||||
src = 'Epix100a.' , |
||||
ctype = gu.PIXEL_MASK , |
||||
calibdir = None , |
||||
vers = None , |
||||
cmt = None , |
||||
verb = False | ||||
) |
Delete specified version from calibration constants. Parameters evt : psana.Event -> event time env : psana.Env -> full detector name for psana.Source src : str - source short/full name, alias or full ctype : gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK calibdir : str - fallback path to calib dir (if xtc file is copied - calib and experiment name are lost) vers : int - calibration version cmt : str - comment verb : bool - verbousity Back to :py:class:`PSCalib.DCMethods`
Definition at line 389 of file DCMethods.py.
def DCMethods::delete_range_from_file | ( | fname, | ||
ctype = gu.PIXEL_MASK , |
||||
range = None , |
||||
cmt = None , |
||||
verb = False | ||||
) |
Delete specified time range from calibration constants. Parameters fname : full path to the hdf5 file ctype : gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK range : str - range, e.g. '1474587520-end' cmt : str - comment verb : bool - verbousity Back to :py:class:`PSCalib.DCMethods`
Definition at line 422 of file DCMethods.py.
def DCMethods::delete_range | ( | evt, | ||
env, | ||||
src = 'Epix100a.' , |
||||
ctype = gu.PIXEL_MASK , |
||||
calibdir = None , |
||||
range = None , |
||||
cmt = None , |
||||
verb = False | ||||
) |
Delete specified time range from calibration constants. Parameters evt : psana.Event -> event time env : psana.Env -> full detector name for psana.Source src : str - source short/full name, alias or full ctype : gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK calibdir : str - fallback path to calib dir (if xtc file is copied - calib and experiment name are lost) range : str - range, e.g. '1474587520-end' cmt : str - comment verb : bool - verbousity Back to :py:class:`PSCalib.DCMethods`
Definition at line 465 of file DCMethods.py.
def DCMethods::delete_ctype_from_file | ( | fname, | ||
ctype = gu.PIXEL_MASK , |
||||
cmt = None , |
||||
verb = False | ||||
) |
Delete specified ctype from calibration constants. Parameters fname : full path to the hdf5 file ctype : gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK cmt : str - comment verb : bool - verbousity Back to :py:class:`PSCalib.DCMethods`
Definition at line 498 of file DCMethods.py.
def DCMethods::delete_ctype | ( | evt, | ||
env, | ||||
src = 'Epix100a.' , |
||||
ctype = gu.PIXEL_MASK , |
||||
calibdir = None , |
||||
cmt = None , |
||||
verb = False | ||||
) |
Delete specified ctype from calibration constants. Parameters evt : psana.Event -> event time env : psana.Env -> full detector name for psana.Source src : str - source short/full name, alias or full ctype : gu.CTYPE - enumerated calibration type, e.g.: gu.PIXEL_MASK calibdir : str - fallback path to calib dir (if xtc file is copied - calib and experiment name are lost) cmt : str - comment verb : bool - verbousity Back to :py:class:`PSCalib.DCMethods`
Definition at line 537 of file DCMethods.py.
def DCMethods::print_content_from_file | ( | fname | ) |
Prints content of the file. Parameters fname : str - full path to the file Back to :py:class:`PSCalib.DCMethods`
Definition at line 567 of file DCMethods.py.
def DCMethods::print_content | ( | env, | ||
src = 'Epix100a.' , |
||||
calibdir = None | ||||
) |
Defines the file name and prints file content. Parameters env : psana.Env -> full detector name for psana.Source src : str - source short/full name, alias or full calibdir : str - fallback path to calib dir (if xtc file is copied - calib and experiment name are lost) Back to :py:class:`PSCalib.DCMethods`
Definition at line 591 of file DCMethods.py.
def DCMethods::get_constants_v0 | ( | par, | ||
opt | ||||
) |
Definition at line 615 of file DCMethods.py.
def DCMethods::test_add_constants | ( | ) |
Definition at line 620 of file DCMethods.py.
def DCMethods::test_add_constants_to_file | ( | ) |
Definition at line 638 of file DCMethods.py.
def DCMethods::test_add_text | ( | ) |
Definition at line 658 of file DCMethods.py.
def DCMethods::test_add_text_to_file | ( | ) |
Definition at line 676 of file DCMethods.py.
def DCMethods::test_add_constants_two | ( | ) |
Definition at line 696 of file DCMethods.py.
def DCMethods::test_get_constants | ( | ) |
Definition at line 720 of file DCMethods.py.
def DCMethods::test_get_constants_from_file | ( | ) |
Definition at line 733 of file DCMethods.py.
def DCMethods::test_delete_version | ( | ) |
Definition at line 746 of file DCMethods.py.
def DCMethods::test_delete_version_from_file | ( | ) |
Definition at line 757 of file DCMethods.py.
def DCMethods::test_delete_range | ( | ) |
Definition at line 769 of file DCMethods.py.
def DCMethods::test_delete_range_from_file | ( | ) |
Definition at line 780 of file DCMethods.py.
def DCMethods::test_delete_ctype | ( | ) |
Definition at line 791 of file DCMethods.py.
def DCMethods::test_delete_ctype_from_file | ( | ) |
Definition at line 801 of file DCMethods.py.
def DCMethods::test_print_content | ( | ) |
Definition at line 812 of file DCMethods.py.
def DCMethods::test_print_content_from_file | ( | ) |
Definition at line 820 of file DCMethods.py.
def DCMethods::test_misc | ( | ) |
Definition at line 828 of file DCMethods.py.
def DCMethods::set_parameters | ( | ) |
Definition at line 841 of file DCMethods.py.
def DCMethods::do_test | ( | ) |
Definition at line 869 of file DCMethods.py.
string DCMethods::__version__ = "$Revision: 12894 $" [static] |
Definition at line 84 of file DCMethods.py.
DCMethods::sp = dcu.sp [static] |
Definition at line 98 of file DCMethods.py.
DCMethods::gu = dcu.gu [static] |
Definition at line 99 of file DCMethods.py.