nxstools packageΒΆ

SubmodulesΒΆ

nxstools.filenamegenerator moduleΒΆ

Filename generator

class nxstools.filenamegenerator.FilenameGenerator(fname_template, start_index=0, stop_index=None)[source]ΒΆ

Bases: object

Generate image file names

(c) Copyright 2015 Eugen Wintersberger <eugen.wintersberger@gmail.com> (c) Copyright 2015 DESY This file is part of nx2img.

nx2img is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

nx2img is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with nx2img. If not, see <http://www.gnu.org/licenses/>.

Generator class creating image file names.

Parameters:
  • fname_template (str) – file name template

  • start_index (int) – file start index

  • stop_index (int) – file stop index

file_indexΒΆ

(int) file start index

file_templateΒΆ

(str) file name template

static from_slice(file_template)[source]ΒΆ

Static factory method to create a filename_generator instance from a sliced user input

Parameters:

file_template (str) – file template

Returns:

filename generator object

Return type:

FilenameGenerator

stop_indexΒΆ

(int) file stop index

nxstools.filewriter moduleΒΆ

Provides abstraction for file writer

class nxstools.filewriter.FTAttribute(h5object, tparent=None)[source]ΒΆ

Bases: FTObject

virtual file tree attribute

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

property dtypeΒΆ

attribute data type

Returns:

attribute data type

Return type:

str

read()[source]ΒΆ

read attribute value

Returns:

python object

Return type:

any

reopen()[source]ΒΆ

reopen attribute

property shapeΒΆ

attribute shape

Returns:

attribute shape

Return type:

list < int >

write(o)[source]ΒΆ

write attribute value

Parameters:

o (any) – python object

class nxstools.filewriter.FTAttributeManager(h5object, tparent=None)[source]ΒΆ

Bases: FTObject

file tree attribute

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

create(name, dtype, shape=None, overwrite=False)[source]ΒΆ

create a new attribute

Parameters:
  • name (str) – attribute name

  • dtype (str) – attribute type

  • shape (list`< :obj:`int>) – attribute shape

  • overwrite (bool) – overwrite flag

Returns:

attribute object

Return type:

FTAtribute

names()[source]ΒΆ

key values

Returns:

attribute names

Return type:

list <str>

reopen()[source]ΒΆ

reopen attribute

class nxstools.filewriter.FTDataFilter(h5object=None, tparent=None)[source]ΒΆ

Bases: FTObject

file tree data filter

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

property availabilityΒΆ

getter for filter availability

Returns:

filter availability

Return type:

tuple <str>

property filteridΒΆ

getter for compression filter id

Returns:

compression rate

Return type:

int

property nameΒΆ

getter for filter name

Returns:

filter name

Return type:

tuple <str>

property optionsΒΆ

getter for compression options

Returns:

compression options

Return type:

tuple <int>

property rateΒΆ

getter for compression rate

Returns:

compression rate

Return type:

int

reopen()[source]ΒΆ

reopen attribute

property shuffleΒΆ

getter for compression shuffle

Returns:

compression shuffle

Return type:

bool

class nxstools.filewriter.FTDeflate(h5object=None, tparent=None)[source]ΒΆ

Bases: FTDataFilter

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

class nxstools.filewriter.FTField(h5object, tparent=None)[source]ΒΆ

Bases: FTObject

file writer field

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

property attributesΒΆ

return the attribute manager

Returns:

attribute manager

Return type:

FTAttributeManager

property dtypeΒΆ

field data type

Returns:

field data type

Return type:

str

grow(dim=0, ext=1)[source]ΒΆ

grow the field

Parameters:
  • dim (int) – growing dimension

  • dim – size of the grow

read()[source]ΒΆ

read the field value

Returns:

h5 object

Return type:

any

refresh()[source]ΒΆ

refresh the field

Returns:

refreshed

Return type:

bool

reopen()[source]ΒΆ

reopen attribute

property shapeΒΆ

field shape

Returns:

field shape

Return type:

list < int >

property sizeΒΆ

field size

Returns:

field size

Return type:

int

write(o)[source]ΒΆ

write the field value

Parameters:

o (any) – h5 object

class nxstools.filewriter.FTFile(h5object, filename)[source]ΒΆ

Bases: FTObject

file tree file

constructor

Parameters:
  • h5object (any) – h5 object

  • filename (str) – file name

  • writer (PNIWriter or H5PYWriter or H5CppWriter) – writer module

classmethod currenttime()[source]ΒΆ

returns current time string

Returns:

current time

Return type:

str

default_field()[source]ΒΆ

field pointed by default attributes

Returns:

field pointed by default attributes

Return type:

FTField

flush()[source]ΒΆ

flash the data

hasswmr()[source]ΒΆ

if has swmr_mode

Returns:

has swmr_mode

Return type:

bool

nameΒΆ

(str) file name

property readonlyΒΆ

check if file is readonly

Returns:

readonly flag

Return type:

bool

reopen(readonly=False, swmr=False, libver=None)[source]ΒΆ

reopen attribute

Parameters:
  • readonly (bool) – readonly flag

  • swmr (bool) – swmr flag

  • libver (str) – library version, default: β€˜latest’

root()[source]ΒΆ

root object

Returns:

parent object

Return type:

FTGroup

class nxstools.filewriter.FTGroup(h5object, tparent=None)[source]ΒΆ

Bases: FTObject

file tree group

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

property attributesΒΆ

return the attribute manager

Returns:

attribute manager

Return type:

FTAttributeManager

create_field(name, type_code, shape=None, chunk=None, dfilter=None)[source]ΒΆ

open a file tree element

Parameters:
  • n (str) – group name

  • type_code (str) – nexus field type

  • shape (list < int >) – shape

  • chunk (list < int >) – chunk

  • dfilter (FTDeflate) – filter deflater

Returns:

file tree field

Return type:

FTField

create_group(n, nxclass='')[source]ΒΆ

open a file tree element

Parameters:
  • n (str) – group name

  • nxclass (str) – group type

Returns:

file tree group

Return type:

FTGroup

create_virtual_field(name, layout, fillvalue=None)[source]ΒΆ

creates a virtual filed tres element

Parameters:
  • name (str) – group name

  • layout (H5CppFieldLayout) – virual field layout

  • fillvalue (int or np.ndarray) – fill value

default_field(signals=None, nexuspath=None)[source]ΒΆ

field pointed by default attributes

Parameters:
  • axes – axes names

  • entryname (str) – base nexus path to be opened

Returns:

field pointed by default attributes

Return type:

FTField

exists(name)[source]ΒΆ

if child exists

Parameters:

name (str) – child name

Returns:

existing flag

Return type:

bool

names()[source]ΒΆ

read the child names

Returns:

h5 object

Return type:

list <str>

open(name)[source]ΒΆ

open a file tree element

Parameters:

name (str) – element name

Returns:

file tree object

Return type:

FTObject

open a file tree element as link

Parameters:

name (str) – element name

Returns:

file tree object

Return type:

FTObject

reopen()[source]ΒΆ

reopen attribute

property sizeΒΆ

group size

Returns:

group size

Return type:

int

stepsperfileΒΆ

(int) steps per file

class nxstools.filewriter.FTHyperslab(offset=None, block=None, count=None, stride=None)[source]ΒΆ

Bases: object

hyperslab class

constructor

Parameters:
  • offset (tuple <int>) – a list of offsets

  • block (tuple <int>) – a list of blocks

  • count (tuple <int>) – a list of counts

  • stride (tuple <int>) – a list of strides

Bases: FTObject

file tree link

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

refresh()[source]ΒΆ

refresh the link

Returns:

refreshed

Return type:

bool

reopen()[source]ΒΆ

reopen attribute

property target_pathΒΆ

target path

Returns:

target path

Return type:

str

class nxstools.filewriter.FTObject(h5object, tparent=None)[source]ΒΆ

Bases: object

virtual file tree object

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – tree parent

append(child)[source]ΒΆ

append child weakref

Parameters:

tparent (FTObject) – tree parent

close()[source]ΒΆ

close element

property h5objectΒΆ

provide object of native library

Returns:

h5 object

Return type:

any

property is_validΒΆ

check if attribute is valid

Returns:

valid flag

Return type:

bool

property parentΒΆ

return the parent object

Returns:

file tree group

Return type:

FTGroup

reload()[source]ΒΆ

reload a list of valid children

class nxstools.filewriter.FTTargetFieldView(h5object=None)[source]ΒΆ

Bases: FTObject

target field view for VDS

constructor

Parameters:

h5object (any) – h5 object

class nxstools.filewriter.FTVirtualFieldLayout(h5object=None)[source]ΒΆ

Bases: FTObject

virtual field layout

constructor

Parameters:

h5object (any) – h5 object

add(key, source, sourcekey=None)[source]ΒΆ

add target field to layout

Parameters:
nxstools.filewriter.create_file(filename, overwrite=False, **pars)[source]ΒΆ

create a new file

Parameters:
  • filename (str) – file name

  • overwrite (bool) – overwrite flag

  • pars (dict < str, str>) – parameters

Returns:

file object

Return type:

FTFile

nxstools.filewriter.data_filter(parent=None)[source]ΒΆ

create deflate filter

Parameters:

parent (FTObject) – parent object

Returns:

deflate filter object

Return type:

FTDeflate

nxstools.filewriter.deflate_filter(parent=None)ΒΆ

create deflate filter

Parameters:

parent (FTObject) – parent object

Returns:

deflate filter object

Return type:

FTDeflate

nxstools.filewriter.first(array)[source]ΒΆ

get first element if the only

Parameters:

array (any) – numpy array

Returns:

first element of the array

get links

Parameters:

parent (FTObject) – parent object

Returns:

list of link objects

Return type:

obj:

list <FTLink>

create link

Parameters:
  • target (str) – file name

  • parent (FTObject) – parent object

  • name (str) – link name

Returns:

link object

Return type:

FTLink

nxstools.filewriter.load_file(membuffer, filename=None, readonly=False, **pars)[source]ΒΆ

load a file from memory byte buffer

Parameters:
  • membuffer (bytes or io.BytesIO) – memory buffer

  • filename (str) – file name

  • readonly (bool) – readonly flag

  • pars (dict < str, str>) – parameters

Returns:

file objects

Return type:

H5PYFile or H5CppFile

nxstools.filewriter.open_file(filename, readonly=False, **pars)[source]ΒΆ

open the new file

Parameters:
  • filename (str) – file name

  • readonly (bool) – readonly flag

  • pars (dict < str, str>) – parameters

Returns:

file object

Return type:

FTFile

nxstools.filewriter.setwriter(wr)[source]ΒΆ

sets writer

Parameters:

wr (PNIWriter or H5PYWriter or H5CppWriter) – writer module

nxstools.filewriter.target_field_view(filename, fieldpath, shape, dtype=None, maxshape=None, parent=None)[source]ΒΆ

create target field view for VDS

Parameters:
  • filename (str) – file name

  • fieldpath (str) – nexus field path

  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

  • parent (FTObject) – parent object

Returns:

target field object

Return type:

FTTargetFieldView

nxstools.filewriter.unlimited(parent=None)[source]ΒΆ

return dataspace UNLIMITED variable for the current writer module

Parameters:

parent (FTObject) – parent object

Returns:

dataspace UNLIMITED variable

Return type:

h5cpp.dataspace.UNLIMITED or h5py.UNLIMITED

nxstools.filewriter.virtual_field_layout(shape, dtype, maxshape=None, parent=None)[source]ΒΆ

creates a virtual field layout for a VDS file

Parameters:
  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

  • parent (FTObject) – parent object

Returns:

virtual layout

Return type:

FTVirtualFieldLayout

nxstools.filewriter.writerlock = <unlocked _thread.lock object>ΒΆ

(threading.Lock) writer module

nxstools.h5cppwriter moduleΒΆ

Provides h5cpp file writer

class nxstools.h5cppwriter.H5CppAttribute(h5object, tparent=None)[source]ΒΆ

Bases: FTAttribute

file tree attribute

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

close()[source]ΒΆ

close attribute

property dtypeΒΆ

field data type

Returns:

field data type

Return type:

str

property is_validΒΆ

check if attribute is valid

Returns:

valid flag

Return type:

bool

nameΒΆ

(str) object name

pathΒΆ

(str) object nexus path

read()[source]ΒΆ

read attribute value

Returns:

python object

Return type:

any

reopen()[source]ΒΆ

reopen attribute

property shapeΒΆ

attribute shape

Returns:

attribute shape

Return type:

list < int >

write(o)[source]ΒΆ

write attribute value

Parameters:

o (any) – python object

class nxstools.h5cppwriter.H5CppAttributeManager(h5object, tparent=None)[source]ΒΆ

Bases: FTAttributeManager

file tree attribute

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

close()[source]ΒΆ

close attribure manager

create(name, dtype, shape=None, overwrite=False)[source]ΒΆ

create a new attribute

Parameters:
  • name (str) – attribute name

  • dtype (str) – attribute type

  • shape (list < int >) – attribute shape

  • overwrite (bool) – overwrite flag

Returns:

attribute object

Return type:

H5CppAtribute

property is_validΒΆ

check if link is valid

Returns:

valid flag

Return type:

bool

nameΒΆ

(str) object name

names()[source]ΒΆ

key values

Returns:

attribute names

Return type:

list <str>

pathΒΆ

(str) object nexus path

reopen()[source]ΒΆ

reopen field

class nxstools.h5cppwriter.H5CppDataFilter(h5object=None, tparent=None)[source]ΒΆ

Bases: FTDataFilter

file tree deflate

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

class nxstools.h5cppwriter.H5CppDeflate(h5object=None, tparent=None)[source]ΒΆ

Bases: H5CppDataFilter

deflate filter

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

class nxstools.h5cppwriter.H5CppField(h5object, tparent=None)[source]ΒΆ

Bases: FTField

file tree file

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

property attributesΒΆ

return the attribute manager

Returns:

attribute manager

Return type:

H5CppAttributeManager

close()[source]ΒΆ

close field

property dtypeΒΆ

field data type

Returns:

field data type

Return type:

str

grow(dim=0, ext=1)[source]ΒΆ

grow the field

Parameters:
  • dim (int) – growing dimension

  • dim – size of the grow

property is_validΒΆ

check if field is valid

Returns:

valid flag

Return type:

bool

nameΒΆ

(str) object name

pathΒΆ

(str) object nexus path

read()[source]ΒΆ

read the field value

Returns:

h5 object

Return type:

any

refresh()[source]ΒΆ

refresh the field

Returns:

refreshed

Return type:

bool

reopen()[source]ΒΆ

reopen field

property shapeΒΆ

field shape

Returns:

field shape

Return type:

list < int >

property sizeΒΆ

field size

Returns:

field size

Return type:

int

write(o)[source]ΒΆ

write the field value

Parameters:

o (any) – h5 object

class nxstools.h5cppwriter.H5CppFile(h5object, filename)[source]ΒΆ

Bases: FTFile

file tree file

constructor

Parameters:
  • h5object (any) – h5 object

  • filename (str) – file name

close()[source]ΒΆ

close file

filenameΒΆ

(str) nexus file name

flush()[source]ΒΆ

flash the data

property is_validΒΆ

check if file is valid

Returns:

valid flag

Return type:

bool

pathΒΆ

(str) object nexus path

property readonlyΒΆ

check if file is readonly

Returns:

readonly flag

Return type:

bool

reopen(readonly=False, swmr=False, libver=None)[source]ΒΆ

reopen file

Parameters:
  • readonly (bool) – readonly flag

  • swmr (bool) – swmr flag

  • libver (str) – library version, default: β€˜latest’

root()[source]ΒΆ

root object

Returns:

parent object

Return type:

H5CppGroup

class nxstools.h5cppwriter.H5CppGroup(h5object, tparent=None)[source]ΒΆ

Bases: FTGroup

file tree group

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – tree parent

class H5CppGroupIter(group)[source]ΒΆ

Bases: object

constructor

Parameters:

group – group object

next()ΒΆ

the next attribute

Returns:

attribute object

Return type:

FTAtribute

property attributesΒΆ

return the attribute manager

Returns:

attribute manager

Return type:

H5CppAttributeManager

close()[source]ΒΆ

close group

create_field(name, type_code, shape=None, chunk=None, dfilter=None)[source]ΒΆ

open a file tree element

Parameters:
  • n (str) – group name

  • type_code (str) – nexus field type

  • shape (list < int >) – shape

  • chunk (list < int >) – chunk

  • dfilter (H5CppDataFilter) – filter deflater

Returns:

file tree field

Return type:

H5CppField

create_group(n, nxclass=None)[source]ΒΆ

open a file tree element

Parameters:
  • n (str) – group name

  • nxclass (str) – group type

Returns:

file tree group

Return type:

H5CppGroup

create_virtual_field(name, layout, fillvalue=0)[source]ΒΆ

creates a virtual filed tres element

Parameters:
  • name (str) – field name

  • layout (H5CppFieldLayout) – virual field layout

  • fillvalue (int or np.ndarray) – fill value

exists(name)[source]ΒΆ

if child exists

Parameters:

name (str) – child name

Returns:

existing flag

Return type:

bool

property is_validΒΆ

check if field is valid

Returns:

valid flag

Return type:

bool

nameΒΆ

(str) object name

names()[source]ΒΆ

read the child names

Returns:

h5 object

Return type:

list <str>

open(name)[source]ΒΆ

open a file tree element

Parameters:

name (str) – element name

Returns:

file tree object

Return type:

FTObject

open a file tree element as link

Parameters:

name (str) – element name

Returns:

file tree object

Return type:

FTObject

pathΒΆ

(str) object nexus path

reopen()[source]ΒΆ

reopen group

property sizeΒΆ

group size

Returns:

group size

Return type:

int

Bases: FTLink

file tree link

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

close()[source]ΒΆ

close group

classmethod getfilename(obj)[source]ΒΆ

provides a filename from h5 node

Parameters:

obj (FTObject) – h5 node

Returns:

file name

Return type:

str

property is_validΒΆ

check if link is valid

Returns:

valid flag

Return type:

bool

nameΒΆ

(str) object name

pathΒΆ

(str) object nexus path

refresh()[source]ΒΆ

refresh the field

Returns:

refreshed

Return type:

bool

reopen()[source]ΒΆ

reopen field

property target_pathΒΆ

target path

Returns:

target path

Return type:

str

class nxstools.h5cppwriter.H5CppTargetFieldView(filename, fieldpath, shape, dtype=None, maxshape=None)[source]ΒΆ

Bases: FTTargetFieldView

target field for VDS

constructor

Parameters:
  • filename (str) – file name

  • fieldpath (str) – nexus field path

  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

fieldpathΒΆ

(str) nexus field path

filenameΒΆ

(str) directory and file name

maxshapeΒΆ

(list < int >) maximal shape

shapeΒΆ

(list < int >) shape

class nxstools.h5cppwriter.H5CppVirtualFieldLayout(h5object, shape, dtype=None, maxshape=None)[source]ΒΆ

Bases: FTVirtualFieldLayout

virtual field layout

constructor

Parameters:
  • h5object (any) – h5 object

  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

add(key, source, sourcekey=None, shape=None)[source]ΒΆ

add target field to layout

Parameters:
  • key (tuple) – slide

  • source (H5PYTargetFieldView) – target field view

  • sourcekey (tuple) – slide or selection

  • shape (tuple) – target shape in the layout

maxshapeΒΆ

(list < int >) maximal shape

shapeΒΆ

(list < int >) shape

nxstools.h5cppwriter.create_file(filename, overwrite=False, libver=None, swmr=None)[source]ΒΆ

create a new file

Parameters:
  • filename (str) – file name

  • overwrite (bool) – overwrite flag

  • libver (str) – library version: β€˜lastest’ or β€˜earliest’

Returns:

file object

Return type:

H5CppFile

nxstools.h5cppwriter.data_filter(filterid=None, name=None, options=None, availability=None, shuffle=None, rate=None)[source]ΒΆ

create data filter

Parameters:
  • filterid (int) – hdf5 filter id

  • name (str) – filter name

  • options (tuple <int>) – filter cd values

  • availability (str) – filter availability i.e. β€˜optional’ or β€˜mandatory’

  • shuffle (bool) – filter shuffle

  • rate (bool) – filter shuffle

Returns:

data filter object

Return type:

H5CppDataFilter

nxstools.h5cppwriter.deflate_filter(rate=None, shuffle=None, availability=None)[source]ΒΆ

create data filter

Parameters:
  • rate (bool) – filter shuffle

  • shuffle (bool) – filter shuffle

Returns:

deflate filter object

Return type:

H5CppDataFilter

get links

Parameters:

parent (FTObject) – parent object

Returns:

list of link objects

Returns:

link object

Return type:

obj:

list <H5CppLink>

nxstools.h5cppwriter.is_image_file_supported()[source]ΒΆ

provides if loading of image files are supported

Retruns:

if loading of image files are supported

Return type:

bool

nxstools.h5cppwriter.is_unlimited_vds_supported()[source]ΒΆ

provides if unlimited vds are supported

Retruns:

if unlimited vds are supported

Return type:

bool

nxstools.h5cppwriter.is_vds_supported()[source]ΒΆ

provides if vds are supported

Retruns:

if vds are supported

Return type:

bool

create link

Parameters:
  • target (str) – nexus path name

  • parent (FTObject) – parent object

  • name (str) – link name

Returns:

link object

Return type:

H5CppLink

nxstools.h5cppwriter.load_file(membuffer, filename=None, readonly=False, **pars)[source]ΒΆ

load a file from memory byte buffer

Parameters:
  • membuffer (bytes or io.BytesIO) – memory buffer

  • filename (str) – file name

  • readonly (bool) – readonly flag

  • pars (dict < str, str>) – parameters

Returns:

file object

Return type:

H5PYFile

nxstools.h5cppwriter.nptype(dtype)[source]ΒΆ

converts to numpy types

Parameters:

dtype (str) – h5 writer type type

Returns:

nupy type

Return type:

str

nxstools.h5cppwriter.open_file(filename, readonly=False, libver=None, swmr=False)[source]ΒΆ

open the new file

Parameters:
  • filename (str) – file name

  • readonly (bool) – readonly flag

  • libver (str) – library version: β€˜lastest’ or β€˜earliest’

Returns:

file object

Return type:

H5CppFile

nxstools.h5cppwriter.target_field_view(filename, fieldpath, shape, dtype=None, maxshape=None)[source]ΒΆ

create target field view for VDS

Parameters:
  • filename (str) – file name

  • fieldpath (str) – nexus field path

  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

Returns:

target field view object

Return type:

H5CppTargetFieldView

nxstools.h5cppwriter.unlimited(parent=None)[source]ΒΆ

return dataspace UNLIMITED variable for the current writer module

Parameters:

parent (FTObject) – parent object

Returns:

dataspace UNLIMITED variable

Return type:

h5cpp.dataspace.UNLIMITED

nxstools.h5cppwriter.unlimited_selection(sel, shape)[source]ΒΆ

checks if hyperslab is unlimited

Parameters:
  • sel (filewriter.FTHyperslab) – hyperslab selection

  • shape (list) – give shape

Returns:

if hyperslab is unlimited list

Return type:

list <bool>

nxstools.h5cppwriter.virtual_field_layout(shape, dtype, maxshape=None)[source]ΒΆ

creates a virtual field layout for a VDS file

Parameters:
  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

Returns:

virtual layout

Return type:

H5CppVirtualFieldLayout

nxstools.h5pywriter moduleΒΆ

Provides h5py file writer

class nxstools.h5pywriter.H5PYAttribute(h5object, tparent=None)[source]ΒΆ

Bases: FTAttribute

file tree attribute

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

close()[source]ΒΆ

close attribute

property dtypeΒΆ

attribute data type

Returns:

attribute data type

Return type:

str

property is_validΒΆ

check if field is valid

Returns:

valid flag

Return type:

bool

read()[source]ΒΆ

read attribute value

Returns:

python object

Return type:

any

reopen()[source]ΒΆ

reopen attribute

property shapeΒΆ

attribute shape

Returns:

attribute shape

Return type:

list < int >

write(o)[source]ΒΆ

write attribute value

Parameters:

o (any) – python object

class nxstools.h5pywriter.H5PYAttributeManager(h5object, tparent=None)[source]ΒΆ

Bases: FTAttributeManager

file tree attribute

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

class H5PYAttrIter(manager)[source]ΒΆ

Bases: object

constructor

Parameters:

manager (H5PYAttributeManager) – attribute manager

next()ΒΆ

the next attribute

Returns:

attribute object

Return type:

FTAtribute

close()[source]ΒΆ

close attribure manager

create(name, dtype, shape=None, overwrite=False)[source]ΒΆ

create a new attribute

Parameters:
  • name (str) – attribute name

  • dtype (str) – attribute type

  • shape (list < int >) – attribute shape

  • overwrite (bool) – overwrite flag

Returns:

attribute object

Return type:

H5PYAtribute

property is_validΒΆ

check if link is valid

Returns:

valid flag

Return type:

bool

nameΒΆ

(str) object name

names()[source]ΒΆ

key values

Returns:

attribute names

Return type:

list <str>

pathΒΆ

(str) object nexus path

reopen()[source]ΒΆ

reopen field

class nxstools.h5pywriter.H5PYDataFilter(h5object=None, tparent=None)[source]ΒΆ

Bases: FTDataFilter

file tree data filter

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

class nxstools.h5pywriter.H5PYDeflate(h5object=None, tparent=None)[source]ΒΆ

Bases: H5PYDataFilter

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

class nxstools.h5pywriter.H5PYField(h5object, tparent=None)[source]ΒΆ

Bases: FTField

file writer field

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

property attributesΒΆ

return the attribute manager

Returns:

attribute manager

Return type:

H5PYAttributeManager

close()[source]ΒΆ

close field

property dtypeΒΆ

field data type

Returns:

field data type

Return type:

str

grow(dim=0, ext=1)[source]ΒΆ

grow the field

Parameters:
  • dim (int) – growing dimension

  • dim – size of the grow

property is_validΒΆ

check if group is valid

Returns:

valid flag

Return type:

bool

read()[source]ΒΆ

read the field value

Returns:

h5 object

Return type:

any

refresh()[source]ΒΆ

refresh the field

Returns:

refreshed

Return type:

bool

reopen()[source]ΒΆ

reopen field

property shapeΒΆ

field shape

Returns:

field shape

Return type:

list < int >

property sizeΒΆ

field size

Returns:

field size

Return type:

int

write(o)[source]ΒΆ

write the field value

Parameters:

o (any) – h5 object

class nxstools.h5pywriter.H5PYFile(h5object, filename)[source]ΒΆ

Bases: FTFile

file tree file

constructor

Parameters:
  • h5object (any) – h5 object

  • filename (str) – file name

close()[source]ΒΆ

close file

flush()[source]ΒΆ

flash the data

hasswmr()[source]ΒΆ

if has swmr_mode

Returns:

has swmr_mode

Return type:

bool

property is_validΒΆ

check if group is valid

Returns:

valid flag

Return type:

bool

pathΒΆ

(str) object nexus path

property readonlyΒΆ

check if file is readonly

Returns:

readonly flag

Return type:

bool

reopen(readonly=False, swmr=False, libver=None)[source]ΒΆ

reopen file

Parameters:
  • readonly (bool) – readonly flag

  • swmr (bool) – swmr flag

  • libver (str) – library version, default: β€˜latest’

root()[source]ΒΆ

root object

Returns:

parent object

Return type:

H5PYGroup

class nxstools.h5pywriter.H5PYGroup(h5object, tparent=None)[source]ΒΆ

Bases: FTGroup

file tree group

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

class H5PYGroupIter(group)[source]ΒΆ

Bases: object

constructor

Parameters:

group – group object

next()ΒΆ

the next attribute

Returns:

attribute object

Return type:

FTAtribute

property attributesΒΆ

return the attribute manager

Returns:

attribute manager

Return type:

H5PYAttributeManager

close()[source]ΒΆ

close group

create_field(name, type_code, shape=None, chunk=None, dfilter=None)[source]ΒΆ

creates a field tree element

Parameters:
  • name (str) – group name

  • type_code (str) – nexus field type

  • shape (list < int >) – shape

  • chunk (list < int >) – chunk

  • dfilter (H5PYDataFilter) – filter deflater

Returns:

file tree field

Return type:

H5PYField

create_group(n, nxclass='')[source]ΒΆ

open a file tree element

Parameters:
  • n (str) – group name

  • nxclass (str) – group type

Returns:

file tree group

Return type:

H5PYGroup

create_virtual_field(name, layout, fillvalue=None)[source]ΒΆ

creates a virtual filed tres element

Parameters:
  • name (str) – group name

  • layout (H5PYFieldLayout) – virual field layout

  • fillvalue (int) – fill value

exists(name)[source]ΒΆ

if child exists

Parameters:

name (str) – child name

Returns:

existing flag

Return type:

bool

property is_validΒΆ

check if group is valid

Returns:

valid flag

Return type:

bool

names()[source]ΒΆ

read the child names

Returns:

h5 object

Return type:

list <str>

open(name)[source]ΒΆ

open a file tree element

Parameters:

name (str) – element name

Returns:

file tree object

Return type:

FTObject

open a file tree element as link

Parameters:

name (str) – element name

Returns:

file tree object

Return type:

FTObject

reopen()[source]ΒΆ

reopen file

property sizeΒΆ

group size

Returns:

group size

Return type:

int

Bases: FTLink

file tree link

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

close()[source]ΒΆ

close group

classmethod getfilename(obj)[source]ΒΆ

provides a filename from h5 node

Parameters:

obj (FTObject) – h5 node

Returns:

file name

Return type:

str

property is_validΒΆ

check if link is valid

Returns:

valid flag

Return type:

bool

read()[source]ΒΆ

read object value

Returns:

valid flag

Return type:

bool

refresh()[source]ΒΆ

refresh the field

Returns:

refreshed

Return type:

bool

reopen()[source]ΒΆ

reopen field

setname(name)[source]ΒΆ
property target_pathΒΆ

target path

Returns:

target path

Return type:

str

class nxstools.h5pywriter.H5PYTargetFieldView(h5object, shape)[source]ΒΆ

Bases: FTTargetFieldView

target field view for VDS

constructor

Parameters:
  • h5object (any) – h5 object

  • shape (list < int >) – shape

shapeΒΆ

(list < int >) shape

class nxstools.h5pywriter.H5PYVirtualFieldLayout(h5object, shape)[source]ΒΆ

Bases: FTVirtualFieldLayout

virtual field layout

constructor

Parameters:
  • h5object (any) – h5 object

  • shape (list < int >) – shape

add(key, source, sourcekey=None, shape=None)[source]ΒΆ

add target field to layout

Parameters:
  • key (tuple) – slide

  • source (H5PYTargetFieldView) – target field view

  • sourcekey (tuple) – slide or selection

  • shape (tuple) – target shape in the layout

shapeΒΆ

(list < int >) shape

nxstools.h5pywriter.create_file(filename, overwrite=False, **pars)[source]ΒΆ

create a new file

Parameters:
  • filename (str) – file name

  • overwrite (bool) – overwrite flag

  • pars (dict < str, str>) – parameters

Returns:

file object

Return type:

H5PYFile

nxstools.h5pywriter.data_filter(filterid=None, name=None, options=None, availability=None, shuffle=None, rate=None)[source]ΒΆ

create data filter

Parameters:
  • filterid (int) – hdf5 filter id

  • name (str) – filter name

  • options (tuple <int>) – filter cd values

  • availability (str) – filter availability i.e. β€˜optional’ or β€˜mandatory’

  • shuffle (bool) – filter shuffle

  • rate (bool) – filter shuffle

Returns:

deflate filter object

Return type:

H5PYDataFilter

nxstools.h5pywriter.deflate_filter(rate=None, shuffle=None, availability=None)[source]ΒΆ

create data filter

Parameters:
  • rate (bool) – filter shuffle

  • shuffle (bool) – filter shuffle

Returns:

deflate filter object

Return type:

H5CppDataFilter

get links

Parameters:

parent (FTObject) – parent object

Returns:

list of link objects

Returns:

link object

Return type:

obj:

list <H5PYLink>

nxstools.h5pywriter.is_image_file_supported()[source]ΒΆ

provides if loading of image files are supported

Retruns:

if loading of image files are supported

Return type:

bool

nxstools.h5pywriter.is_mbs_supported()[source]ΒΆ

provides if MultiBlockSlice are supported

Retruns:

if MultiBlockSlice are supported

Return type:

bool

nxstools.h5pywriter.is_strings_as_bytes()[source]ΒΆ

provides if string read to bytes

Retruns:

if string read to bytes

Return type:

bool

nxstools.h5pywriter.is_unlimited_vds_supported()[source]ΒΆ

provides if unlimited vds are supported

Retruns:

if unlimited vds are supported

Return type:

bool

nxstools.h5pywriter.is_vds_supported()[source]ΒΆ

provides if VDS are supported

Retruns:

if VDS are supported

Return type:

bool

create link

Parameters:
  • target (str) – file name

  • parent (FTObject) – parent object

  • name (str) – link name

Returns:

link object

Return type:

H5PYLink

nxstools.h5pywriter.load_file(membuffer, filename=None, readonly=False, **pars)[source]ΒΆ

load a file from memory byte buffer

Parameters:
  • membuffer (bytes or io.BytesIO) – memory buffer

  • filename (str) – file name

  • readonly (bool) – readonly flag

  • pars (dict < str, str>) – parameters

Returns:

file object

Return type:

H5PYFile

nxstools.h5pywriter.nptype(dtype)[source]ΒΆ

converts to numpy types

Parameters:

dtype (str) – h5 writer type type

Returns:

nupy type

Return type:

str

nxstools.h5pywriter.open_file(filename, readonly=False, **pars)[source]ΒΆ

open the new file

Parameters:
  • filename (str) – file name

  • readonly (bool) – readonly flag

  • pars (dict < str, str>) – parameters

Returns:

file object

Return type:

H5PYFile

nxstools.h5pywriter.target_field_view(filename, fieldpath, shape, dtype=None, maxshape=None)[source]ΒΆ

create target field view for VDS

Parameters:
  • filename (str) – file name

  • fieldpath (str) – nexus field path

  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

Returns:

target field view object

Return type:

FTTargetFieldView

nxstools.h5pywriter.unlimited(parent=None)[source]ΒΆ

return dataspace UNLIMITED variable for the current writer module

Parameters:

parent (FTObject) – parent object

Returns:

dataspace UNLIMITED variable

Return type:

h5py.h5s.UNLIMITED

nxstools.h5pywriter.unlimited_selection(sel, shape)[source]ΒΆ

checks if hyperslab is unlimited

Parameters:
  • sel (filewriter.FTHyperslab) – hyperslab selection

  • shape (list) – give shape

Returns:

if hyperslab is unlimited list

Return type:

list <bool>

nxstools.h5pywriter.virtual_field_layout(shape, dtype, maxshape=None)[source]ΒΆ

creates a virtual field layout for a VDS file

Parameters:
  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

Returns:

virtual layout

Return type:

FTVirtualFieldLayout

nxstools.h5rediswriter moduleΒΆ

Provides redis h5cpp file writer

class nxstools.h5rediswriter.H5RedisAttribute(h5object=None, tparent=None, h5imp=None)[source]ΒΆ

Bases: H5CppAttribute

file tree attribute

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

  • h5imp (filewriter.FTAttribute) – h5 implementation attribute

class nxstools.h5rediswriter.H5RedisAttributeManager(h5object=None, tparent=None, h5imp=None)[source]ΒΆ

Bases: H5CppAttributeManager

file tree attribute

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

  • h5imp (filewriter.FTAttributeManager) – h5 implementation attributemanager

create(name, dtype, shape=None, overwrite=False)[source]ΒΆ

create a new attribute

Parameters:
  • name (str) – attribute name

  • dtype (str) – attribute type

  • shape (list < int >) – attribute shape

  • overwrite (bool) – overwrite flag

Returns:

attribute object

Return type:

H5RedisAttribute

class nxstools.h5rediswriter.H5RedisDataFilter(h5object=None, tparent=None, h5imp=None)[source]ΒΆ

Bases: H5CppDataFilter

file tree deflate

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

  • h5imp (filewriter.FTDataFilter) – h5 implementation data filter

class nxstools.h5rediswriter.H5RedisDeflate(h5object=None, tparent=None, h5imp=None)[source]ΒΆ

Bases: H5RedisDataFilter

deflate filter

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

  • h5imp (filewriter.FTDataFilter) – h5 implementation data filter

class nxstools.h5rediswriter.H5RedisField(h5object=None, tparent=None, h5imp=None)[source]ΒΆ

Bases: H5CppField

file tree file

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

  • h5imp (filewriter.FTField) – h5 implementation field

append_devices(value, keys=None)[source]ΒΆ

append device parameters

Parameters:
  • value (any) – device value

  • keys – device parameter keys

append_scaninfo(value, keys=None, direct=False)[source]ΒΆ

append scan info parameters

Parameters:
  • value (any) – scan parameter value

  • keys – scan parameter value

append_stream(name, stream)[source]ΒΆ

scan object

Parameters:
  • name (str) – stream name

  • scan (Stream) – stream object

property attributesΒΆ

return the attribute manager

Returns:

attribute manager

Return type:

H5CppAttributeManager

get_channels(value, keys=None)[source]ΒΆ

get scan info parameters

Parameters:

keys – device parameter keys

Returns value:

device parameter value

Rtype value:

any

get_devices(value, keys=None)[source]ΒΆ

get scan info parameters

Parameters:

keys – device parameter keys

Returns value:

device parameter value

Rtype value:

any

get_scaninfo(keys=None, direct=False)[source]ΒΆ

get scan info parameters

Parameters:

keys – scan parameter value

Returns value:

scan parameter value

Rtype value:

any

scan_command(command, *args, **kwargs)[source]ΒΆ

set scan attribute

Parameters:
  • command (str) – scan command

  • args (list <any>) – function list arguments

  • kwargs (dict <str , any>) – function dict arguments

Returns:

scan command value

Return type:

any

scan_getattr(attr)[source]ΒΆ

get scan attribute

Parameters:

attr (str) – scan attr

Returns:

scan attr value

Return type:

any

scan_setattr(attr, value)[source]ΒΆ

set attribute

Parameters:
  • attr (str) – scan attr

  • value (any) – scan attr value

set_channels(value, keys=None)[source]ΒΆ

set device parameters

Parameters:
  • value (any) – device parameter value

  • keys – device parameter keys

set_devices(value, keys=None)[source]ΒΆ

set device parameters

Parameters:
  • value (any) – device parameter value

  • keys – device parameter keys

set_scan(scan)[source]ΒΆ

scan object

Parameters:
  • scan – scan object

  • type – Scan

set_scaninfo(value, keys=None, direct=False)[source]ΒΆ

set scan info parameters

Parameters:
  • value (any) – scan parameter value

  • keys – scan parameter value

class nxstools.h5rediswriter.H5RedisFile(h5object=None, filename=None, h5imp=None, redisurl=None, session=None)[source]ΒΆ

Bases: H5CppFile

file tree file

constructor

Parameters:
  • h5object (any) – h5 object

  • filename (str) – file name

  • h5imp (filewriter.FTFile) – h5 implementation file

  • redisurl (str) – redis url string

  • session (str) – redis session

append_devices(value, keys=None)[source]ΒΆ

append device info parameters

Parameters:
  • value (any) – device parameter value

  • keys – device parameter value

append_scaninfo(value, keys=None, direct=False)[source]ΒΆ

append scan info parameters

Parameters:
  • value (any) – scan parameter value

  • keys – scan parameter value

  • direct (any) – scan info direct flag

append_stream(name, stream)[source]ΒΆ

scan object

Parameters:
  • name (str) – stream name

  • scan (Stream) – stream object

finish()[source]ΒΆ

start scan

get_channels(keys=None)[source]ΒΆ

get channel info parameters

Parameters:

keys – channel parameter keys

Returns value:

channel parameter value

Rtype value:

any

get_devices(keys=None)[source]ΒΆ

get devices info parameters

Parameters:

keys – device parameter keys

Returns value:

device parameter value

Rtype value:

any

get_scaninfo(keys=None, direct=False)[source]ΒΆ

get scan info parameters

Parameters:
  • keys – scan parameter value

  • direct (any) – scan info direct flag

Returns value:

scan parameter value

Rtype value:

any

prepare()[source]ΒΆ

start scan

reset_scaninfo(entryname)[source]ΒΆ

reset scan info

Parameters:

entryname (str) – NXentry group name

root()[source]ΒΆ

root object

Returns:

parent object

Return type:

H5RedisGroup

scan_command(command, *args, **kwargs)[source]ΒΆ

set scan attribute

Parameters:
  • command (str) – scan command

  • args (list <any>) – function list arguments

  • kwargs (dict <str , any>) – function dict arguments

Returns:

scan command value

Return type:

any

scan_getattr(attr)[source]ΒΆ

get scan attribute

Parameters:

attr (str) – scan attr

Returns:

scan attr value

Return type:

any

scan_setattr(attr, value)[source]ΒΆ

set attribute

Parameters:
  • attr (str) – scan attr

  • value (any) – scan attr value

set_channels(value, keys=None)[source]ΒΆ

set channel info parameters

Parameters:
  • value (any) – channel parameter value

  • keys – channel parameter keys

set_devices(value, keys=None)[source]ΒΆ

set device info parameters

Parameters:
  • value (any) – device parameter value

  • keys – device parameter keys

set_entryname(entryname)[source]ΒΆ

set entry name

Parameters:

entryname (str) – entry name

set_insname(insname)[source]ΒΆ

set instrument name

Parameters:

insname (str) – instrument name

set_scan(scan)[source]ΒΆ

scan object

Parameters:

scan (Scan) – scan object

set_scaninfo(value, keys=None, direct=False)[source]ΒΆ

set scan info parameters

Parameters:
  • value (any) – scan parameter value

  • keys – scan parameter value

  • direct (any) – scan info direct flag

start()[source]ΒΆ

start scan

class nxstools.h5rediswriter.H5RedisGroup(h5object=None, tparent=None, h5imp=None, nxclass=None)[source]ΒΆ

Bases: H5CppGroup

file tree group

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – tree parent

  • h5imp (filewriter.FTGroup) – h5 implementation group

  • redis (any) – redis object

  • nxclass (str) – nxclass

class H5RedisGroupIter(group=None)[source]ΒΆ

Bases: object

constructor

Parameters:

group (H5RedisGroup) – group object

next()ΒΆ

the next attribute

Returns:

attribute object

Return type:

FTAtribute

append_devices(value, keys=None)[source]ΒΆ

append device parameters

Parameters:
  • value (any) – device value

  • keys – device parameter keys

append_scaninfo(value, keys=None, direct=False)[source]ΒΆ

append scan info parameters

Parameters:
  • value (any) – scan parameter value

  • keys – scan parameter keys

  • direct (any) – scan info direct flag

append_stream(name, stream)[source]ΒΆ

scan object

Parameters:
  • name (str) – stream name

  • scan (Stream) – stream object

property attributesΒΆ

return the attribute manager

Returns:

attribute manager

Return type:

H5CppAttributeManager

create_field(name, type_code, shape=None, chunk=None, dfilter=None)[source]ΒΆ

open a file tree element

Parameters:
  • n (str) – group name

  • type_code (str) – nexus field type

  • shape (list < int >) – shape

  • chunk (list < int >) – chunk

  • dfilter (H5CppDataFilter) – filter deflater

Returns:

file tree field

Return type:

H5RedisField

create_group(n, nxclass=None)[source]ΒΆ

open a file tree element

Parameters:
  • n (str) – group name

  • nxclass (str) – group type

Returns:

file tree group

Return type:

H5RedisGroup

create_virtual_field(name, layout, fillvalue=0)[source]ΒΆ

creates a virtual filed tres element

Parameters:
  • name (str) – field name

  • layout (H5CppFieldLayout) – virual field layout

  • fillvalue (int or np.ndarray) – fill value

Returns:

file tree field

Return type:

H5RedisField

get_channels(value, keys=None)[source]ΒΆ

get scan info parameters

Parameters:

keys – device parameter keys

Returns value:

device parameter value

Rtype value:

any

get_devices(value, keys=None)[source]ΒΆ

get scan info parameters

Parameters:

keys – device parameter keys

Returns value:

device parameter value

Rtype value:

any

get_scaninfo(keys=None, direct=False)[source]ΒΆ

get scan info parameters

Parameters:
  • keys – scan parameter keys

  • direct (any) – scan info direct flag

Returns value:

scan parameter value

Rtype value:

any

open(name)[source]ΒΆ

open a file tree element

Parameters:

name (str) – element name

Returns:

file tree object

Return type:

H5RedisLink

open a file tree element as link

Parameters:

name (str) – element name

Returns:

file tree object

Return type:

H5RedisLink

reset_scaninfo(entryname)[source]ΒΆ

reset scan info

Parameters:

entryname (str) – NXentry group name

scan_command(command, *args, **kwargs)[source]ΒΆ

set scan attribute

Parameters:
  • command (str) – scan command

  • args (list <any>) – function list arguments

  • kwargs (dict <str , any>) – function dict arguments

Returns:

scan command value

Return type:

any

scan_getattr(attr)[source]ΒΆ

get scan attribute

Parameters:

attr (str) – scan attr

Returns:

scan attr value

Return type:

any

scan_setattr(attr, value)[source]ΒΆ

set attribute

Parameters:
  • attr (str) – scan attr

  • value (any) – scan attr value

set_channels(value, keys=None)[source]ΒΆ

set device parameters

Parameters:
  • value (any) – device parameter value

  • keys – device parameter keys

set_devices(value, keys=None)[source]ΒΆ

set device parameters

Parameters:
  • value (any) – device parameter value

  • keys – device parameter keys

set_entryname(entryname)[source]ΒΆ

set entry name

Parameters:

entryname (str) – entry name

set_insname(insname)[source]ΒΆ

set instrument name

Parameters:

insname (str) – instrument name

set_scan(scan)[source]ΒΆ

scan object

Parameters:
  • scan – scan object

  • type – Scan

set_scaninfo(value, keys=None, direct=False)[source]ΒΆ

set scan info parameters

Parameters:
  • value (any) – scan parameter value

  • keys – scan parameter keys

  • direct (any) – scan info direct flag

Bases: H5CppLink

file tree link

constructor

Parameters:
  • h5object (any) – h5 object

  • tparent (FTObject) – treee parent

class nxstools.h5rediswriter.H5RedisTargetFieldView(filename=None, fieldpath=None, shape=None, dtype=None, maxshape=None, h5imp=None)[source]ΒΆ

Bases: H5CppTargetFieldView

target field for VDS

constructor

Parameters:
  • filename (str) – file name

  • fieldpath (str) – nexus field path

  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

  • h5imp (filewriter.FTTargetFieldView) – h5 implementation targetfieldview

class nxstools.h5rediswriter.H5RedisVirtualFieldLayout(h5object=None, shape=None, dtype=None, maxshape=None, h5imp=None)[source]ΒΆ

Bases: H5CppVirtualFieldLayout

virtual field layout

constructor

Parameters:
  • h5object (any) – h5 object

  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

  • h5imp (filewriter.FTVirtualFieldLayout) – h5 implementation virtual field layout

nxstools.h5rediswriter.create_file(filename, overwrite=False, redisurl=None, session=None, **pars)[source]ΒΆ

create a new file

Parameters:
  • filename (str) – file name

  • overwrite (bool) – overwrite flag

  • libver (str) – library version: β€˜lastest’ or β€˜earliest’

  • redisurl (str) – redis URL

  • session (str) – redis session

Returns:

file object

Return type:

H5RedisFile

nxstools.h5rediswriter.data_filter(filterid=None, name=None, options=None, availability=None, shuffle=None, rate=None)[source]ΒΆ

create data filter

Parameters:
  • filterid (int) – hdf5 filter id

  • name (str) – filter name

  • options (tuple <int>) – filter cd values

  • availability (str) – filter availability i.e. β€˜optional’ or β€˜mandatory’

  • shuffle (bool) – filter shuffle

  • rate (bool) – filter shuffle

Returns:

data filter object

Return type:

H5RedisDataFilter

nxstools.h5rediswriter.deflate_filter(rate=None, shuffle=None, availability=None)[source]ΒΆ

create data filter

Parameters:
  • rate (bool) – filter shuffle

  • shuffle (bool) – filter shuffle

Returns:

deflate filter object

Return type:

H5RedisDataFilter

get links

Parameters:

parent (FTObject) – parent object

Returns:

list of link objects

Returns:

link object

Return type:

obj:

list <H5RedisLink>

nxstools.h5rediswriter.is_image_file_supported()[source]ΒΆ

provides if loading of image files are supported

Retruns:

if loading of image files are supported

Return type:

bool

nxstools.h5rediswriter.is_unlimited_vds_supported()[source]ΒΆ

provides if unlimited vds are supported

Retruns:

if unlimited vds are supported

Return type:

bool

nxstools.h5rediswriter.is_vds_supported()[source]ΒΆ

provides if vds are supported

Retruns:

if vds are supported

Return type:

bool

create link

Parameters:
  • target (str) – nexus path name

  • parent (FTObject) – parent object

  • name (str) – link name

Returns:

link object

Return type:

H5RedisLink

nxstools.h5rediswriter.load_file(membuffer, filename=None, readonly=False, **pars)[source]ΒΆ

load a file from memory byte buffer

Parameters:
  • membuffer (bytes or io.BytesIO) – memory buffer

  • filename (str) – file name

  • readonly (bool) – readonly flag

  • pars (dict < str, str>) – parameters

Returns:

file object

Return type:

H5RedisFile

nxstools.h5rediswriter.nptype(dtype)[source]ΒΆ

converts to numpy types

Parameters:

dtype (str) – h5 writer type type

Returns:

nupy type

Return type:

str

nxstools.h5rediswriter.open_file(filename, readonly=False, redisurl=None, session=None, **pars)[source]ΒΆ

open the new file

Parameters:
  • filename (str) – file name

  • readonly (bool) – readonly flag

  • redisurl (str) – redis URL

  • session (str) – redis session

  • libver (str) – library version: β€˜lastest’ or β€˜earliest’

Returns:

file object

Return type:

H5RedisFile

nxstools.h5rediswriter.splitstr(text)[source]ΒΆ

split string separated by space

Parameters:
  • text (list <str>) – text to split

  • text – split text

nxstools.h5rediswriter.target_field_view(filename, fieldpath, shape, dtype=None, maxshape=None)[source]ΒΆ

create target field view for VDS

Parameters:
  • filename (str) – file name

  • fieldpath (str) – nexus field path

  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

Returns:

target field view object

Return type:

H5RedisTargetFieldView

nxstools.h5rediswriter.unlimited(parent=None)[source]ΒΆ

return dataspace UNLIMITED variable for the current writer module

Parameters:

parent (FTObject) – parent object

Returns:

dataspace UNLIMITED variable

Return type:

h5cpp.dataspace.UNLIMITED

nxstools.h5rediswriter.unlimited_selection(sel, shape)[source]ΒΆ

checks if hyperslab is unlimited

Parameters:
  • sel (filewriter.FTHyperslab) – hyperslab selection

  • shape (list) – give shape

Returns:

if hyperslab is unlimited list

Return type:

list <bool>

nxstools.h5rediswriter.virtual_field_layout(shape, dtype, maxshape=None)[source]ΒΆ

creates a virtual field layout for a VDS file

Parameters:
  • shape (list < int >) – shape

  • dtype (str) – attribute type

  • maxshape (list < int >) – shape

Returns:

virtual layout

Return type:

H5RedisVirtualFieldLayout

nxstools.nxsargparser moduleΒΆ

NeXus tool argumen parser

exception nxstools.nxsargparser.ErrorException[source]ΒΆ

Bases: Exception

error parser exception

class nxstools.nxsargparser.NXSArgParser(**kwargs)[source]ΒΆ

Bases: ArgumentParser

Argument parser with error exception

constructor

Parameters:

kwargs – argparse.ArgumentParser parameter dictionary

createSubParsers()[source]ΒΆ

creates command-line parameters parser

Returns:

command runner

Return type:

Runner

error(message)[source]ΒΆ

error handler

Parameters:

message (str) – error message

class nxstools.nxsargparser.Runner(parser)[source]ΒΆ

Bases: object

abstract runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

parser creator

description = 'abstract runner'ΒΆ

(str) command description

epilog = NoneΒΆ

(str) command epilog

postauto()[source]ΒΆ

parser creator after autocomplete run

run(options)[source]ΒΆ

run commandthe main program function

Parameters:

options (argparse.Namespace) – parser options

nxstools.nxscollect moduleΒΆ

Command-line tool to merge images of external file-formats into the master NeXus file

class nxstools.nxscollect.Collector(nexusfilename, compression=2, skipmissing=False, storeold=False, testmode=False, writer=None)[source]ΒΆ

Bases: object

Collector merge images of external file-formats into the master NeXus file

The constructor creates the collector object

Parameters:
  • nexusfilename (str) – the nexus file name

  • compression (int) – compression rate

  • skipmissing (bool) – if skip missing images

  • storeold (bool) – if backup the input file

  • testmode (bool) – if run in a test mode

  • writer (str) – the writer module

collect(path=None, inputfiles=None, datatype=None, shape=None)[source]ΒΆ

creates a temporary file, collects the all image files defined by hdf5 postrun fields of NXcollection groups and renames the temporary file to the origin one if the action was successful or appends specific data if path and inputfiles are given

Parameters:
  • path (str) – nexus path of the data field

  • inputfiles (list <str>) – a list of file strings

  • datatype (str) – field data type

  • shape (list <int >) – field shape

class nxstools.nxscollect.Execute(parser)[source]ΒΆ

Bases: Runner

Execute runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'append images to the master file'ΒΆ

(str) command description

epilog = " examples:\n       nxscollect append -c1 /tmp/gpfs/raw/scan_234.nxs \n\n       nxscollect append -c32008:0,2 /ramdisk/scan_123.nxs \n\n       nxscollect append --test /tmp/gpfs/raw/scan_234.nxs \n\n       nxscollect append scan_234.nxs --path /scan/instrument/pilatus/data  --input-files 'scan_%05d.tif:0:100' \n"ΒΆ

(str) command epilog

postauto()[source]ΒΆ

creates parser

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscollect.LayoutField(target, hyperslab=None)[source]ΒΆ

Bases: object

constructor

Parameters:
  • hyperslab (filewriter.FTHyperslab) – target field object

  • hyperslab – field hyperslab or slices

hyperslabΒΆ

filewriter.FTHyperslab layout hyperslab or slices

shapeΒΆ

tuple vds shape in layout

slicesΒΆ

list <slice>

targetΒΆ

TargetFieldView target field object

Bases: Runner

Execute runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create an external or internal link in the master file'ΒΆ

(str) command description

epilog = ' examples:\n       nxscollect link scan_234.nxs://entry/instrument/lambda --name data --target scan_234/lambda.nxs://entry/data/data \n\nscan_234.nxs://entry/instrument/eiger:NXdetector   --target scan_234/eiger.nxs://entry/data/data \n\n\n'ΒΆ

(str) command epilog

postauto()[source]ΒΆ

creates parser

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscollect.Linker(nexusfilepath, target, name=None, storeold=False, testmode=False, writer=None)[source]ΒΆ

Bases: object

Create external and internal links of NeXus files

The constructor creates the collector object

Parameters:
  • nexusfilepath (str) – the nexus file name and nexus path

  • target (str) – the nexus file name and nexus path

  • storeold (bool) – if backup the input file

  • testmode (bool) – if run in a test mode

  • writer (str) – the writer module

creates NeXus link

class nxstools.nxscollect.TargetFieldView(filename, path, shape=None, hyperslab=None, maxshape=None)[source]ΒΆ

Bases: object

target field map

constructor

Parameters:
  • filename (str) – file name

  • path (str) – nexus field path with its name

  • shape (list <int>) – field shape

  • hyperslab (filewriter.FTHyperslab) – field hyperslab or slices

  • maxshape (list <int>) – maximal field shape

filenameΒΆ

str file name

hyperslabΒΆ

filewriter.FTHyperslab field hyperslab or slices

maxshapeΒΆ

list <int> field maximal shape

pathΒΆ

str nexus field path with its name

shapeΒΆ

list <int> field shape

slicesΒΆ

list <slice>

class nxstools.nxscollect.TargetFieldsLayout(exfieldpaths='', exfieldshapes='', shapes=None, separator=',')[source]ΒΆ

Bases: list

constructor

Parameters:
  • exfieldpaths (str) – target field paths

  • exfieldshapes (str) – target field shapes

  • shapes (list`<:obj:`tuple`<:obj:`int> >) – target field shapes

  • exfieldpaths – separator of field path strings

add_layout_hyperslabs(offsets, blocks, counts, strides)[source]ΒΆ

add layout hyperslabs

Parameters:
  • offsets (str) – layout offsets

  • blocks (str) – layout blocks

  • counts (str) – layout counts

  • strides (str) – layout strides

add_layout_slices(slices)[source]ΒΆ

add layout slices

Parameters:

slices (str) – layout slices

add_target_hyperslabs(offsets, blocks, counts, strides)[source]ΒΆ

add target hyperslabs

Parameters:
  • offsets (str) – target offsets

  • blocks (str) – target blocks

  • counts (str) – target counts

  • strides (str) – target strides

add_target_slices(slices)[source]ΒΆ

add taget slices

Parameters:

slices (str) – target slices

class nxstools.nxscollect.VDS(parser)[source]ΒΆ

Bases: Runner

Execute runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create a virual dataset in the master file'ΒΆ

(str) command description

epilog = " examples:\n\n       nxscollect vds scan_234.nxs://entry/instrument/eiger/data  --shape '1000,2048,1024' --dtype uint32  --target-fields 'eiger_%05d.nxs://entry/data/data:1:10' --shapes '100,,:100,,:100,,:100,,:100,,:100,,:100,,:100,,:100,,:100,,'   --offsets '0,,:100,,:200,,:300,,:400,,:500,,:600,,:700,,:800,,:900,,' \n\n\n           - creates VDS (shape [1000,2048,1024]) of ten nexus files (shape [100,2048,1024]) merged in their first dimension\n\n\n\n       nxscollect vds scan_234.nxs://entry/instrument/lambda/data  --shape '100,300,762' --dtype uint32  --target-fields 'lambda_%05d.nxs://entry/data/data:0:2' --shapes ',,250:,,250:,,250'   --offsets ',,:,,256:,,512'  --counts 'U,,:U,,:U,,' -f 1 \n\n\n           - creates VDS (shape [100,300,762]) of three nexus files (shape [100,300,250]) merged in their third dimension,\n               separated with a 6 pixel gap of 1 values and unlimited first dimension\n\n\n\n       nxscollect vds scan_234.nxs://entry/instrument/percival/data  --shape '4000,1600,2000' --dtype int16  --target-fields 'percival_%05d.nxs://entry/data/data:1:4' --shapes '1000,,:1000,,:1000,,:1000,,'   --offsets '0,,:1,,:2,,:3,,'  --counts 'U,,:U,,:U,,:U,,' --strides '4,,:4,,:4,,:4,,' \n\n\n           - creates VDS (shape [1000,1600,2000]) of three nexus files (shape [1000,1600,2000])\n                merged in their the first dimension with interlaying frames\n                and unlimited first dimension\n\n\n\n"ΒΆ

(str) command epilog

postauto()[source]ΒΆ

creates parser

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscollect.VirtualDataset(nexusfilepath, options, writer=None)[source]ΒΆ

Bases: object

Create virtual dataset in the master NeXus files

The constructor creates the collector object

Parameters:
  • nexusfilepath (str) – the nexus file name and nexus path

  • options (argparse.Namespace) – parser options

  • writer (str) – the writer module

create()[source]ΒΆ

creates VDS

nxstools.nxscollect.crdtoint(crd)[source]ΒΆ

convert coorinate to int or None or Unlimited

Parameters:

crd (cordinate as string) – cordinate as string

Returns:

converted coordinate

Return type:

int

nxstools.nxscollect.filegenerator(filestr, pattern=None)[source]ΒΆ

provides file name generator from file string

Parameters:

filestr – file string

Type:

filestr: str

Returns:

file name generator or a list of file names

Return type:

methodinstance

nxstools.nxscollect.getcompression(compression)[source]ΒΆ
converts compression string to a deflate level parameter

or list with [filterid, opt1, opt2, …]

Parameters:

compression (str) – compression string

Returns:

deflate level parameter or list with [filterid, opt1, opt2, …]

Return type:

int or list < int > or None

nxstools.nxscollect.main()[source]ΒΆ

the main program function

nxstools.nxscollect.splitcoords(crdstr)[source]ΒΆ

splits coordinate string

Parameters:

crdstr (cordinate string) – cordinate string

Returns:

a list ofr coordinates in tuples

Return type:

list <tuple < int >>

nxstools.nxscollect.splitslices(crdstr)[source]ΒΆ

splits coordinate string

Parameters:

crdstr (cordinate string) – cordinate string

Returns:

a list ofr coordinates in tuples

Return type:

list <tuple < int >>

nxstools.nxsconfig moduleΒΆ

Command-line tool for ascess to the nexdatas configuration server

class nxstools.nxsconfig.Components(parser)[source]ΒΆ

Bases: Runner

Components runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'get a list of dependent components'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig components dcm\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.ConfigServer(device, nonewline=False)[source]ΒΆ

Bases: object

configuration server adapter

constructor

Parameters:
  • device (str) – device name of the configuration server

  • nonewline (bool) – if the output should not be separated by the new line character

charΒΆ

(str) spliting character

componentsCmd(components)[source]ΒΆ

lists components of the components

Parameters:

components (list <str>) – given components

Returns:

list of component names

Return type:

list <str>

dataCmd(args)[source]ΒΆ

provides varaible values

Parameters:

args (list <str>) – list of item names

Returns:

JSON with variables

Return type:

str

deleteCmd(ds, args, ask=True, profiles=False)[source]ΒΆ

delete the DB items

Parameters:
  • ds (bool) – flag set True for datasources

  • args (list <str>) – list of item names

  • ask (bool) – ask flag

  • profiles (bool) – flag set True for profiles

Returns:

list of XML items

Return type:

list <str>

describeCmd(ds, args, md, pr, headers=None, filters=None)[source]ΒΆ

provides description of configuration elements

Parameters:
  • ds (bool) – flag set True for datasources

  • args (list <str>) – list of item names

  • md (bool) – flag set True for mandatory components

  • pr (str) – flag set True for private components

  • pr – column headers

  • filters (str) – filters for first column names separated by comma

Returns:

list with description

Return type:

list <str>

geometryCmd(args, md, pr)[source]ΒΆ

provides geometry info for given elements

Parameters:
  • args (list <str>) – list of item names

  • md (bool) – flag set True for mandatory components

  • pr (bool) – flag set True for private components

Returns:

list with description

Return type:

list <str>

getCmd(args)[source]ΒΆ

provides final configuration

Parameters:

args (list <str>) – list of item names

Returns:

XML configuration string

Return type:

str

infoCmd(ds, args, md, pr, profiles)[source]ΒΆ

Provides info for given elements

Parameters:
  • ds (bool) – flag set True for datasources

  • args (list <str>) – list of item names

  • md (bool) – flag set True for mandatory components

  • pr (bool) – flag set True for private components

  • profiles (bool) – flag set True for profiles

Returns:

list with description

Return type:

list <str>

listCmd(ds, mandatory=False, private=False, profiles=False)[source]ΒΆ

lists the DB item names

Parameters:
  • ds (bool) – flag set True for datasources

  • mandatory (bool) – flag set True for mandatory components

  • private (bool) – flag set True for components starting with β€˜__’

  • profiles (bool) – flag set True for profiles

Returns:

list op item names

Return type:

list <str>

mergeCmd(args)[source]ΒΆ

provides merged components

Parameters:

args (list <str>) – list of item names

Returns:

XML configuration string with merged components

Return type:

str

recordCmd(ds, name)[source]ΒΆ

lists datasources of the component

Parameters:
  • ds (bool) – flag set True for datasources

  • name (str) – given component or datasource

Returns:

list of record names

Return type:

list <str>

showCmd(ds, args, mandatory=False, profiles=False, directory=None)[source]ΒΆ

shows the DB items

Parameters:
  • ds (bool) – flag set True for datasources

  • args (list <str>) – list of item names

  • mandatory (bool) – flag set True for mandatory components

  • profiles (bool) – flag set True for profiles

  • directory (str) – output file directory

Returns:

list of XML items

Return type:

list <str>

sourcesCmd(components, mandatory=False)[source]ΒΆ

lists datasources of the components

Parameters:

components (list <str>) – given components

Returns:

list of datasource names

Return type:

list <str>

uploadCmd(ds, args, force=False, profiles=False, directory='.', mandatory=False, external=None)[source]ΒΆ

upload the DB items from files

Parameters:
  • ds (bool) – flag set True for datasources

  • args (list <str>) – list of item names

  • force (bool) – force flag

  • profiles (bool) – flag set True for profiles

  • directory (str) – input file directory

  • mandatory (bool) – mandatory flag

  • external (str) – external import type

Returns:

list of XML items

Return type:

list <str>

variablesCmd(components, mandatory=False)[source]ΒΆ

lists variable of the components

Parameters:

components (list <str>) – given components

Returns:

list of datasource names

Return type:

list <str>

class nxstools.nxsconfig.Data(parser)[source]ΒΆ

Bases: Runner

Data runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'get/set values of component variables'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig data \n       nxsconfig data \'{"sample_name":"H2O"}\'\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Delete(parser)[source]ΒΆ

Bases: Runner

Show runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'delete components, datasources or profiles with given names from ConfigServer'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig delete pilatus1a\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Describe(parser)[source]ΒΆ

Bases: Runner

Describe runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'show all parameters of given components or datasources'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig describe pilatus\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Geometry(parser)[source]ΒΆ

Bases: Runner

List runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'show transformation parameters of given components or datasources'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig geometry dcm\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Get(parser)[source]ΒΆ

Bases: Runner

Get runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'get full configuration of components'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig get  dcm source slit1 slit2\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Info(parser)[source]ΒΆ

Bases: Runner

List runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'show general parameters of given components, datasources or profile'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig info slit1\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.List(parser)[source]ΒΆ

Bases: Runner

List runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'list names of available components, datasources or profiles'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig list\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Merge(parser)[source]ΒΆ

Bases: Runner

Merge runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'get merged configuration of components or datasources'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig merge  slit1 dcm \n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Record(parser)[source]ΒΆ

Bases: Runner

Record runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'get a list of datasource record names for components or datasources'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig record -d exp_mot01 \n       nxsconfig record dcm \n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Servers(parser)[source]ΒΆ

Bases: Runner

Servers runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'get a list of configuration servers from the current tango host'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig servers\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Show(parser)[source]ΒΆ

Bases: Runner

Show runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'show (or write to files) components, datasources or profiles with given names'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig show dcm\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Sources(parser)[source]ΒΆ

Bases: Runner

Sources runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'get a list of component datasources'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig sources slit1\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Upload(parser)[source]ΒΆ

Bases: Runner

Store runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'upload components, datasources or profiles with given names from locale filesystem into ConfigServer'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig upload exp_c01 exp_c02\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsconfig.Variables(parser)[source]ΒΆ

Bases: Runner

Variables runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'get a list of component variables'ΒΆ

(str) command description

epilog = ' examples:\n       nxsconfig variables dcm\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

nxstools.nxsconfig.main()[source]ΒΆ

the main program function

nxstools.nxscreate moduleΒΆ

Command-line tool for creating NXSConfigServer configuration of Nexus Files

class nxstools.nxscreate.ClientDS(parser)[source]ΒΆ

Bases: Runner

clientds runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

parser creator

description = 'create client datasources'ΒΆ

(str) command description

epilog = "\n * with -b: datasources are created in Configuration Server database\n * without -b: datasources are created on the local filesystem in -d <directory> \n * default: <directory> is '.' \n            <server> is taken from Tango DB\n\n examples:\n\n       nxscreate clientds starttime -b  \n\n           - create the 'starttime' datasource of the 'CLIENT' type with the 'starttime' record name\n               and upload them to the NXSConfigServer database \n\n       nxscreate clientds title -d /home/user/xmldir \n\n           - create the 'title' datasource of the 'CLIENT' type with the 'title' record name\n               in the '/home/user/xmldir' directory\n\n       nxscreate clientds -v exp_c -f1 -l4 -b  \n\n           - create the 'exp_c01', 'exp_c02', 'exp_c03', 'exp_c04' datasources of the 'CLIENT' type\n               with the corresponding 'exp_c0? record names\n               and upload them to the NXSConfigServer database \n               where '?' is 1, 2, 3, 4 respectively \n\n       nxscreate clientds -v hasppXX:10000/expchan/vfcadc_exp/ -f5 -l8  -m -b -s exp_vfc\n\n           - create the 'exp_vfc05', 'exp_vfc06', 'exp_vfc07', 'exp_vfc08' datasources of the 'CLIENT' type\n               with the corresponding 'hasppXX:10000/expchan/vfcadc_exp/?' record names\n               and upload them to the NXSConfigServer database \n               where '?' is 5, 6, 7, 8 respectively \n\n"ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscreate.Comp(parser)[source]ΒΆ

Bases: Runner

comp runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create simple components'ΒΆ

(str) command description

epilog = ' * with -b: components are created (without datasources) in Configuration Server database\n * without -b: components are created (without datasources) on the local filesystem in -d <directory> \n * default: <directory> is \'.\' \n            <server> is taken from Tango DB\n            <strategy> is step\n            <type> is NX_FLOAT\n            <chunk> is SCALAR\n            <nexuspath> is "/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/instrument/collection/"\n\n examples:\n\n       nxscreate comp counter \n\n           - create the \'counter\' component in the local directory \n               which sets fetching data in the \'STEP\' mode from a \'counter\' datasource to \n               \'/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/instrument:NXinstrument/collection:NXcollection/counter\' \n\n       nxscreate comp -f5 -l7 -v exp_c -b \n\n           - create the \'exp_c05\', \'exp_c06\' \'exp_c07\' components in the NXSConfigServer database \n               which set fetching data in the \'STEP\' mode from  corresponding \'exp_c0?\' datasources to corresponding\n               \'/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/instrument:NXinstrument/collection:NXcollection/exp_c0?\'\n                where \'?\' is 5, 6, 7 respectively \n\n       nxscreate comp lambda -d /home/user/xmldir/ \n\n           - create the \'lambda\' component in the \'/home/user/xmldir/\' directory \n               which sets fetching data in the \'STEP\' mode from a \'lambda\' datasource to \n               \'/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/instrument:NXinstrument/collection:NXcollection/lambda\' \n\n       nxscreate comp -n "/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/instrument/sis3302:NXdetector/collection:NXcollection/" -v sis3302_1_roi -f1 -l3  -g FINAL -t NX_FLOAT64 -k -b -m \n\n           - create the \'sis3302_1_roi1\', sis3302_1_roi2\', sis3302_1_roi3\' components in the NXSConfigServer database \n               which set fetching data in the \'FINAL\' mode from corresponding \'sis3302_1_roi?\' datasources to corresponding\n               \'/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/instrument:NXinstrument/sis3302:NXdetector/collection:NXcollection/sis3302_1_roi?\'\n               float64 fields and creates corresponding\n               \'/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/data:NXdata/sis3302_1_roi?\' links\n               where \'?\' is 1, 2, 3 respectively \n\n       nxscreate comp -n "/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/instrument/eh1_mca01:NXdetector/data" eh1_mca01 -g STEP -t NX_FLOAT64 -i -b -c SPECTRUM\n\n           - create the \'eh1_mca01\' component in the NXSConfigServer database \n               which set fetching STECTRUM data in the \'STEP\' mode from a \'eh1_mca01\' datasource to \n               \'/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/instrument:NXinstrument/eh1_mca01:NXdetector/data\n               float64 fields and creates \n               \'/\\$var.entryname#\'scan\'\\$var.serialno:NXentry/data:NXdata/eh1_mca01\' links\n\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscreate.Compare(parser)[source]ΒΆ

Bases: Runner

compare runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'compare two online.xml files'ΒΆ

(str) command description

epilog = " * default: second file <online_file> is '/online_dir/online.xml' \n            if only file is given\n\n examples:\n\n       nxscreate compare online.xml \n\n           - compare 'online.xml' to '/online_dir/online.xml\n' \n       nxscreate compare /online_dir/online_040.xml online.xml \n\n           - compare '/online_dir/online_040.xml' to 'online.xml'\n"ΒΆ

(str) command epilog

postauto()[source]ΒΆ

creates parser

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscreate.DeviceDS(parser)[source]ΒΆ

Bases: Runner

deviceds runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create datasources for all device attributes'ΒΆ

(str) command description

epilog = " * without <dv_attr1>: datasources for all attributes are created\n * with -b: datasources are created in Configuration Server database\n * without -b: datasources are created on the local filesystem in -d <directory> \n * default: <directory> is '.' \n            <server> is taken from Tango DB\n            <datasource> is 'exp_mot' \n            <host>, <port> are taken from <server>\n\n examples:\n\n       nxscreate deviceds  -v p09/pilatus/haso228k \n\n           - create datasources of the 'TANGO' type\n               for all attribute of 'p09/pilatus/haso228k' tango device\n               in the local file directory database \n\n       nxscreate deviceds  -v p09/lambda2m/haso228k -uhaslambda -b \n\n           - create datasources of the 'TANGO' type\n               for all attribute of 'p09/lambda2m/haso228k' tango device\n               with their hostname 'haslambda' \n               and upload them to the NXSConfigServer database \n\n       nxscreate deviceds  -v p09/pilatus300k/haso228k -b -s pilatus300k_ RoI Energy ExposureTime\n\n           - create datasources of the 'TANGO' type\n               for RoI Energy ExposureTime attribute of 'p09/lambda2m/haso228k' tango device\n               with the 'pilatus300k_' datasource prefix \n               and upload them to the NXSConfigServer database \n\n"ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscreate.OnlineCP(parser)[source]ΒΆ

Bases: Runner

onlinecp runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create component from online.xml file'ΒΆ

(str) command description

epilog = " * without '-c <component>': show a list of possible components\n * with -b: datasources are created in Configuration Server database\n * without -b: datasources are created on the local filesystem in -d <directory> \n * default: <directory> is '.' \n * default: <inputFile> is '/online_dir/online.xml' \n            <server> is taken from Tango DB\n\n examples:\n\n       nxscreate onlinecp  \n\n           - list possible components which can be created from online.xml \n\n       nxscreate onlinecp -c pilatus -b \n\n           - create the 'pilatus' component and its datasources\n               in the NXSConfigServer database\n\n       nxscreate onlinecp -c lambda -d /home/user/xmldir/ \n\n           - create the 'lambda' component and its datasources\n               in the '/home/user/xmldir/' directory\n\n       nxscreate onlinecp -c lmbd -t lambda -b \n\n           - create the 'lmbd' component of 'lambda' type and its datasources\n               in the NXSConfigServer database\n\n\n       nxscreate onlinecp -c lmbd -t lambda  -v p00/lmbd/1 -u haso000 -w 10000 -b \n\n           - create the 'lmbd' component of 'lambda' type and its datasources without online.xml\n               in the NXSConfigServer database\n\n"ΒΆ

(str) command epilog

postauto()[source]ΒΆ

creates parser

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscreate.OnlineDS(parser)[source]ΒΆ

Bases: Runner

onlineds runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create datasources from online.xml file'ΒΆ

(str) command description

epilog = " * with -b: datasources are created in Configuration Server database\n * with -d <directory>: datasources are created on the local filesystem\n * without -b or -d <directory>: run in the test mode\n * default: <inputFile> is '/online_dir/online.xml' \n            <server> is taken from Tango DB\n\n `onlineds` overwrites existing datasources\n\n examples:\n\n       nxscreate onlineds -b  \n\n           - create datasources from online.xml file \n               and upload them to the NXSConfigServer database \n\n       nxscreate onlineds -b -t \n\n           - like above but set motor tango datasources to \n               be no __CLIENT__ like\n\n       nxscreate onlineds -d /home/user/xmldir \n\n           - create datasources from online.xml file \n               and save them in the '/home/user/xmldir' directory \n\n       nxscreate onlineds \n\n           - run the command in test mode without creating datasources \n"ΒΆ

(str) command epilog

postauto()[source]ΒΆ

creates parser

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

nxstools.nxscreate.PYTANGO = TrueΒΆ

(bool) True if PyTango available

class nxstools.nxscreate.PoolDS(parser)[source]ΒΆ

Bases: Runner

poolds runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create datasources from sardana pool device'ΒΆ

(str) command description

epilog = " * with -b: datasources are created in Configuration Server database\n * with -d <directory>: datasources are created on the local filesystem\n * without -b or -d <directory>: run in the test mode\n * default: <channel> is 'ALL' \n            <server> is taken from Tango DB\n\n            <pool> is taken from Tango DB\n\n `poolds` overwrites existing datasources\n\n examples:\n\n       nxscreate poolds -b  \n\n           - create all datasources defined in the local Pool \n               and upload them to the NXSConfigServer database \n\n       nxscreate poolds -b -t \n\n           - like above but set motor tango datasources to \n               be no __CLIENT__ like\n\n       nxscreate poolds -d . -p p09/pool/haso228 \n\n           - create all datasources defined in the 'p09/pool/haso228' Pool \n               and save them in the local directory \n\n       nxscreate poolds -b Motor CTExpChannel \n\n           - create datasources of 'Motor' and CTExpChannel classes \n               defined in the local Pool \n               and upload them to the NXSConfigServer database \n\n       nxscreate poolds -b mot01 mot03 \n\n           - create 'mot01' and 'mot03' datasources\n               defined in the local Pool \n               and upload them to the NXSConfigServer database \n\n       nxscreate poolds \n\n           - run the command in test mode without creating datasources \n"ΒΆ

(str) command epilog

postauto()[source]ΒΆ

creates parser

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscreate.SECoPCP(parser)[source]ΒΆ

Bases: Runner

secop component runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create secop components'ΒΆ

(str) command description

epilog = " * with -b: components are created (without datasources) in Configuration Server database\n * without -b: components are created (without datasources) on the local filesystem in -d <directory> \n * default: <directory> is '.' \n            <port> is 5001\n\n examples:\n\n       nxscreate secopcp \n       nxscreate secopcp -l \n\n           - list all modules of the given node \n\n       nxscreate secopcp -c temp_node -d . -j secopn_node.json \n\n           - create the all secop components in the local directory for the node configured with the json file \n\n       nxscreate secopcp T -t 5001 -b \n\n           - create the component for the T secop module  in the NXSConfigServer database for the node on the port 5000 \n\n       nxscreate secopcp -d /home/user/xmldir/ \n\n           - create the all secop components in the given directory\n\n"ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscreate.StdComp(parser)[source]ΒΆ

Bases: Runner

stdcomp runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create component from the standard templates'ΒΆ

(str) command description

epilog = " * without '-t <type>': show a list of possible component types\n * with '-t <type>  and without -c <component>: show a list of component variables for the given component type\n * with -b: datasources are created in Configuration Server database\n * without -b: datasources are created on the local filesystem in -d <directory> \n * default: <directory> is '.' \n * [name1 value1 [name2 value2] ...] sequence  defines component variable values \n\n examples:\n\n       nxscreate stdcomp  \n\n           - list possible component types\n               from the 'nxstools.xmltemplates' package\n\n       nxscreate stdcomp  -p nxsextrasp00  \n\n           - list possible component types from the 'nxsextrasp00' package\n\n       nxscreate stdcomp  -t source \n\n           - list a description of 'source' component variables\n\n       nxscreate stdcomp  -t default  -c default  -m  -b\n\n           - create 'default' component  of the 'default' type\n               in the NXSConfigServer database and set it as mandatory\n\n       nxscreate stdcomp  -t slit  -c front_slit1   xgap slt1x  ygap slt1y\n\n           - create 'front_slit1' component  of the 'slit' type\n               where variables xgap='slt1x' and ygap='slt1and' in the local directory \n\n       nxscreate stdcomp  -p nxsextrasp08  -t analyzer  -c analyzer1  v anav  roll anaroll  -b\n\n           - create 'analyzer1' component of the 'analyzer type'\n               where variables v='anav' and roll='amaroll' in the NXSConfigServer database\n"ΒΆ

(str) command epilog

postauto()[source]ΒΆ

creates parser

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxscreate.TangoDS(parser)[source]ΒΆ

Bases: Runner

tangods runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create tango datasources'ΒΆ

(str) command description

epilog = " * with -b: datasources are created in Configuration Server database\n * without -b: datasources are created on the local filesystem in -d <directory> \n * default: <directory> is '.' \n            <server> is taken from Tango DB\n            <datasource> is 'exp_mot' \n            <host>, <port> are taken from <server>\n\n examples:\n\n       nxscreate tangods -f1 -l2 -v p09/motor/exp. -s exp_mot \n\n           - create the 'exp_mot01' and 'exp_mot02' datasources of the 'TANGO' type\n               with the corresponding 'p09/motor/exp.0?' device names\n               and 'Position' tango attribute names in the local directory\n               where '?' is 1, 2 respectively \n\n       nxscreate tangods -f1 -l32 -v p02/motor/eh1a. -s exp_mot -b \n\n           - create the 'exp_mot01', ... ,'exp_mot32' datasources of the 'TANGO' type\n               with the corresponding 'p09/motor/eh1a.??' device names\n               while their attribute name is 'Position'  and upload them to the NXSConfigServer database\n               where '??' is 01, 02, ... ,32 respectively \n\n       nxscreate tangods -v petra/globals/keyword -s source_current -u haso228 -t 10000 \\ \n                         -a BeamCurrent -b -r p09/nxsconfigserver/haso228 -o -g __CLIENT__\n\n           - create the a 'source_current' datasource of the 'TANGO' type belonging to the '__CLIENT__' group \n               with the 'petra/globals/keyword' device name\n               while their attribute name is 'BeamCurrent', \n               their hostname is 'haso228', their tango port is '10000'\n               and upload them to the NXSConfigServer 'p09/nxsconfigserver/haso228' database\n\n       nxscreate tangods -f1 -l8  -v pXX/slt/exp. -s slt_exp_ -u hasppXX.desy.de -b \n\n           - create the 'slt_exp_01', ... ,'slt_exp_08' datasources of the 'TANGO' type\n               with the corresponding 'pXX/slt/exp.0?' device names\n               while their attribute name is 'Position', \n               their hostname is 'hasppXX.desy.de'  and upload them to the NXSConfigServer database\n               where '??' is 1, 2, ... ,8 respectively \n\n"ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

nxstools.nxscreate.main()[source]ΒΆ

the main program function

nxstools.nxscreator moduleΒΆ

Command-line tool for creating to the nexdatas configuration server

class nxstools.nxscreator.CPCreator(options, args, printouts=True)[source]ΒΆ

Bases: Creator

component creator of all online.xml complex devices

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list <str >) – command arguments

  • printouts (bool) – if printout is enable

componentsΒΆ

(dict <str, str >) component xml dictionary

create()[source]ΒΆ

creates components of all online.xml complex devices

createXMLs()[source]ΒΆ

creates component xmls of all online.xml complex devices abstract method

datasourcesΒΆ

(dict <str, str >) datasource xml dictionary

xmlpackageΒΆ

(str) xml template component package

xmltemplatepathΒΆ

(str) xml template component package path

exception nxstools.nxscreator.CPExistsException[source]ΒΆ

Bases: Exception

Component already exists exception

class nxstools.nxscreator.ClientDSCreator(options, args, printouts=True)[source]ΒΆ

Bases: Creator

client datasource creator

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list < str >) – command arguments

  • printouts (bool) – if printout is enable

create()[source]ΒΆ

creates a client datasource xml and stores it in DB or filesytem

class nxstools.nxscreator.CompareOnlineDS(options, args, printouts=True)[source]ΒΆ

Bases: object

comparing tool for online.xml files

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list < str >) – command arguments

  • printouts (bool) – if printout is enable

argsΒΆ

(list < str >) creator arguments

compare()[source]ΒΆ
optionsΒΆ

(optparse.Values) creator options

class nxstools.nxscreator.ComponentCreator(options, args, printouts=True)[source]ΒΆ

Bases: Creator

component creator

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list < str >) – command arguments

  • printouts (bool) – if printout is enable

create()[source]ΒΆ

creates a component xml and stores it in DB or filesytem

class nxstools.nxscreator.Creator(options, args, printouts=True)[source]ΒΆ

Bases: object

configuration server adapter

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list < str >) – command arguments

  • printouts (bool) – if printout is enable

argsΒΆ

(list < str >) creator arguments

optionsΒΆ

(optparse.Values) creator options

exception nxstools.nxscreator.DSExistsException[source]ΒΆ

Bases: Exception

DataSource already exists exception

class nxstools.nxscreator.Device[source]ΒΆ

Bases: object

device from online.xml

attributeΒΆ

(str) attribute name

compare(dv)[source]ΒΆ
dtypeΒΆ

(str) device type

findAttribute(tangohost, clientlike=False)[source]ΒΆ

sets attribute and datasource group of online.xml device

Parameters:
  • tangohost (str) – tango host

  • clientlike (bool) – tango motors to be client like

findDevice(tangohost)[source]ΒΆ

sets sardana device name and sardana host/port of online.xml device

Parameters:

tangohost (str) – tango host

groupΒΆ

(str) datasource tango group

hostΒΆ

(str) host without port

hostnameΒΆ

(str) host name with port

moduleΒΆ

(str) device module

nameΒΆ

(str) device name

portΒΆ

(str) port

sardanahostnameΒΆ

(str) sardana host name

sardananameΒΆ

(str) sardana name with port

sdeviceΒΆ

(str) sardana device name

setSardanaName(tolower)[source]ΒΆ

sets sardana name

Parameters:

tolower (bool) – If True name in lowercase

shostΒΆ

(str) sardana host without port

splitHostPort()[source]ΒΆ

spilts host name from port

sportΒΆ

(str) sardana tango port

tdeviceΒΆ

(str) tango device name

thostΒΆ

(str) tango host without port

tolower()[source]ΒΆ

converts name, module, tdevice, hostname into lower case

tportΒΆ

(str) tango port

class nxstools.nxscreator.DeviceDSCreator(options, args, printouts=True)[source]ΒΆ

Bases: Creator

device datasource creator

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list < str >) – command arguments

  • printouts (bool) – if printout is enable

create()[source]ΒΆ

creates a tango datasources xml of given device and stores it in DB or filesytem

class nxstools.nxscreator.OnlineCPCreator(options, args, printouts=True)[source]ΒΆ

Bases: CPCreator

component creator of online components

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list < str >) – command arguments

  • printouts (bool) – if printout is enable

createXMLs()[source]ΒΆ

creates component xmls of all online.xml complex devices

listcomponents()[source]ΒΆ

provides a list of components with xml templates

Returns:

list of components with xml templates

Return type:

list <str >

listcomponenttypes()[source]ΒΆ

provides a list of standard component types

Returns:

list of standard component types

Return type:

list <str>

class nxstools.nxscreator.OnlineDSCreator(options, args, printouts=True)[source]ΒΆ

Bases: Creator

datasource creator of all online.xml simple devices

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list <str >) – command arguments

  • printouts (bool) – if printout is enable

create()[source]ΒΆ

creates datasources of all online.xml simple devices

createXMLs()[source]ΒΆ

creates datasource xmls of all online.xml simple devices

datasourcesΒΆ

(dict <str, str >) datasource xml dictionary

xmlpackageΒΆ

(str) xml template component package

xmltemplatepathΒΆ

(str) xml template component package path

nxstools.nxscreator.PYTANGO = TrueΒΆ

(bool) True if PyTango available

class nxstools.nxscreator.PoolDSCreator(options, args, printouts=True)[source]ΒΆ

Bases: Creator

datasource creator of all sardana pool acquisition channels

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list <str >) – command arguments

  • printouts (bool) – if printout is enable

create()[source]ΒΆ

creates datasources of all online.xml simple devices

createXMLs()[source]ΒΆ

creates datasource xmls of all online.xml simple devices

datasourcesΒΆ

(dict <str, str >) datasource xml dictionary

class nxstools.nxscreator.SECoPCPCreator(options, args, printouts=True)[source]ΒΆ

Bases: CPCreator

component creator of secop components

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list < str >) – command arguments

  • printouts (bool) – if printout is enable

create()[source]ΒΆ

creates components of all online.xml complex devices

createSECoPDS(dsname, message, group=None, access=None, host=None, port=None, timeout=None)[source]ΒΆ

create SECoP datasource

Parameters:
  • dsname (str) – datasource name

  • message (str) – secop command

  • group (str) – secop group name

  • access (str) – secop attribute access list

  • host (str) – secop host name

  • port (str or float) – secop port name

  • port – minimum timeout

createSECoPLinkDS(entryname, samplename, sampleenvname, meanings, environments)[source]ΒΆ

create SECoP datasource

Parameters:
  • entryname (str) – secop entry name

  • samplename (str) – secop sample name

  • sampleenvname (str) – secop sample name

  • meanings (str) – secop meanings list

  • environments (str) – secop environments list

createXMLs()[source]ΒΆ

creates component xmls of all online.xml complex devices

listmodules()[source]ΒΆ

provides a list of modules for the secop node

Returns:

list of modules for the secop node

Return type:

list <str >

class nxstools.nxscreator.StandardCPCreator(options, args, printouts=True)[source]ΒΆ

Bases: CPCreator

component creator of standard templates

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list < str >) – command arguments

  • printouts (bool) – if printout is enable

createXMLs()[source]ΒΆ

creates component xmls of all online.xml complex devices

listcomponenttypes()[source]ΒΆ

provides a list of standard component types

Returns:

list of standard component types

Return type:

list <str>

listcomponentvariables()[source]ΒΆ

provides a list of standard component types

Returns:

list of standard component types

Return type:

list <str>

class nxstools.nxscreator.TangoDSCreator(options, args, printouts=True)[source]ΒΆ

Bases: Creator

tango datasource creator

constructor

Parameters:
  • options (optparse.Values) – command options

  • args (list < str >) – command arguments

  • printouts (bool) – if printout is enable

create()[source]ΒΆ

creates a tango datasource xml and stores it in DB or filesytem

exception nxstools.nxscreator.WrongParameterError[source]ΒΆ

Bases: Exception

wrong parameter exception

nxstools.nxsdata moduleΒΆ

Command-line tool to ascess to Tango Data Server

class nxstools.nxsdata.CloseEntry(parser)[source]ΒΆ

Bases: Runner

CloseEntry runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'close the current entry'ΒΆ

(str) command description

epilog = ' examples:\n       nxsdata closeentry \n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsdata.CloseFile(parser)[source]ΒΆ

Bases: Runner

CloseFile runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'close the current file'ΒΆ

(str) command description

epilog = ' examples:\n       nxsdata closefile \n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsdata.NexusServer(device)[source]ΒΆ

Bases: object

configuration server adapter

constructor

Parameters:

device (str) – device name of configuration server

closeEntry()[source]ΒΆ

closes the entry

closeFile()[source]ΒΆ

closes the file

openEntry(xmlconfig)[source]ΒΆ

opens an entry

Parameters:

xmlconfig (str) – xml configuration string

openFile(filename)[source]ΒΆ

opens the h5 file

Parameters:

filename (str) – h5 file name

record(jsondata)[source]ΒΆ

records one step

Parameters:

jsondata (str) – step JSON data

setData(jsondata)[source]ΒΆ

sets the global JSON data

Parameters:

jsondata (str) – global JSON data

tdwServerΒΆ

(PyTango.DeviceProxy) NeXus writer device proxy

class nxstools.nxsdata.OpenEntry(parser)[source]ΒΆ

Bases: Runner

OpenEntry runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'create new entry'ΒΆ

(str) command description

epilog = ' examples:\n       nxsdata openentry ... \n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsdata.OpenFile(parser)[source]ΒΆ

Bases: Runner

OpenFile runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'open a new H5 file'ΒΆ

(str) command description

epilog = ' examples:\n       nxsdata openfile /tmp/watertest.nxs \n       nxsdata openfile -s p02/tangodataserver/exp.01  /user/data/myfile.h5\n\n'ΒΆ

(str) command epilog

postauto()[source]ΒΆ

parser creator after autocomplete run

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsdata.Record(parser)[source]ΒΆ

Bases: Runner

Record runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'record one step with step JSON data'ΒΆ

(str) command description

epilog = ' examples:\n       nxsdata record ... \n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsdata.Servers(parser)[source]ΒΆ

Bases: Runner

Servers runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'get lists of tango data servers from the current tango host'ΒΆ

(str) command description

epilog = ' examples:\n       nxsdata servers \n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

class nxstools.nxsdata.SetData(parser)[source]ΒΆ

Bases: Runner

SetData runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'assign global JSON data'ΒΆ

(str) command description

epilog = ' examples:\n       nxsdata setdata ... \n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

nxstools.nxsdata.main()[source]ΒΆ

the main program function

nxstools.nxsdevicetools moduleΒΆ

NDTS TANGO device tools

nxstools.nxsdevicetools.PYTANGO = TrueΒΆ

(bool) True if tango available

class nxstools.nxsdevicetools.PackageHandler(packagename='nxstools.xmltemplates')[source]ΒΆ

Bases: object

xml templates package loader

constructor

Parameters:

packagename (str) – full package name

loadXMLTemplates(packagename)[source]ΒΆ

load xml template module variables

Parameters:

packagename (str) – full package name

nxstools.nxsdevicetools.checkServer(name='NXSConfigServer')[source]ΒΆ

provides server device name if only one or error in the other case

Parameters:

name (str) – server name

Returns:

server device name or empty string if error appears

Return type:

str

nxstools.nxsdevicetools.ctModules = ['mca8715roi', 'onedroi', 'sis3820', 'sis3302roi', 'xmcd', 'vfcadc', 'mythenroi', 'mhzdaqp01', 'dgg2', 'tangoattributectctrl']ΒΆ

(list <str>) counter/timer modules

nxstools.nxsdevicetools.findClassName(server, name)[source]ΒΆ

finds class name

Parameters:

name (str) – device name

Returns:

class name

Return type:

str

nxstools.nxsdevicetools.generateDeviceNames(prefix, first, last, minimal=False)[source]ΒΆ

generates device names

Parameters:
  • prefix (str) – device name prefix

  • first (int) – first device index

  • last (int) – last device index

Returns:

device names

Return type:

list <str>

nxstools.nxsdevicetools.getAttributes(device, host=None, port=10000)[source]ΒΆ

provides a list of device attributes

Parameters:
  • device (str) – tango device name

  • host (str) – device host

  • port (int) – device port

Returns:

list of device attributes

Return type:

list <str>

nxstools.nxsdevicetools.getClassName(devicename)[source]ΒΆ

provides device class name

Parameters:

devicename (str) – device name

Returns:

class name

Return type:

str

nxstools.nxsdevicetools.getDataSourceComponents(server, verbose=False)[source]ΒΆ

gets datasource components

Parameters:
  • server (str) – configuration server

  • verbose (bool) – additional printouts

Returns:

dictionary with datasource components

Return type:

dict <str, list <str>>

nxstools.nxsdevicetools.getServerTangoHost(server)[source]ΒΆ

fetches the server tango_host:tango_port

Parameters:

server (str) – tango server

Returns:

tango host

Return type:

str

nxstools.nxsdevicetools.getServers(name='NXSConfigServer')[source]ΒΆ

provides server device names

Parameters:

name (str) – server instance name

Returns:

list of the server device names

Return type:

list <str>

nxstools.nxsdevicetools.ioRegModules = ['sis3610']ΒΆ

(list <str>) IO register modules

nxstools.nxsdevicetools.listServers(server, name='NXSConfigServer')[source]ΒΆ

finds server names

Parameters:

name (str) – server instance name

Returns:

server list

Return type:

list <str>

nxstools.nxsdevicetools.moduleMultiAttributes = {'cobold': ['BinSize', 'ExposureTime'], 'dalsa': ['FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'TriggerMode', 'Width', 'Height', 'ExtendedExposure', 'BinComment', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'FramesReceived', 'FrameRate', 'FramesPerNXFile', 'NXFileCompression', 'TurboMode', 'ImageEnc', 'ViewingMode', 'ThrashedBuffers', 'FramesToAcquire', 'AcquisitionFrameCount', 'AcquisitionMode', 'AcquisitionFrameMode', 'LinearityEqualizer', 'NrExposedFrames', 'NrOffsetFrames', 'Offset', 'PixelFormat', 'ReadOutMode', 'Standby', 'SumScheme'], 'dalsavds': ['FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'TriggerMode', 'Width', 'Height', 'ExtendedExposure', 'BinComment', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'FramesReceived', 'FrameRate', 'FramesPerNXFile', 'NXFileCompression', 'TurboMode', 'ImageEnc', 'ViewingMode', 'ThrashedBuffers', 'FramesToAcquire', 'AcquisitionFrameCount', 'AcquisitionMode', 'AcquisitionFrameMode', 'LinearityEqualizer', 'NrExposedFrames', 'NrOffsetFrames', 'Offset', 'PixelFormat', 'ReadOutMode', 'Standby', 'SumScheme'], 'eiger1m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger1m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger4m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger4m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger9m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger9m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eigerdectris': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eigerdectrismesh': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'lambda': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'lambda2m': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'OpMode', 'Translations'], 'lambdavds': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'lambdavdsnm': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'limaccd': ['camera_type', 'camera_pixelsize', 'camera_model', 'acq_mode', 'acq_nb_frames', 'acq_trigger_mode', 'last_image_saved', 'latency_time', 'acc_max_expo_time', 'acc_expo_time', 'acc_time_mode', 'acc_dead_time', 'acc_live_time', 'saving_mode', 'saving_directory', 'saving_prefix', 'saving_suffix', 'saving_next_number', 'saving_format', 'saving_frame_per_file', 'image_type', 'image_width', 'image_height', 'image_sizes', 'image_roi', 'image_bin', 'image_flip', 'image_rotation', 'shutter_mode', 'shutter_open_time'], 'limaccds': ['camera_type', 'camera_pixelsize', 'camera_model', 'acq_mode', 'acq_nb_frames', 'acq_trigger_mode', 'last_image_saved', 'latency_time', 'acc_max_expo_time', 'acc_expo_time', 'acc_time_mode', 'acc_dead_time', 'acc_live_time', 'saving_mode', 'saving_directory', 'saving_prefix', 'saving_suffix', 'saving_next_number', 'saving_format', 'saving_frame_per_file', 'image_type', 'image_width', 'image_height', 'image_sizes', 'image_roi', 'image_bin', 'image_flip', 'image_rotation', 'shutter_mode', 'shutter_open_time'], 'maiadimension': ['Name', 'PositionSource', 'PixelPitch', 'PixelOrigin', 'PixelHysteresis', 'PositionUnit', 'PixelCoordExtent'], 'maiaflux': ['FluxCoeff', 'FluxName', 'FluxUnit', 'FluxSource'], 'maiainterlock': ['BiasPeltierInterlock', 'BiasPeltierInterlockUptime', 'Pressure'], 'maialogger': ['RunNumber'], 'maiaprocessing': ['GaintrimEnable', 'LineariseEnable', 'PhotonEnable', 'PileupRejectEnable', 'PixelEnable', 'ThrottleEnable'], 'maiasensor': ['BiasVoltage', 'LeakageCurrent', 'PeltierCurrent', 'WaterTemperature', 'DetectorTemperature', 'MosfetTemperature', 'Identity'], 'marccd': ['FrameShift', 'SavingDirectory', 'SavingPostfix', 'SavingPrefix'], 'mca_xia': ['ICR', 'OCR'], 'mca_xia@pool': ['CountsRoI', 'RoIEnd', 'RoIStart'], 'mythen': ['Counts1', 'Counts2', 'CountsMax', 'CountsTotal', 'ExposureTime', 'FileDir', 'FileIndex', 'FilePrefix', 'Data', 'RoI1', 'RoI2'], 'mythen2': ['Counts1', 'Counts2', 'CountsMax', 'CountsTotal', 'ExposureTime', 'FileDir', 'FileIndex', 'FilePrefix', 'Data', 'Energy', 'NbFrames', 'RoI1End', 'RoI2End', 'RoI1Start', 'RoI2Start', 'Threshold'], 'pco': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pco4000': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pcoedge': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pedetector': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'perkinelmer': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'perkinelmerdetector': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'pilatus': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus100k': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus1m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus2m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus300k': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus6m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilc': ['PositionTriggerStart', 'PositionTriggerStepSize', 'PositionTriggerStop', 'NbTriggers', 'TriggerPulseLength', 'Arm', 'TriggerMode', 'TimeTriggerStart', 'TimeTriggerStepSize', 'FilePrefix', 'FileDir', 'FileName', 'TriggerCounter', 'EncoderTrigger', 'RemainingTriggers', 'EncoderTriggering', 'BufferLoad', 'Position1Conversion', 'Position2Conversion', 'Position3Conversion', 'Position4Conversion', 'Position5Conversion', 'CurrentPosition1', 'CurrentPosition2', 'CurrentPosition3', 'CurrentPosition4', 'CurrentPosition5', 'MaskDataToWrite', 'Metadata1', 'Metadata2', 'Metadata3', 'Metadata4', 'Metadata5', 'TriggersPerFile', 'SoftwareInhibit', 'HardwareInhibit', 'CounterConfig'], 'pilctimeid': ['PositionTriggerStart', 'PositionTriggerStepSize', 'PositionTriggerStop', 'NbTriggers', 'TriggerPulseLength', 'Arm', 'TriggerMode', 'TimeTriggerStart', 'TimeTriggerStepSize', 'FilePrefix', 'FileDir', 'FileName', 'TriggerCounter', 'EncoderTrigger', 'RemainingTriggers', 'EncoderTriggering', 'BufferLoad', 'Position1Conversion', 'Position2Conversion', 'Position3Conversion', 'Position4Conversion', 'Position5Conversion', 'CurrentPosition1', 'CurrentPosition2', 'CurrentPosition3', 'CurrentPosition4', 'CurrentPosition5', 'MaskDataToWrite', 'Metadata1', 'Metadata2', 'Metadata3', 'Metadata4', 'Metadata5', 'TriggersPerFile', 'SoftwareInhibit', 'HardwareInhibit', 'CounterConfig'], 'tangovimba': ['Width', 'WidthMax', 'TriggerSource', 'PixelFormat', 'OffsetY', 'OffsetX', 'HeightMax', 'Height', 'GainRaw', 'ExposureTimeAbs', 'AcquisitionFrameRateAbs', 'AcquisitionFrameRateLimit', 'StreamBytesPerSecond', 'BinComment', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'MaxLoad', 'ReadMode', 'TuneMode', 'ViewingMode']}ΒΆ

(dict <str , list <str> >) important attributes of modules

nxstools.nxsdevicetools.moduleTemplateFiles = {'cobold': ['cobold.xml'], 'dalsa': ['dalsa.xml', 'dalsa_nxdata.ds.xml', 'dalsa_external_data.ds.xml'], 'dalsavds': ['dalsavds.xml', 'dalsavds_nxdata.ds.xml', 'dalsavds_triggermode_cb.ds.xml', 'dalsavds_filestartnum_cb.ds.xml', 'dalsavds_nrexposedframes_cb.ds.xml'], 'eiger1m16vds': ['eiger1m16vds.xml', 'eiger1m16vds_stepindex.ds.xml', 'eiger1m16vds_nbimages_cb.ds.xml', 'eiger1m16vds_description_cb.ds.xml', 'eiger1m16vds_triggermode_cb.ds.xml'], 'eiger1m32vds': ['eiger1m32vds.xml', 'eiger1m32vds_stepindex.ds.xml', 'eiger1m32vds_nbimages_cb.ds.xml', 'eiger1m32vds_description_cb.ds.xml', 'eiger1m32vds_triggermode_cb.ds.xml'], 'eiger4m16vds': ['eiger4m16vds.xml', 'eiger4m16vds_stepindex.ds.xml', 'eiger4m16vds_nbimages_cb.ds.xml', 'eiger4m16vds_description_cb.ds.xml', 'eiger4m16vds_triggermode_cb.ds.xml'], 'eiger4m32vds': ['eiger4m32vds.xml', 'eiger4m32vds_stepindex.ds.xml', 'eiger4m32vds_nbimages_cb.ds.xml', 'eiger4m32vds_description_cb.ds.xml', 'eiger4m32vds_triggermode_cb.ds.xml'], 'eiger9m16vds': ['eiger9m16vds.xml', 'eiger9m16vds_stepindex.ds.xml', 'eiger9m16vds_nbimages_cb.ds.xml', 'eiger9m16vds_description_cb.ds.xml', 'eiger9m16vds_triggermode_cb.ds.xml'], 'eiger9m32vds': ['eiger9m32vds.xml', 'eiger9m32vds_stepindex.ds.xml', 'eiger9m32vds_nbimages_cb.ds.xml', 'eiger9m32vds_description_cb.ds.xml', 'eiger9m32vds_triggermode_cb.ds.xml'], 'eigerdectris': ['eigerdectris.xml', 'eigerdectris_stepindex.ds.xml', 'eigerdectris_nbimages_cb.ds.xml', 'eigerdectris_description_cb.ds.xml', 'eigerdectris_triggermode_cb.ds.xml'], 'eigerdectrismesh': ['eigerdectrismesh.xml', 'eigerdectrismesh_stepindex.ds.xml', 'eigerdectrismesh_nbimages_cb.ds.xml', 'eigerdectrismesh_description_cb.ds.xml', 'eigerdectrismesh_triggermode_cb.ds.xml'], 'lambda': ['lambda.xml', 'lambda_nxdata.ds.xml', 'lambda_external_data.ds.xml'], 'lambda2m': ['lambda2m.xml', 'lambda2m_m1_nxdata.ds.xml', 'lambda2m_m2_nxdata.ds.xml', 'lambda2m_m3_nxdata.ds.xml', 'lambda2m_m1_external_data.ds.xml', 'lambda2m_m2_external_data.ds.xml', 'lambda2m_m3_external_data.ds.xml'], 'lambdavds': ['lambdavds.xml', 'lambdavds_nxdata.ds.xml', 'lambdavds_description.ds.xml', 'lambdavds_triggermode_cb.ds.xml', 'lambdavds_framenumbers_cb.ds.xml', 'lambdavds_savefilename_cb.ds.xml'], 'lambdavdsnm': ['lambdavdsnm.xml', 'lambdavdsnm_triggermode_cb.ds.xml', 'lambdavdsnm_nxdata.ds.xml'], 'limaccd': ['limaccd.xml', 'limaccd_postrun.ds.xml', 'limaccd_xpixelsize.ds.xml', 'limaccd_ypixelsize.ds.xml', 'limaccd_description.ds.xml', 'limaccd_filestartnum_cb.ds.xml'], 'limaccds': ['limaccd.xml', 'limaccd_postrun.ds.xml', 'limaccd_xpixelsize.ds.xml', 'limaccd_ypixelsize.ds.xml', 'limaccd_description.ds.xml', 'limaccd_filestartnum_cb.ds.xml'], 'marccd': ['marccd.xml', 'marccd_postrun.ds.xml'], 'mca_xia': ['mcaxia.xml'], 'mythen': ['mythen.xml', 'mythen_postrun.ds.xml', 'mythen_filestartnumber.ds.xml'], 'mythen2': ['mythen2.xml'], 'pco': ['pco.xml', 'pco_postrun.ds.xml', 'pco_description.ds.xml', 'pco_filestartnum_cb.ds.xml'], 'pco4000': ['pco.xml', 'pco_postrun.ds.xml', 'pco_description.ds.xml', 'pco_filestartnum_cb.ds.xml'], 'pcoedge': ['pco.xml', 'pco_postrun.ds.xml', 'pco_description.ds.xml', 'pco_filestartnum_cb.ds.xml'], 'pedetector': ['perkinelmerdetector.xml', 'perkinelmerdetector_postrun.ds.xml', 'perkinelmerdetector_description.ds.xml', 'perkinelmerdetector_fileindex_cb.ds.xml'], 'perkinelmer': ['perkinelmerdetector.xml', 'perkinelmerdetector_postrun.ds.xml', 'perkinelmerdetector_description.ds.xml', 'perkinelmerdetector_fileindex_cb.ds.xml'], 'perkinelmerdetector': ['perkinelmerdetector.xml', 'perkinelmerdetector_postrun.ds.xml', 'perkinelmerdetector_description.ds.xml', 'perkinelmerdetector_fileindex_cb.ds.xml'], 'pilatus': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus100k': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus100k_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus1m': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus1m_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus2m': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus6m_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus300k': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus300k_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus6m': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus6m_description.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilc': ['pilc.xml', 'pilc_triggermode_cb.ds.xml'], 'pilctimeid': ['pilctimeid.xml', 'pilctimeid_triggermode_cb.ds.xml'], 'tangovimba': ['tangovimba.xml', 'tangovimba_nxdata.ds.xml', 'tangovimba_external_data.ds.xml']}ΒΆ

(dict <str , list <str> >) xml template files of modules

nxstools.nxsdevicetools.motorModules = ['absbox', 'motor_tango', 'kohzu', 'smchydra', 'lom', 'oms58', 'e6c', 'omsmaxv', 'spk', 'pie710', 'pie712', 'e6c_p09_eh2', 'smaract']ΒΆ

(list <str>) modules of motors

nxstools.nxsdevicetools.oneDModules = ['mca_xia']ΒΆ

(list <str>) modules of 1D detectors

nxstools.nxsdevicetools.openServer(device)[source]ΒΆ

opens connection to the configuration server

Parameters:

configuration (str) – server device name

Returns:

configuration server proxy

Return type:

tango.DeviceProxy

nxstools.nxsdevicetools.standardComponentTemplateFiles = {'absorber': ['absorber_foil.ds.xml', 'absorber_thickness.ds.xml', 'absorber.xml'], 'beamstop': ['beamstop.xml'], 'beamtimefname': ['beamtimefname.xml', 'beamtimefname.ds.xml', 'start_time.ds.xml'], 'beamtimeid': ['beamtimeid.xml', 'beamtimeid.ds.xml', 'start_time.ds.xml'], 'chcut': ['chcut.xml', 'chcut_unitcalibration.ds.xml', 'chcut_crystal.ds.xml'], 'coboldhisto': ['coboldhisto.xml', 'coboldhisto_timeofflight.ds.xml'], 'collect2': ['collect2.xml'], 'collect3': ['collect3.xml'], 'collect4': ['collect4.xml'], 'collect5': ['collect5.xml'], 'collect6': ['collect6.xml'], 'common2': ['common2_common.ds.xml'], 'common3': ['common3_common.ds.xml'], 'dataaxessignal': ['dataaxessignal.xml', 'defaultsignal.ds.xml', 'defaultaxes.ds.xml', 'signal_name.ds.xml', 'signalname.ds.xml', 'sardanaenvironment.ds.xml'], 'datasignal': ['datasignal.xml', 'defaultsignal.ds.xml', 'signal_name.ds.xml', 'signalname.ds.xml', 'signal_axes.ds.xml', 'sardanaenvironment.ds.xml'], 'dcm': ['dcm.xml', 'dcm_reflection.ds.xml', 'dcm_unitcalibration.ds.xml', 'dcm_crystal.ds.xml'], 'default': ['default.xml', 'defaultsample.xml', 'defaultinstrument.xml', 'sample_name.ds.xml', 'chemical_formula.ds.xml', 'beamtime_id.ds.xml', 'beamtime_filename.ds.xml', 'start_time.ds.xml', 'end_time.ds.xml', 'nexdatas_version.ds.xml', 'nexdatas_configuration.ds.xml', 'title.ds.xml'], 'defaultinstrument': ['defaultinstrument.xml', 'beamtime_id.ds.xml', 'beamtime_filename.ds.xml', 'start_time.ds.xml', 'end_time.ds.xml', 'nexdatas_version.ds.xml', 'nexdatas_configuration.ds.xml', 'title.ds.xml'], 'defaultsample': ['defaultsample.xml', 'sample_name.ds.xml', 'chemical_formula.ds.xml'], 'description': ['description.xml', 'experiment_description.ds.xml'], 'descriptiontext': ['descriptiontext.xml'], 'detectorlive': ['detectorlive.xml'], 'empty': ['empty.xml'], 'groupsecop': ['groupsecop.ds.xml', 'groupsecop_time.ds.xml', 'client_start_time.ds.xml', 'sample_env_links.ds.xml', 'sample_log_links.ds.xml'], 'keithley': ['keithley.xml'], 'maia': ['maia.xml', 'empty.xml'], 'maiadimension': ['maiadimension.xml'], 'maiaflux': ['maiaflux.xml'], 'msnsar': ['msnsar_env.ds.xml', 'sardanaenvironment.ds.xml'], 'mssar': ['mssar_env.ds.xml', 'sardanaenvironment.ds.xml'], 'parametercopymap': ['parametercopymap.xml'], 'pinhole': ['pinhole.xml'], 'pointdet': ['pointdet.xml'], 'qbpm': ['qbpm_foil.ds.xml', 'qbpm.xml'], 'sampledescription': ['sampledescription.xml', 'sample_description.ds.xml'], 'sampledescriptiontext': ['sampledescriptiontext.xml'], 'samplehkl': ['samplehkl.xml'], 'secop': ['secop.ds.xml', 'secop_time.ds.xml', 'client_start_time.ds.xml', 'sample_env_links.ds.xml', 'sample_log_links.ds.xml'], 'secoplinks': ['sample_env_links.ds.xml', 'sample_log_links.ds.xml', 'sample_nxdata.ds.xml', 'sampleenv_nxdata.ds.xml'], 'singlesecop': ['singlesecop.ds.xml', 'singlesecop_time.ds.xml', 'client_start_time.ds.xml', 'sample_env_links.ds.xml', 'sample_log_links.ds.xml'], 'slit': ['slit.xml'], 'source': ['source.xml'], 'starttime': ['starttime.xml', 'starttime.ds.xml', 'start_timestamp.ds.xml', 'client_start_time.ds.xml'], 'tango': ['tango.ds.xml'], 'undulator': ['undulator.xml']}ΒΆ

(dict <str , list <str> >) xml template files of modules

nxstools.nxsdevicetools.standardComponentVariables = {'absorber': {'attenfactor': {'default': None, 'doc': 'attenuation factor (datasource)'}, 'dependstop': {'default': None, 'doc': 'the first transformation, e.g. distance (string)'}, 'distance': {'default': None, 'doc': 'distance for the sample in m, e.g. 0 (string)'}, 'distancename': {'default': 'distance', 'doc': 'distance name for the sample in m, e.g. 0 (string)'}, 'distanceoffset': {'default': None, 'doc': '3-vector distance offset in m, e.g. sample-source offset if the distance is taken from the source (string)'}, 'foil': {'default': None, 'doc': 'foil type, i.e. standard <cpname>_foil (datasource)'}, 'foillist': {'default': '["Ag", "Ag", "Ag", "Ag", "", "Al", "Al", "Al", "Al"]', 'doc': 'foil_type position json dictionary (string)'}, 'position': {'default': None, 'doc': 'which sliders are in [bitarray] MANDATORY (datasource)'}, 'thickness': {'default': None, 'doc': 'foil thickness, i.e. standard <cpname>_thickness (datasource)'}, 'thicknesslist': {'default': '[0.5, 0.05, 0.025, 0.0125, 0, 0.1, 0.3, 0.5, 1.0]', 'doc': 'foil_type position json dictionary (string)'}, 'transformations': {'default': None, 'doc': "transformations group name i.e. 'transformations'. If it is  not set it is not created (string)"}, 'y': {'default': None, 'doc': 'vertical position (datasource)'}, 'yname': {'default': 'y', 'doc': 'vertical position name (string)'}}, 'beamstop': {'description': {'default': 'circular', 'doc': ' circular or  rectangular (string)'}, 'x': {'default': None, 'doc': 'horizontal position (datasource)'}, 'xname': {'default': 'x', 'doc': 'horizontal position name (string)'}, 'xsign': {'default': '', 'doc': "horizontal position sign, e.g. '-' (string)"}, 'y': {'default': None, 'doc': 'vertical position (datasource)'}, 'yname': {'default': 'y', 'doc': 'vertical position name (string)'}, 'z': {'default': None, 'doc': 'vertical position (datasource)'}, 'zname': {'default': 'z', 'doc': 'along the beam position name (string)'}}, 'beamtimefname': {'commissiondir': {'default': '/gpfs/commissioning', 'doc': 'commission file directory (string)'}, 'commissionpostfix': {'default': '.json', 'doc': 'commission file postfix (string)'}, 'commissionprefix': {'default': 'commissioning-metadata-', 'doc': 'commission file prefix (string)'}, 'currentdir': {'default': '/gpfs/current', 'doc': 'beamtime file directory (string)'}, 'currentpostfix': {'default': '.json', 'doc': 'beamtime file postfix (string)'}, 'currentprefix': {'default': 'beamtime-metadata-', 'doc': 'beamtime file prefix (string)'}, 'localdir': {'default': '/gpfs/local', 'doc': 'local file directory (string)'}, 'shortname': {'default': 'P09', 'doc': 'beamline short name (string)'}}, 'beamtimeid': {'commissiondir': {'default': '/gpfs/commissioning', 'doc': 'commission file directory (string)'}, 'commissionpostfix': {'default': '.json', 'doc': 'commission file postfix (string)'}, 'commissionprefix': {'default': 'commissioning-metadata-', 'doc': 'commission file prefix (string)'}, 'currentdir': {'default': '/gpfs/current', 'doc': 'beamtime file directory (string)'}, 'currentpostfix': {'default': '.json', 'doc': 'beamtime file postfix (string)'}, 'currentprefix': {'default': 'beamtime-metadata-', 'doc': 'beamtime file prefix (string)'}, 'localdir': {'default': '/gpfs/local', 'doc': 'local file directory (string)'}, 'shortname': {'default': 'P09', 'doc': 'beamline short name (string)'}}, 'chcut': {'braggangle': {'default': None, 'doc': 'bragg angle (datasource)'}, 'bragganglename': {'default': 'bragg', 'doc': 'bragg angle name  (string)'}, 'chcutdevice': {'default': None, 'doc': 'FMBOxfDCMEnergy tango device name (string)'}, 'crystal': {'default': None, 'doc': ' type of crystal i.e. 0->Si111,1->Si311,2->Si111 ChannelCut  (datasource)'}, 'energy': {'default': None, 'doc': 'synchronized monochromator energy (datasource)'}, 'energyfmb': {'default': None, 'doc': 'monochromator energy (datasource)'}, 'jack1': {'default': None, 'doc': 'first vertical jack of table (datasource)'}, 'jack1name': {'default': 'jack1', 'doc': 'first vertical jack name of table (string)'}, 'jack2': {'default': None, 'doc': 'second vertical jack of table (datasource)'}, 'jack2name': {'default': 'jack2', 'doc': 'second vertical jack name of table (string)'}, 'jack3': {'default': None, 'doc': 'third vertical jack of table (datasource)'}, 'jack3name': {'default': 'jack3', 'doc': 'third vertical jack name of table (string)'}, 'lat': {'default': None, 'doc': 'horizontal lattice translation of the first cristal (datasource)'}, 'latname': {'default': 'lat', 'doc': 'horizontal lattice translation name of the first cristal (string)'}, 'oxfordhorizontal': {'default': None, 'doc': ' horizontal translation (datasource)'}, 'para': {'default': None, 'doc': 'distance between the crystals (string)'}, 'paraname': {'default': 'para', 'doc': 'beam parallel translation name of the second cristal (string)'}, 'reflection': {'default': None, 'doc': 'reflection from string (datasource)'}, 'table': {'default': None, 'doc': 'vertical position of table (datasource)'}, 'tablename': {'default': 'table', 'doc': 'vertical position name of table (string)'}, 'theta': {'default': None, 'doc': 'theta angle (datasource)'}, 'thetaname': {'default': 'theta', 'doc': 'theta angle name (string)'}, 'unitcalibration': {'default': None, 'doc': ' unit calibration from dcmmotor (datasource)'}, 'usage': {'default': 'Bragg', 'doc': 'the crystall usage, e.g. Laue (string)'}, 'yaw': {'default': None, 'doc': 'phi rotation of the first cristal (datasource)'}, 'yawname': {'default': 'phi', 'doc': 'phi rotation name of the first cristal (string)'}}, 'coboldhisto': {'binsize': {'default': None, 'doc': 'bin size of histogram data (datasource)'}, 'exposuretime': {'default': None, 'doc': 'exposure time for histogram data (datasource)'}, 'histogram': {'default': None, 'doc': 'histogram data (datasource)'}}, 'collect2': {'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}}, 'collect3': {'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}, 'third': {'default': None, 'doc': 'name of the third component to collect MANDATORY (datasource)'}}, 'collect4': {'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'fourth': {'default': None, 'doc': 'name of the fourth component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}, 'third': {'default': None, 'doc': 'name of the third component to collect MANDATORY (datasource)'}}, 'collect5': {'fifth': {'default': None, 'doc': 'name of the fifth component to collect MANDATORY (datasource)'}, 'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'fourth': {'default': None, 'doc': 'name of the fourth component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}, 'third': {'default': None, 'doc': 'name of the third component to collect MANDATORY (datasource)'}}, 'collect6': {'fifth': {'default': None, 'doc': 'name of the fifth component to collect MANDATORY (datasource)'}, 'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'fourth': {'default': None, 'doc': 'name of the fourth component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}, 'sixth': {'default': None, 'doc': 'name of the sixth component to collect MANDATORY (datasource)'}, 'third': {'default': None, 'doc': 'name of the third component to collect MANDATORY (datasource)'}}, 'common2': {'dds': {'default': None, 'doc': 'default read datasource name MANDATORY (datasource)'}, 'ods': {'default': None, 'doc': 'optional detasource name MANDATORY (datasource)'}}, 'common3': {'dds': {'default': None, 'doc': 'default read datasource name MANDATORY (datasource)'}, 'ods1': {'default': None, 'doc': 'fist optional detasource name MANDATORY (datasource)'}, 'ods2': {'default': None, 'doc': 'second optional detasource name MANDATORY (datasource)'}}, 'dataaxessignal': {'__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'axes': {'default': 'defaultaxes', 'doc': 'list of data axes field names (datasource)'}, 'defaultattrs': {'default': 'False', 'doc': 'add default attributes (string)'}, 'msenv': {'default': None, 'doc': 'sardana environment (datasource)'}, 'mssardanadevice': {'default': None, 'doc': 'macroserver sardana device name MANDATORY (string)'}, 'nchannelstoskip': {'default': '0', 'doc': 'number of mg channels to skip (string)'}, 'sardanasignal': {'default': 'SignalCounter', 'doc': 'signal sardana variable name (string)'}, 'signal': {'default': 'defaultsignal', 'doc': 'data signal field name (datasource)'}}, 'datasignal': {'__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'axes': {'default': None, 'doc': 'data axes field name(s) (datasource)'}, 'msenv': {'default': None, 'doc': 'sardana environment (datasource)'}, 'mssardanadevice': {'default': None, 'doc': 'macroserver sardana device name MANDATORY (string)'}, 'nchannelstoskip': {'default': '0', 'doc': 'number of mg channels to skip (string)'}, 'sardanasignal': {'default': 'SignalCounter', 'doc': 'signal sardana variable name (string)'}, 'signal': {'default': 'defaultsignal', 'doc': 'data signal field name (datasource)'}}, 'dcm': {'bend1': {'default': None, 'doc': 'bending of the first cristal (datasource)'}, 'bend2': {'default': None, 'doc': 'bending of the second cristal (datasource)'}, 'braggangle': {'default': None, 'doc': 'bragg angle (datasource)'}, 'bragganglename': {'default': 'bragg', 'doc': 'bragg angle name  (string)'}, 'chi2dependson': {'default': 'theta', 'doc': 'the depends_on field of the second cristal chi, e.g. phi (string)'}, 'crystal': {'default': None, 'doc': 'type of crystal i.e. 0->Si111,1->Si311,2->Si111 ChannelCut (datasource)'}, 'dcmdevice': {'default': None, 'doc': 'FMBOxfDCMEnergy tango device (string)'}, 'energy': {'default': None, 'doc': 'synchronized monochromator energy (datasource)'}, 'energyfmb': {'default': None, 'doc': 'monochromator energy (datasource)'}, 'exitoffset': {'default': None, 'doc': ' exit offset (datasource)'}, 'jack1': {'default': None, 'doc': 'first vertical jack of table (datasource)'}, 'jack1name': {'default': 'jack1', 'doc': 'first vertical jack name of table (string)'}, 'jack2': {'default': None, 'doc': 'second vertical jack of table (datasource)'}, 'jack2name': {'default': 'jack2', 'doc': 'second vertical jack name of table (string)'}, 'jack3': {'default': None, 'doc': 'third vertical jack of table (datasource)'}, 'jack3name': {'default': 'jack3', 'doc': 'third vertical jack name of table (string)'}, 'lat': {'default': None, 'doc': 'horizontal lattice translation of the first cristal (datasource)'}, 'lat2': {'default': None, 'doc': 'horizontal lattice translation of the second cristal (datasource)'}, 'lat2name': {'default': 'lat', 'doc': 'horizontal lattice translation name of the second cristal (string)'}, 'latname': {'default': 'lat', 'doc': 'horizontal lattice translation name of the first cristal (string)'}, 'oxfordhorizontal': {'default': None, 'doc': ' horizontal translation (datasource)'}, 'par2': {'default': None, 'doc': 'beam parallel translation of the second cristal (datasource)'}, 'par2name': {'default': 'para', 'doc': 'beam parallel translation name of the second cristal (string)'}, 'perp2': {'default': None, 'doc': 'vertical translation of the second cristal (datasource)'}, 'perp2name': {'default': 'perp', 'doc': 'vertical translation name of the second cristal (string)'}, 'phi1dependson': {'default': '../../transformations/bragg', 'doc': 'the depends_on field of the first cristal phi, e.g. theta (string)'}, 'pitch1': {'default': None, 'doc': 'theta rotation of the first cristal (datasource)'}, 'pitch1name': {'default': 'theta', 'doc': 'theta rotation name of the first cristal (string)'}, 'pitch2': {'default': None, 'doc': 'theta rotation of the second cristal (datasource)'}, 'pitch2name': {'default': 'theta', 'doc': 'theta rotation name of the second cristal (string)'}, 'roll1': {'default': None, 'doc': 'chi rotation of the first cristal (datasource)'}, 'roll1name': {'default': 'chi', 'doc': 'chi rotation name of the first cristal (string)'}, 'roll2': {'default': None, 'doc': 'chi rotation of the second cristal (datasource)'}, 'roll2name': {'default': 'chi', 'doc': 'chi rotation name of the second cristal (string)'}, 'table': {'default': None, 'doc': 'vertical position of table (datasource)'}, 'tablename': {'default': 'table', 'doc': 'vertical position name of table (string)'}, 'theta': {'default': None, 'doc': 'theta angle (datasource)'}, 'thetaname': {'default': 'theta', 'doc': 'theta angle name (string)'}, 'topdependson2': {'default': 'chi', 'doc': 'the first transformation of the second crystal, e.g. lat (string)'}, 'unitcalibration': {'default': None, 'doc': 'unit calibration from dcmmotor (datasource)'}, 'usage': {'default': 'Bragg', 'doc': 'the crystall usage, e.g. Laue (string)'}, 'yaw': {'default': None, 'doc': 'phi rotation of the first cristal (datasource)'}, 'yaw2': {'default': None, 'doc': 'phi rotation of the second cristal (datasource)'}, 'yaw2name': {'default': 'phi', 'doc': 'phi rotation name of the second cristal (string)'}, 'yawname': {'default': 'phi', 'doc': 'phi rotation name of the first cristal (string)'}}, 'default': {'__configdevice__': {'default': 'nxs/configserver/localhost', 'doc': 'configuration server device name (string)'}, '__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'control': {'default': None, 'doc': 'group name of the monitor (string)'}, 'longname': {'default': 'P09 Resonant Scattering and Diffraction beamline', 'doc': 'beamline long name (string)'}, 'shortname': {'default': 'P09', 'doc': 'beamline short name (string)'}, 'sourcename': {'default': 'PETRA III', 'doc': 'source name (string)'}, 'srcname': {'default': 'source', 'doc': 'source group name (string)'}}, 'defaultinstrument': {'__configdevice__': {'default': 'nxs/configserver/localhost', 'doc': 'configuration server device name (string)'}, '__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'control': {'default': None, 'doc': 'group name of the monitor (string)'}, 'longname': {'default': 'P09 Resonant Scattering and Diffraction beamline', 'doc': 'beamline long name (string)'}, 'shortname': {'default': 'P09', 'doc': 'beamline short name (string)'}, 'sourcename': {'default': 'PETRA III', 'doc': 'source name (string)'}, 'srcname': {'default': 'source', 'doc': 'source group name (string)'}}, 'defaultsample': {}, 'description': {}, 'descriptiontext': {'description': {'default': 'scan', 'doc': 'scan technique (string)'}}, 'detectorlive': {'datatype': {'default': 'NX_UINT32', 'doc': 'list of devices (string)'}, 'detectordata': {'default': None, 'doc': 'detector live data (datasource)'}, 'detname': {'default': 'detector', 'doc': 'list of devices (string)'}}, 'empty': {}, 'groupsecop': {'access': {'default': None, 'doc': 'secop access list (string)'}, 'group': {'default': None, 'doc': 'secop group name (string)'}, 'host': {'default': None, 'doc': 'secop host name (string)'}, 'message': {'default': None, 'doc': 'secop command MANDATORY (string)'}, 'port': {'default': '5000', 'doc': 'secop port name (string)'}, 'timeout': {'default': '0.0001', 'doc': 'secop timeout (string)'}}, 'keithley': {'current': {'default': None, 'doc': 'current in A (datasource)'}, 'gain': {'default': None, 'doc': 'gain in V/A (datasource)'}, 'risetime': {'default': None, 'doc': 'rise time (datasource)'}, 'sourvoltlevel': {'default': None, 'doc': 'source voltage level in V (datasource)'}, 'voltage': {'default': None, 'doc': 'voltage in V (datasource)'}}, 'maia': {'chillersetpoint': {'default': None, 'doc': 'chiller set point temperature in Celsus (datasource)'}, 'chiptemperature': {'default': None, 'doc': 'detector chip temperature sensor for maia in Celsus (datasource)'}, 'gaintrimenable': {'default': None, 'doc': 'gaintrim enable status for maia (datasource)'}, 'identity': {'default': None, 'doc': 'sensor identity for maia (datasource)'}, 'interlockpressure': {'default': None, 'doc': 'interlock pressure for maia in mbar (datasource)'}, 'leakagecurrent': {'default': None, 'doc': 'leakage current sensor for maia in A (datasource)'}, 'lineariseenable': {'default': None, 'doc': 'linearise enable status for maia (datasource)'}, 'maiadimensions': {'default': 'empty', 'doc': 'maia dimensions component name (component)'}, 'maiafluxes': {'default': 'empty', 'doc': 'maia fluxes component name (component)'}, 'maiastage': {'default': 'empty', 'doc': 'maia stage component name (component)'}, 'mosfettemperature': {'default': None, 'doc': 'mosfet temperature sensor for maia in Celsus (datasource)'}, 'peltiercurrent': {'default': None, 'doc': 'peltier current sensor for maia in A (datasource)'}, 'photonenable': {'default': None, 'doc': 'photon enable status for maia (datasource)'}, 'pileuprejectionenable': {'default': None, 'doc': 'pileup rejection enable status for maia (datasource)'}, 'pixelenable': {'default': None, 'doc': 'pixel enable status for maia (datasource)'}, 'pressure': {'default': None, 'doc': 'gas pressure in mbar (datasource)'}, 'runnumber': {'default': None, 'doc': 'run number of maia (datasource)'}, 'status': {'default': None, 'doc': 'interlock status for maia (datasource)'}, 'throttleenable': {'default': None, 'doc': 'throttle enable status for maia (datasource)'}, 'uptime': {'default': None, 'doc': 'interlock uptime for maia (datasource)'}, 'voltagesetpoint': {'default': None, 'doc': 'voltage set point temperature in Celsus (datasource)'}, 'watertemperature': {'default': None, 'doc': 'water temperature sensor for maia in Celsus (datasource)'}}, 'maiadimension': {'detname': {'default': 'maia', 'doc': 'detector (alias) name (string)'}, 'dimname': {'default': None, 'doc': 'dimension name for maia (datasource)'}, 'dname': {'default': 'dimension', 'doc': 'dimension name group (string)'}, 'hysteresis': {'default': None, 'doc': 'pixel hysteresis of dimension for maia (datasource)'}, 'numberofpixels': {'default': None, 'doc': 'number of pixels of dimension for maia (datasource)'}, 'origin': {'default': None, 'doc': 'pixel origin of dimension for maia (datasource)'}, 'pixelpitch': {'default': None, 'doc': 'pixel pitch of dimension for maia (datasource)'}, 'positionsource': {'default': None, 'doc': 'position source of dimension for maia (datasource)'}, 'unit': {'default': None, 'doc': 'position units of dimension for maia (datasource)'}}, 'maiaflux': {'coefficient': {'default': None, 'doc': 'flux coefficient  for maia (datasource)'}, 'detname': {'default': 'maia', 'doc': 'detector (alias) name (string)'}, 'fluxname': {'default': None, 'doc': 'flux name for maia (datasource)'}, 'fname': {'default': 'fluxdevice', 'doc': 'flux name group (string)'}, 'keithleydevice': {'default': 'keithley', 'doc': 'keithley device name (string)'}, 'source': {'default': None, 'doc': 'flux source for maia (datasource)'}, 'unit': {'default': None, 'doc': 'flux unit for maia (datasource)'}, 'vfcfactor': {'default': None, 'doc': 'vfc conversion factor (datasource)'}}, 'msnsar': {'__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'msenv': {'default': None, 'doc': 'sardana environment (datasource)'}, 'mssardanadevice': {'default': None, 'doc': 'sardana device name MANDATORY (string)'}, 'varname': {'default': None, 'doc': 'nested sardana environment variable name  MANDATORY (string)'}}, 'mssar': {'__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'msenv': {'default': None, 'doc': 'sardana environment (datasource)'}, 'mssardanadevice': {'default': None, 'doc': 'macroserver sardana device name MANDATORY (string)'}, 'varname': {'default': None, 'doc': 'sardana environment variable name MANDATORY (string)'}}, 'parametercopymap': {'copymap': {'default': None, 'doc': 'yaml dictionary with {output: input} copy map (string)'}, 'parameter': {'default': 'copymap', 'doc': 'parameter name of copymap (string)'}, 'program': {'default': 'nxsfileinfo_parameters', 'doc': 'group name of NXparameters (string)'}}, 'pinhole': {'diameter': {'default': None, 'doc': 'pinhole diameter (datasource)'}, 'x': {'default': None, 'doc': 'horizontal position (datasource)'}, 'xname': {'default': 'x', 'doc': 'horizontal position name (string)'}, 'xsign': {'default': '', 'doc': "horizontal position sign, e.g. '-' (string)"}, 'y': {'default': None, 'doc': 'vertical position (datasource)'}, 'yname': {'default': 'y', 'doc': 'vertical position name (string)'}, 'z': {'default': None, 'doc': 'along the beam position (datasource)'}, 'zname': {'default': 'z', 'doc': 'along the beam position name (string)'}}, 'pointdet': {'data': {'default': None, 'doc': 'diode data (datasource)'}, 'detname': {'default': 'detector', 'doc': 'detector group name (string)'}}, 'qbpm': {'dependsony': {'default': '', 'doc': 'the  depends_on y field value,  e.g. distance (string)'}, 'dependstop': {'default': 'x', 'doc': 'the first transformation, e.g. distance (string)'}, 'distance': {'default': None, 'doc': 'distance for the sample in m, e.g. 0 (string)'}, 'distancename': {'default': 'distance', 'doc': 'distance name for the sample in m, e.g. 0 (string)'}, 'distanceoffset': {'default': None, 'doc': '3-vector distance offset in m, e.g. sample-source offset if the distance is taken from the source (string)'}, 'foil': {'default': None, 'doc': 'foil type, i.e. standard <cpname>_foil (datasource)'}, 'foilpos': {'default': None, 'doc': 'foil position MANDATORY (datasource)'}, 'foilposdict': {'default': '{"Ti": 43, "Ni": 23, "Out": 3}', 'doc': 'foil_type position json dictionary (string)'}, 'x': {'default': None, 'doc': 'horizontal position (datasource)'}, 'xname': {'default': 'x', 'doc': 'horizontal position name (string)'}, 'y': {'default': None, 'doc': 'vertical position (datasource)'}, 'yname': {'default': 'y', 'doc': 'vertical position name (string)'}}, 'sampledescription': {'sname': {'default': 'sample', 'doc': 'sample group name (string)'}}, 'sampledescriptiontext': {'description': {'default': '', 'doc': 'sample description or sampleId (string)'}, 'sname': {'default': 'sample', 'doc': 'sample group name (string)'}}, 'samplehkl': {'h': {'default': None, 'doc': 'h position in hkl space (datasource)'}, 'k': {'default': None, 'doc': 'k position in hkl space (datasource)'}, 'l': {'default': None, 'doc': 'l position in hkl space (datasource)'}, 'psi': {'default': None, 'doc': 'psi angle position of analyzer (datasource)'}, 'sname': {'default': 'sample', 'doc': 'sample group name (string)'}}, 'secop': {'host': {'default': None, 'doc': 'secop host name (string)'}, 'message': {'default': None, 'doc': 'secop command MANDATORY (string)'}, 'port': {'default': '5000', 'doc': 'secop port name (string)'}, 'timeout': {'default': '0.0001', 'doc': 'secop timeout (string)'}}, 'secoplinks': {'environments': {'default': 'temperature,magnetic_field', 'doc': 'secop environment link lists MANDATORY (string)'}, 'meanings': {'default': 'temperature,magnetic_field,electric_field,stress_field,pressure', 'doc': 'secop meanings link lists MANDATORY (string)'}, 'sampleenvname': {'default': 'sample_environment', 'doc': 'sample environment group name (string)'}, 'samplename': {'default': 'sample', 'doc': 'sample group name (string)'}}, 'singlesecop': {'host': {'default': None, 'doc': 'secop host name (string)'}, 'message': {'default': None, 'doc': 'secop command MANDATORY (string)'}, 'port': {'default': '5000', 'doc': 'secop port name (string)'}, 'timeout': {'default': '0.0001', 'doc': 'secop timeout (string)'}}, 'slit': {'bottom': {'default': None, 'doc': 'bottom blade position (datasource)'}, 'bottomclosed': {'default': None, 'doc': 'bottom blade closed position (datasource)'}, 'dependstop': {'default': None, 'doc': 'the first transformation, e.g. distance (string)'}, 'distance': {'default': None, 'doc': 'distance for the sample in m, e.g. 0 (string)'}, 'distancename': {'default': 'distance', 'doc': 'distance name for the sample in m, e.g. 0 (string)'}, 'distanceoffset': {'default': None, 'doc': '3-vector distance offset in m, e.g. sample-source offset if the distance is taken from the source (string)'}, 'left': {'default': None, 'doc': 'left blade position (datasource)'}, 'leftclosed': {'default': None, 'doc': 'left blade closed position (datasource)'}, 'right': {'default': None, 'doc': 'right blade position (datasource)'}, 'rightclosed': {'default': None, 'doc': 'right blade closed position (datasource)'}, 'top': {'default': None, 'doc': 'top blade position (datasource)'}, 'topclosed': {'default': None, 'doc': 'top blade closed position (datasource)'}, 'transformations': {'default': None, 'doc': "transformations group name i.e. 'transformations'. If it is  not set it is not created (string)"}, 'xgap': {'default': None, 'doc': 'horizontal gap (datasource)'}, 'xoffdependson': {'default': 'y_offset', 'doc': 'the first transformation, e.g. distance (string)'}, 'xoffset': {'default': None, 'doc': 'horizontal offset (datasource)'}, 'xoffsetcalibration': {'default': None, 'doc': 'horizontal offset calibration (datasource)'}, 'xoffsetcalibrationname': {'default': 'x_offset_calibration', 'doc': 'horizontal offset calibration name (string)'}, 'xoffsetname': {'default': 'x_offset', 'doc': 'horizontal offset name (string)'}, 'ygap': {'default': None, 'doc': 'vertical gap (datasource)'}, 'yoffdependson': {'default': 'distance', 'doc': 'the first transformation, e.g. distance (string)'}, 'yoffset': {'default': None, 'doc': 'vertiacal offset (datasource)'}, 'yoffsetcalibration': {'default': None, 'doc': 'vertiacal offset calibration (datasource)'}, 'yoffsetcalibrationname': {'default': 'y_offset_calibration', 'doc': 'vertiacal offset calibration name (string)'}, 'yoffsetname': {'default': 'y_offset', 'doc': 'vertiacal offset name (string)'}}, 'source': {'beamcurrent': {'default': None, 'doc': 'ring beam current (datasource)'}, 'bunchmode': {'default': 'Multi Bunch', 'doc': 'bunch mode (string)'}, 'numberofbunches': {'default': None, 'doc': 'number of source bunches (datasource)'}, 'sourceenergy': {'default': None, 'doc': 'ring beam energy (datasource)'}, 'srcname': {'default': 'source', 'doc': 'source group name (string)'}}, 'starttime': {}, 'tango': {'attribute': {'default': 'Position', 'doc': 'tango device attribute (string)'}, 'device': {'default': None, 'doc': 'tango device MANDATORY (string)'}}, 'undulator': {'dependstop': {'default': None, 'doc': 'the first transformation, e.g. distance (string)'}, 'distance': {'default': None, 'doc': 'distance from the sample in m, e.g. 0 (string)'}, 'distancename': {'default': 'distance', 'doc': 'distance name from the sample in m, e.g. 0 (string)'}, 'distanceoffset': {'default': None, 'doc': '3-vector distance offset in m, e.g. sample-source offset if the distance is taken from the source (string)'}, 'energy': {'default': None, 'doc': 'undulator energy (datasource)'}, 'gap': {'default': None, 'doc': 'separation between opposing pairs of magnetic pole (datasource)'}, 'gapunits': {'default': 'mm', 'doc': 'gap units (string)'}, 'harmonic': {'default': None, 'doc': 'undulator harmonic (datasource)'}, 'length': {'default': '2', 'doc': 'length of insertion device in meters (string)'}, 'shift': {'default': None, 'doc': 'undulator shift (datasource)'}, 'shiftunits': {'default': 'mm', 'doc': 'shift units (string)'}, 'speed': {'default': None, 'doc': 'undulator speed (datasource)'}, 'speedunits': {'default': '', 'doc': 'speed units (string)'}, 'taper': {'default': None, 'doc': 'gap difference between upstream and downstream ends of the insertion device (datasource)'}, 'taperunits': {'default': 'mm', 'doc': 'gap units (string)'}, 'transformations': {'default': None, 'doc': "transformations group name i.e. 'transformations'. If it is  not set it is not created (string)"}, 'type': {'default': 'undulator', 'doc': 'undulator or wiggler (string)'}, 'uname': {'default': 'insertion_device', 'doc': 'insertion_device group name (string)'}}}ΒΆ

(dict <str , dict <str , str > >) standard component template variables and its [default value, doc string]

nxstools.nxsdevicetools.storeComponent(name, xml, server, mandatory=False)[source]ΒΆ

stores components in Configuration Server

Parameters:
  • name (str) – component name

  • xml (str) – component xml string

  • server (str) – configuration server

  • mandatory (bool) – set component as mandatory

nxstools.nxsdevicetools.storeDataSource(name, xml, server)[source]ΒΆ

stores datasources in Configuration Server

Parameters:
  • name (str) – datasource name

  • xml (str) – datasource xml string

  • server (str) – configuration server

nxstools.nxsdevicetools.twoDModules = ['pilatus100k', 'pilatus300k', 'pilatus1m', 'pilatus2m', 'pilatus6m', 'pco4000', 'perkinelmerdetector', 'lambda', 'pedetector', 'perkinelmer', 'pco', 'pcoedge', 'marccd', 'perkinelmer', 'lcxcamera', 'limaccd', 'eigerpsi', 'eigerdectris']ΒΆ

(list <str>) modules of 2d detectors

nxstools.nxsdevicetools.xmlPackageHandler = <nxstools.nxsdevicetools.PackageHandler object>ΒΆ

(PackageHandler) xml template package handler

nxstools.nxsdevicetools.zeroDModules = ['tip830']ΒΆ

(list <str>) modules of 0D detectors

nxstools.nxsetup moduleΒΆ

Set Up NeXus Tango Servers

class nxstools.nxsetup.AddRecorderPath(parser)[source]ΒΆ

Bases: Runner

add-recorder-path runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'add-recorder-path into MacroServer(s) property'ΒΆ

(str) command description

epilog = ' examples:\n       nxsetup add-recorder-path /usr/share/pyshared/sardananxsrecorder\n       nxsetup add-recorder-path -t /usr/share/pyshared/sardananxsrecorder\n       nxsetup add-recorder-path /usr/share/pyshared/sardananxsrecorder -i haso\n\n'ΒΆ

(str) command epilog

postauto()[source]ΒΆ

creates parser

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxsetup.ChangeProp(parser)[source]ΒΆ

Bases: Runner

change-prop runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'change property value'ΒΆ

(str) command description

epilog = ' examples:\n       nxsetup change-prop -n ClientRecordKeys -t -w "[\\"phoibos_scan_command\\",\\"phoibos_scan_comment\\"]" NXSRecSelector/r228\n       nxsetup change-prop -n DefaultPreselectedComponents -w "[\\"pinhole1\\",\\"slit2\\"]" NXSRecSelector/r228\n       nxsetup change-prop -n StartDsPath -w "[\\"/usr/bin\\",\\"/usr/lib/tango\\"]" Starter\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxsetup.MoveProp(parser)[source]ΒΆ

Bases: Runner

move-prop runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'change property name'ΒΆ

(str) command description

epilog = ' examples:\n       nxsetup move-prop -n DefaultPreselectedComponents -o DefaultAutomaticComponents NXSRecSelector\n       nxsetup move-prop -t -n DefaultPreselectedComponents  -o DefaultAutomaticComponents NXSRecSelector\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxsetup.Restart(parser)[source]ΒΆ

Bases: Runner

restart runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'restart tango server'ΒΆ

(str) command description

epilog = ' examples:\n       nxsetup restart Pool/haso228 -l 2\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxsetup.Set(parser)[source]ΒΆ

Bases: Runner

set runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'set up NXSConfigServer NXSDataWriter and NXSRecSelector servers'ΒΆ

(str) command description

epilog = ' examples:\n       nxsetup set\n       nxsetup set -b p09 -m haso228 -u p09user -d nxsconfig NXSConfigServer\n       nxsetup set NexusWriter/haso228  -k NexusWriter  -y \'{"p00/bliss_nexuswriter/test_session":{"session":"test_session","beacon_host":"haso228:25000"}}\'  -t\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxsetup.SetUp[source]ΒΆ

Bases: object

setup NXSDataWriter, NXSConfigServer and NXSRecSelector Tango servers

constructor

changePropertyName(server, oldname, newname, sclass=None)[source]ΒΆ

changes property name

Parameters:
  • server (str) – server name

  • oldname (str) – old property name

  • newname (str) – new property name

  • sclass (str) – server class name

Returns:

True if property name was changed

Return type:

bool

changePropertyValue(server, newname, newvalue, sclass=None)[source]ΒΆ

changes/sets property value

Parameters:
  • server (str) – server name

  • newvalue (str) – new property value

  • newname (str) – new property name

  • sclass (str) – server class name

Returns:

True if property name was changed

Return type:

bool

changeRecorderPath(path, instance=None)[source]ΒΆ

adds a new recorder path

Parameters:
  • path (str) – new recorder path

  • instance (str) – MacroServer instance name

Returns:

True if record path was added

Return type:

bool

createConfigServer(beamline, masterhost, jsonsettings=None, hostname=None, postpone=False)[source]ΒΆ

creates configuration server

Parameters:
  • beamline (str) – beamline name

  • masterhost (str) – master host of data writer

  • jsonsettings (str) – connection settings to DB in json

  • hostname (str) – host to run the config server

  • postpone (bool) – postpone starting flag

Returns:

True if server was created

Return type:

bool

createDataWriter(beamline, masterhost, postpone=False)[source]ΒΆ

creates data writer

Parameters:
  • beamline (str) – beamline name

  • masterhost (str) – master host of data writer

  • postpone (bool) – postpone starting flag

Returns:

True if server was created

Return type:

bool

createSelector(beamline, masterhost, writer=None, cserver=None, postpone=False)[source]ΒΆ

creates selector server

Parameters:
  • beamline (str) – beamline name

  • masterhost (str) – master host of data writer

  • writer (str) – writer device name

  • cserver (str) – configuration server device name

  • postpone (bool) – postpone starting flag

Returns:

True if server was created

Return type:

bool

createServer(server_name, beamline, masterhost, hostname=None, class_name=None, jsondeviceproperties=None, postpone=False)[source]ΒΆ

creates tango server in DB

Parameters:
  • server_name (str) – server name

  • beamline (str) – beamline name

  • masterhost (str) – master host of data writer

  • hostname (str) – host to run the config server

  • class_name – class name

  • jsondeviceproperties (str) – json device properties

  • postpone (bool) – postpone starting flag

Returns:

True if server was created

Return type:

bool

cserver_nameΒΆ

(str) NeXus config server device name

dbΒΆ

(tango.Database) tango database server

getStarterName(host)[source]ΒΆ

restarts server

Parameters:

host (str) – server host name

Returns:

starter device name

Return type:

str

killServer(server)[source]ΒΆ
restartServer(name, host=None, level=None, restart=True, stopstart=True, wait=True, timeout=None)[source]ΒΆ

restarts server

Parameters:
  • name (str) – server name

  • host (str) – server host name

  • level (int) – start up level

  • restart (bool) – if server should be restarted

  • stopstart (bool) – if server should be stopped and started

  • wait (bool) – script should wait for the server

  • timeout (float) – timeout for start

stopServer(name, host=None)[source]ΒΆ

restarts server

Parameters:
  • name (str) – server name

  • host (str) – server host name

waitServerNotRunning(server=None, device=None, adminproxy=None, maxcnt=10000, verbose=True, waitforproc=True)[source]ΒΆ

wait until device is exported and server is running

Parameters:
  • server (str) – server name, check if running when not None

  • device (str) – device name, check if exported when not None

  • adminproxy (tango.DeviceProxy) – Starter device proxy

  • maxcnt (int) – maximal waiting time in 10ms

  • verbose (bool) – verbose mode

  • waitforproc – wait for process list update

Returns:

True if server is running

Return type:

bool

waitServerRunning(server=None, device=None, adminproxy=None, maxcnt=10000, verbose=True, waitforproc=True)[source]ΒΆ

wait until device is exported and server is running

Parameters:
  • server (str) – server name, check if running when not None

  • device (str) – device name, check if exported when not None

  • adminproxy (tango.DeviceProxy) – Starter device proxy

  • maxcnt (int) – maximal waiting time in 10ms

  • verbose (bool) – verbose mode

  • waitforproc – wait for process list update

Returns:

True if server is running

Return type:

bool

writer_nameΒΆ

(str) NeXus writer device name

class nxstools.nxsetup.Start(parser)[source]ΒΆ

Bases: Runner

start runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'start tango server'ΒΆ

(str) command description

epilog = ' examples:\n       nxsetup start Pool/haso228 -l 2\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxsetup.Stop(parser)[source]ΒΆ

Bases: Runner

Stop runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'stop tango server'ΒΆ

(str) command description

epilog = ' examples:\n       nxsetup stop Pool/haso228 \n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxsetup.Wait(parser)[source]ΒΆ

Bases: Runner

start runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'wait for tango server'ΒΆ

(str) command description

epilog = ' examples:\n       nxsetup wait Pool/haso228 -z 30\n\n'ΒΆ

(str) command epilog

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

nxstools.nxsetup.knownHosts = {'cfeld-pcx27083': {'beamline': 'cfeld', 'dbname': 'nxsconfig', 'masterhost': 'cfeld-pcx27083', 'user': 'ritzkowf'}, 'has6117b': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'has6117b', 'user': 'p02user'}, 'hascmexp': {'beamline': 'cmexp', 'dbname': 'nxsconfig', 'masterhost': 'hascmexp', 'user': 'cmexp'}, 'hasdelay': {'beamline': 'delay', 'dbname': 'nxsconfig', 'masterhost': 'hasdelay', 'user': 'delayusr'}, 'hasdelay2': {'beamline': 'delsauto', 'dbname': 'nxsconfig', 'masterhost': 'hasdelay2', 'user': 'delayusr'}, 'hasep211eh': {'beamline': 'p211', 'dbname': 'nxsconfig', 'masterhost': 'hasep211eh', 'user': 'p211user'}, 'hasep212lab': {'beamline': 'p21', 'dbname': 'nxsconfig', 'masterhost': 'hasep212lab', 'user': 'p212user'}, 'hasep212oh': {'beamline': 'p21', 'dbname': 'nxsconfig', 'masterhost': 'hasep212oh', 'user': 'p212user'}, 'hasep22ch1': {'beamline': 'p22', 'dbname': 'nxsconfig', 'masterhost': 'hasep22ch1', 'user': 'p22user'}, 'hasep22ch2': {'beamline': 'p22', 'dbname': 'nxsconfig', 'masterhost': 'hasep22ch2', 'user': 'p22user'}, 'hasep22oh': {'beamline': 'p22', 'dbname': 'nxsconfig', 'masterhost': 'hasep22oh', 'user': 'p22user'}, 'hasep23ch': {'beamline': 'p23', 'dbname': 'nxsconfig', 'masterhost': 'hasep23ch', 'user': 'p23user'}, 'hasep23dev': {'beamline': 'p23', 'dbname': 'nxsconfig', 'masterhost': 'hasep23dev', 'user': 'p23user'}, 'hasep23eh': {'beamline': 'p23', 'dbname': 'nxsconfig', 'masterhost': 'hasep23eh', 'user': 'p23user'}, 'hasep24': {'beamline': 'p24', 'dbname': 'nxsconfig', 'masterhost': 'hasep24', 'user': 'p24user'}, 'hasep24eh1': {'beamline': 'p24', 'dbname': 'nxsconfig', 'masterhost': 'hasep24eh1', 'user': 'p24user'}, 'hasfmirr': {'beamline': 'flash', 'dbname': 'nxsconfig', 'masterhost': 'hasfmirr', 'user': 'musixusr'}, 'hasfpgm1': {'beamline': 'flash', 'dbname': 'nxsconfig', 'masterhost': 'hasfpgm1', 'user': 'vuvfuser'}, 'hasfvls': {'beamline': 'flash', 'dbname': 'nxsconfig', 'masterhost': 'hasfvls', 'user': 'vuvfuser'}, 'haskmusixtng': {'beamline': 'flash', 'dbname': 'nxsconfig', 'masterhost': 'haskmusixtng', 'user': 'vuvfuser'}, 'hasmfmc': {'beamline': 'fmc', 'dbname': 'nxsconfig', 'masterhost': 'hasmfmc', 'user': 'delayusr'}, 'hasmlqj': {'beamline': 'lqj', 'dbname': 'nxsconfig', 'masterhost': 'hasmlqj', 'user': 'lqjuser'}, 'hasmrixs': {'beamline': 'rix', 'dbname': 'nxsconfig', 'masterhost': 'hasmrixs', 'user': 'rixuser'}, 'hasnp61ch1': {'beamline': 'p61', 'dbname': 'nxsconfig', 'masterhost': 'hasnp61ch1', 'user': 'p61user'}, 'hasnp64': {'beamline': 'p64', 'dbname': 'nxsconfig', 'masterhost': 'hasnp64', 'user': 'p64user'}, 'hasnp64oh': {'beamline': 'p64', 'dbname': 'nxsconfig', 'masterhost': 'hasnp64oh', 'user': 'p64user'}, 'hasnp65': {'beamline': 'p65', 'dbname': 'nxsconfig', 'masterhost': 'hasnp65', 'user': 'p65user'}, 'hasnp66': {'beamline': 'p66', 'dbname': 'nxsconfig', 'masterhost': 'hasnp66', 'user': 'p66user'}, 'haso107d1': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haso107d1', 'user': 'kracht'}, 'haso107klx': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haso107klx', 'user': 'kracht'}, 'haso107tk': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haso107tk', 'user': 'kracht'}, 'haso111n': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haso111n', 'user': 'tnunez'}, 'haso111o': {'beamline': 'p09'}, 'haso111tb': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haso111tb', 'user': 'tnunez'}, 'haso113b': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haso113b', 'user': 'blume'}, 'haso113u': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haso113u', 'user': 'kracht'}, 'haso204n': {'beamline': 'p23', 'dbname': 'nxsconfig', 'masterhost': 'haso204n', 'user': 'p23user'}, 'haso213p': {'beamline': 'p22', 'dbname': 'nxsconfig', 'masterhost': 'haso213p', 'user': 'spiec'}, 'haso224w': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haso224w', 'user': 'p021user'}, 'haso228jk': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haso228jk', 'user': 'jkotan'}, 'haso232s': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haspp232s', 'user': 'p02user'}, 'hasodlsauto': {'beamline': 'dlsauto', 'dbname': 'nxsconfig', 'masterhost': 'hasodlsauto', 'user': 'dlsuser'}, 'hasp029rack': {'beamline': 'p06', 'dbname': 'nxsconfig', 'masterhost': 'hasp029rack', 'user': 'p06user'}, 'hasp068xlab': {'beamline': 'p06', 'dbname': 'nxsconfig', 'masterhost': 'hasp068xlab', 'user': 'p06user'}, 'haspecsicl4': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haspecsicl4', 'user': 'lacluser'}, 'haspllabcl1': {'beamline': 'llab', 'dbname': 'nxsconfig', 'masterhost': 'haspllabcl1', 'user': 'lacluser'}, 'haspp01eh1': {'beamline': 'p01', 'dbname': 'nxsconfig', 'masterhost': 'haspp01eh1', 'user': 'p01user'}, 'haspp01eh2': {'beamline': 'p01', 'dbname': 'nxsconfig', 'masterhost': 'haspp01eh2', 'user': 'p01user'}, 'haspp01eh3': {'beamline': 'p01', 'dbname': 'nxsconfig', 'masterhost': 'haspp01eh3', 'user': 'p01user'}, 'haspp021ch1': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haspp021ch1', 'user': 'p021user'}, 'haspp021ch1a': {'beamline': 'p021', 'dbname': 'nxsconfig', 'masterhost': 'haspp021ch1a', 'user': 'p021user'}, 'haspp021jenkins': {'beamline': 'p021', 'dbname': 'nxsconfig', 'masterhost': 'haspp021jenkins', 'user': 'p021user'}, 'haspp022ch': {'beamline': 'p022', 'dbname': 'nxsconfig', 'masterhost': 'haspp022ch', 'user': 'p022user'}, 'haspp022chms': {'beamline': 'p022', 'dbname': 'nxsconfig', 'masterhost': 'haspp022chms', 'user': 'p022user'}, 'haspp02ch1': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haspp02ch1', 'user': 'p02user'}, 'haspp02ch1a': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haspp02ch1a', 'user': 'p02user'}, 'haspp02ch2': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haspp02ch2', 'user': 'p02user'}, 'haspp02lakl': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haspp02lakl', 'user': 'p02user'}, 'haspp02oh1': {'beamline': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haspp02oh1', 'user': 'p02user'}, 'haspp03': {'beamline': 'p03', 'dbname': 'nxsconfig', 'masterhost': 'haspp03', 'user': 'p03user'}, 'haspp03nano': {'beamline': 'p03nano', 'dbname': 'nxsconfig', 'masterhost': 'haspp03nano', 'user': 'p03nano'}, 'haspp04exp1': {'beamline': 'p04', 'dbname': 'nxsconfig', 'masterhost': 'haspp04exp1', 'user': 'p04user'}, 'haspp04exp2': {'beamline': 'p04', 'dbname': 'nxsconfig', 'masterhost': 'haspp04exp2', 'user': 'p04user'}, 'haspp06ctrl': {'beamline': 'p06', 'dbname': 'nxsconfig', 'masterhost': 'haspp06ctrl', 'user': 'p06user'}, 'haspp06mc01': {'beamline': 'p06', 'dbname': 'nxsconfig', 'masterhost': 'haspp06mc01', 'user': 'p06user'}, 'haspp06nc1': {'beamline': 'p06', 'dbname': 'nxsconfig', 'masterhost': 'haspp06nc1', 'user': 'p06user'}, 'haspp07eh2': {'beamline': 'p07', 'dbname': 'nxsconfig', 'masterhost': 'haspp07eh2', 'user': 'p07user'}, 'haspp08': {'beamline': 'p08', 'dbname': 'nxsconfig', 'masterhost': 'haspp08', 'user': 'p08user'}, 'haspp08lisa2': {'beamline': 'p08', 'dbname': 'nxsconfig', 'masterhost': 'haspp08lisa2', 'user': 'p08user'}, 'haspp09': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haspp09', 'user': 'p09user'}, 'haspp09dif': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haspp09dif', 'user': 'p09user'}, 'haspp09haxps': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haspp09maxps', 'user': 'p09haxps'}, 'haspp09mag': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'haspp09mag', 'user': 'p09user'}, 'haspp10e1': {'beamline': 'p10', 'dbname': 'nxsconfig', 'masterhost': 'haspp10e1', 'user': 'p10user'}, 'haspp10e2': {'beamline': 'p10', 'dbname': 'nxsconfig', 'masterhost': 'haspp10e2', 'user': 'p10user'}, 'haspp10lab': {'beamline': 'p10', 'dbname': 'nxsconfig', 'masterhost': 'haspp10lab', 'user': 'p10user'}, 'haspp10lcx': {'beamline': 'p10', 'dbname': 'nxsconfig', 'masterhost': 'haspp10lcx', 'user': 'p10user'}, 'haspp11oh': {'beamline': 'p11', 'dbname': 'nxsconfig', 'masterhost': 'haspp11oh', 'user': 'p11user'}, 'haspp11sardana': {'beamline': 'p11', 'dbname': 'nxsconfig', 'masterhost': 'haspp11sardana', 'user': 'p11user'}, 'haspp11user02': {'beamline': 'p11', 'dbname': 'nxsconfig', 'masterhost': 'haspp11user02', 'user': 'p11user'}, 'haspp212oh': {'beamline': 'p21', 'dbname': 'nxsconfig', 'masterhost': 'hasep212oh', 'user': 'p21user'}, 'haspp21eh2': {'beamline': 'p21', 'dbname': 'nxsconfig', 'masterhost': 'hasep21eh2', 'user': 'p21user'}, 'haspp21eh3': {'beamline': 'p21', 'dbname': 'nxsconfig', 'masterhost': 'hasep21eh3', 'user': 'p21user'}, 'haspp21lab': {'beamline': 'p21', 'dbname': 'nxsconfig', 'masterhost': 'haspp21lab', 'user': 'p21user'}, 'hastodt': {'beamline': 'p09', 'dbname': 'nxsconfig', 'masterhost': 'hastodt', 'user': 'kracht'}, 'hzgpp07eh1': {'beamline': 'p07', 'dbname': 'nxsconfig', 'masterhost': 'hzgpp07eh1', 'user': 'p07user'}, 'hzgpp07eh3': {'beamline': 'p07', 'dbname': 'nxsconfig', 'masterhost': 'hzgpp07eh3', 'user': 'p07user'}, 'hzgpp07eh4': {'beamline': 'p07', 'dbname': 'nxsconfig', 'masterhost': 'hzgpp07eh4', 'user': 'p07user'}}ΒΆ

(dict <dict <str , str > > ) all SardanaHosts and DataBaseHosts should be known

nxstools.nxsetup.main()[source]ΒΆ

the main program function

nxstools.nxsfileinfo moduleΒΆ

Command-line tool for showing meta data from Nexus Files

class nxstools.nxsfileinfo.Attachment(parser)[source]ΒΆ

Bases: Runner

Attachment runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

attachment(root, options)[source]ΒΆ

get metadata from nexus and beamtime file

Parameters:
  • root (filewriter.FTGroup) – nexus file root

  • options (argparse.Namespace) – parser options

Returns:

atttachment metadata

Return type:

str

create()[source]ΒΆ

creates parser

description = 'generate description of attachment'ΒΆ

(str) command description

epilog = " examples:\n       nxsfileinfo attachment -b p00 -i 2342342 -t 'HH water' -o ~/at1.json thumbnail.png \n       nxsfileinfo attachment -b p00 -i 2342342 -t 'HH water' -o ~/at2.json -s pilatus myscan_00123.nxs \n       nxsfileinfo attachment -b p00 -i 2342342 -t 'HH water' -o ~/at2.json  myscan_00124.fio \n\n"ΒΆ

(str) command epilog

postauto()[source]ΒΆ

parser creator after autocomplete run

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

show(root, options)[source]ΒΆ

the main function

Parameters:
  • options (argparse.Namespace) – parser options

  • root (filewriter.FTGroup) – nexus file root

class nxstools.nxsfileinfo.BeamtimeLoader(options)[source]ΒΆ

Bases: object

loader constructor

Parameters:

options (argparse.Namespace) – parser options

append_copymap_field(metadata, cmap, clist, cmapfield=None)[source]ΒΆ

overwrite metadata with dictionary

Parameters:
  • metadata (dict <str, any>) – metadata dictionary to merge in

  • cmap (dict <str, str>) – overwrite dictionary

  • clist (list < [str, str] >) – copy list to overwrite metadata

  • cmapfield (str) – copy map nexus field

Returns:

metadata dictionary

Return type:

dict <str, any>

btmdmap = {}ΒΆ
copylist = [['creationTime', 'endTime']]ΒΆ
copymap = {'description': 'scientificMetadata.title.value', 'endTime': 'scientificMetadata.end_time.value', 'scientificMetadata.ScanCommand': 'scientificMetadata.program_name.scan_command'}ΒΆ
cre = {'accessGroups': [], 'classification': [], 'createdAt': [], 'createdBy': [], 'creationTime': [], 'dataFormat': [], 'datasetName': [], 'datasetlifecycle': [], 'history': [], 'instrumentId': [], 'isPublished': ['false'], 'keywords': [], 'license': [], 'numberOfFiles': [], 'numberOfFilesArchived': [], 'orcidOfOwner': 'ORCID of owner https://orcid.org if available', 'ownerGroup': [], 'packedSize': [], 'publisheddataId': [], 'sampleId': [], 'scientificMetadata': {}, 'size': [], 'sourceFolderHost': [], 'techniques': [], 'updatedAt': [], 'updatedBy': [], 'validationStatus': [], 'version': []}ΒΆ
dr = {'applicant.*': [], 'beamlineAlias': [], 'eventStart': [], 'leader': [], 'onlineAnalysis': [], 'pi.*': [], 'proposalType': [], 'users': []}ΒΆ
facilityalias = {'PETRA III': 'petra3', 'PETRA IV': 'petra4'}ΒΆ
generate_techniques(techniques, techniques_pids=None)[source]ΒΆ

generate technique dictionary

Parameters:
  • techniques (list <str>) – a list of techniques splitted by comma

  • techniques_pids (list <str>) – a list of technique pids splitted by comma

Returns:

technique dictionary

Return type:

dict <str, objstr>

merge(metadata)[source]ΒΆ

update metadata with dictionary

Parameters:

metadata (dict <str, any>) – metadata dictionary to merge in

Returns:

metadata dictionary

Return type:

dict <str, any>

merge_copy_lists(clist)[source]ΒΆ

merge copy lists

Parameters:

clist – overwrite copy list

Returns:

metadata dictionary

Return type:

list < [str, str] >

merge_copy_maps(cmap)[source]ΒΆ

merge copy maps

Parameters:

cmap (dict <str, str>) – overwrite dictionary

Returns:

metadata dictionary

Return type:

dict <str, any>

newbtmdmap = {'contactEmail': ['pi.email', 'applicant.email'], 'description': ['title'], 'endTime': ['eventEnd'], 'owner': ['leader.lastname', 'applicant.lastname'], 'ownerEmail': ['leader.email', 'applicant.email'], 'principalInvestigator': ['applicant.email'], 'sourceFolder': ['corePath']}ΒΆ
oldbtmdmap = {'createdAt': ['generated'], 'updatedAt': ['generated']}ΒΆ
overwrite(metadata, cmap=None, clist=None, cmapfield=None)[source]ΒΆ

overwrite metadata with dictionary

Parameters:
  • metadata (dict <str, any>) – metadata dictionary to merge in

  • cmap (dict <str, str>) – copy map to overwrite dictionary

  • clist (list < [str, str] >) – copy list to overwrite metadata

  • cmapfield (str) – copy map nexus field

Returns:

metadata dictionary

Return type:

dict <str, any>

remove_metadata(metadata, cmap=None, clist=None, cmapfield=None)[source]ΒΆ
remove metadata with dictionary with empty input or output

in the copy map

Parameters:
  • metadata (dict <str, any>) – metadata dictionary to merge in

  • cmap (dict <str, str>) – overwrite dictionary

  • clist (list < [str, str] >) – copy list to overwrite metadata

  • cmapfield (str) – copy map nexus field

Returns:

metadata dictionary

Return type:

dict <str, any>

run()[source]ΒΆ

runner for DESY beamtime file parser

Parameters:

options (argparse.Namespace) – parser options

Returns:

metadata dictionary

Return type:

dict <str, any>

strcre = {'accessGroups': ['{beamtimeId}-dmgt', '{beamtimeId}-clbt', '{beamtimeId}-part', '{beamline}dmgt', '{beamline}staff'], 'creationLocation': '/DESY/{facility}/{beamlineAlias}', 'instrumentId': '/{facility}/{beamline}', 'isPublished': False, 'keywords': ['scan'], 'ownerGroup': '{beamtimeId}-dmgt', 'proposalId': '{proposalId}.{beamtimeId}', 'type': 'raw'}ΒΆ
update_instrumentid(metadata)[source]ΒΆ

update instrument id

Parameters:

metadata (dict <str, any>) – metadata dictionary to merge in

Returns:

metadata dictionary

Return type:

dict <str, any>

update_pid(metadata, filename=None, puuid=False, pfname=False, beamtimeid=None)[source]ΒΆ

update pid metadata with dictionary

Parameters:
  • metadata (dict <str, any>) – metadata dictionary to merge in

  • filename (str) – nexus filename

  • puuid (bool) – pid with uuid

  • pfname (bool) – pid with file name

Returns:

metadata dictionary

Return type:

dict <str, any>

update_sampleid(metadata, sampleid=None, sidfromname=False)[source]ΒΆ

update sampleid

Parameters:
  • metadata (dict <str, any>) – metadata dictionary to merge in

  • sampleid (str) – sample id

  • sidfromname (bool) – sample id from its name

Returns:

metadata dictionary

Return type:

dict <str, any>

update_techniques(metadata, techniques=None)[source]ΒΆ

update techniques

Parameters:
  • metadata (dict <str, any>) – metadata dictionary to merge in

  • techniques (str) – a list of techniques splitted by comma

Returns:

metadata dictionary

Return type:

dict <str, any>

class nxstools.nxsfileinfo.Field(parser)[source]ΒΆ

Bases: Runner

Field runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'show field information for the nexus file'ΒΆ

(str) command description

epilog = ' examples:\n       nxsfileinfo field /user/data/myfile.nxs\n       nxsfileinfo field /user/data/myfile.nxs -g\n       nxsfileinfo field /user/data/myfile.nxs -s\n\n'ΒΆ

(str) command epilog

postauto()[source]ΒΆ

parser creator after autocomplete run

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

show(root, options)[source]ΒΆ

the main function

Parameters:
  • options (argparse.Namespace) – parser options

  • root (class:filewriter.FTGroup) – nexus file root

class nxstools.nxsfileinfo.General(parser)[source]ΒΆ

Bases: Runner

General runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'show general information for the nexus file'ΒΆ

(str) command description

epilog = ' examples:\n       nxsfileinfo general /user/data/myfile.nxs\n\n'ΒΆ

(str) command epilog

classmethod parseentry(entry, description)[source]ΒΆ

parse entry of nexus file

Parameters:
  • entry (filewriter.FTGroup) – nexus entry node

  • description (list <dict <str, any > >) – dict description list

Returns:

(key, value) name pair of table headers

Return type:

[str, str]

postauto()[source]ΒΆ

parser creator after autocomplete run

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

show(root)[source]ΒΆ

show general informations

Parameters:

root (class:filewriter.FTGroup) – nexus file root

class nxstools.nxsfileinfo.GroupMetadata(parser)[source]ΒΆ

Bases: Runner

Group Metadata runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'group scan metadata information'ΒΆ

(str) command description

dicttype = ['Dict', 'D', 'd', 'dict']ΒΆ
endpointstype = ['Endpoints', 'endpoints', 'E', 'e']ΒΆ
epilog = ' examples:\n       nxsfileinfo groupmetadata -o /user/data/myscan.scan.json  -t /user/data/myscan.attachment.json  -l /user/data/myscan.origdatablock.json  -c /home/user/group_config.txt  -m /user/data/myscan_00023.scan.json  -d /user/data/myscan_00023.origdatablock.json  -a /user/data/myscan_00023.attachment.json \n \n       nxsfileinfo groupmetadata myscan_m001  -m /user/data/myscan_00021.scan.json\n  -c /home/user/group_config.txt  \n \n       nxsfileinfo groupmetadata  myscan_m001  -c /home/user/group_config.txt  -m /user/data/myscan_00023.scan.json  -d /user/data/myscan_00023.origdatablock.json  -a /user/data/myscan_00023.attachment.json  \n \n       nxsfileinfo groupmetadata  -m /user/data/myscan_00023.scan.json  -d /user/data/myscan_00023.origdatablock.json  -c /home/user/group_config.txt  \n\n'ΒΆ

(str) command epilog

firstlasttype = ['FirstLast', 'firstlast']ΒΆ
firsttype = ['First', 'first', 'f', 'F']ΒΆ
classmethod groupmetadata(options)[source]ΒΆ

group scan metadata

Parameters:

options (argparse.Namespace) – parser options

Returns:

[grouped metadata, grouped origdatablocks, grouped attachments]

Return type:

[str,:obj:str, str]

lasttype = ['Last', 'last', 'l', 'L']ΒΆ
listtype = ['List', 'L', 'l', 'list']ΒΆ
maxtype = ['Max', 'max']ΒΆ
minmaxtype = ['MinMax', 'M', 'm', 'minmax']ΒΆ
mintype = ['Min', 'min']ΒΆ
postauto()[source]ΒΆ

parser creator after autocomplete run

rangetype = ['Range', 'R', 'r', 'rangle']ΒΆ
run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

show(options)[source]ΒΆ

the main function

Parameters:

options (argparse.Namespace) – parser options

singlelisttype = ['SingleList', 'S', 's', 'singlelist']ΒΆ
uniquelisttype = ['UniqueList', 'U', 'u', 'uniquelist']ΒΆ
class nxstools.nxsfileinfo.Instrument(parser)[source]ΒΆ

Bases: Runner

Instrument runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'generate description of instrument'ΒΆ

(str) command description

epilog = ' examples:\n       nxsfileinfo instrument -p /petra3/p00 -n P00 -m ~/cm.json \n\n'ΒΆ

(str) command epilog

instrument(options)[source]ΒΆ

create instrument metadata

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

postauto()[source]ΒΆ

parser creator after autocomplete run

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

show(options)[source]ΒΆ

the main function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxsfileinfo.Metadata(parser)[source]ΒΆ

Bases: Runner

Metadata runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'show metadata information for the nexus file'ΒΆ

(str) command description

epilog = " examples:\n       nxsfileinfo metadata /user/data/myfile.nxs\n       nxsfileinfo metadata /user/data/myfile.fio\n       nxsfileinfo metadata /user/data/myfile.nxs -p 'Group'\n       nxsfileinfo metadata /user/data/myfile.nxs -s\n       nxsfileinfo metadata /user/data/myfile.nxs -a units,NX_class\n\n"ΒΆ

(str) command epilog

classmethod metadata(root, options)[source]ΒΆ

get metadata from nexus and beamtime file

Parameters:
  • root (filewriter.FTGroup) – nexus file root

  • options (argparse.Namespace) – parser options

Returns:

nexus file root metadata

Return type:

str

postauto()[source]ΒΆ

parser creator after autocomplete run

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

show(root, options)[source]ΒΆ

the main function

Parameters:
  • options (argparse.Namespace) – parser options

  • root (filewriter.FTGroup) – nexus file root

class nxstools.nxsfileinfo.OrigDatablock(parser)[source]ΒΆ

Bases: Runner

OrigDatablock runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

datablock(options)[source]ΒΆ

dump scan datablock JSON

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

datafiles(scanpath, scdir, scfiles, relpath, filters=None)[source]ΒΆ
description = 'generate description of all scan files'ΒΆ

(str) command description

epilog = ' examples:\n       nxsfileinfo origdatablock /user/data/scan_12345\n\n'ΒΆ

(str) command epilog

filterout(fpath, filters)[source]ΒΆ
isotime(tme)[source]ΒΆ

returns iso time string

Returns:

iso time

Return type:

str

postauto()[source]ΒΆ

parser creator after autocomplete run

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

show(options)[source]ΒΆ

the main function

Parameters:

options (argparse.Namespace) – parser options

class nxstools.nxsfileinfo.Sample(parser)[source]ΒΆ

Bases: Runner

Sample runner

parser creator

Parameters:

parser (NXSFileInfoArgParser) – option parser

create()[source]ΒΆ

creates parser

description = 'generate description of sample'ΒΆ

(str) command description

epilog = " examples:\n       nxsfileinfo sample -i petra3/h2o/234234 -d 'HH water' -s ~/cm.json \n\n"ΒΆ

(str) command epilog

postauto()[source]ΒΆ

parser creator after autocomplete run

run(options)[source]ΒΆ

the main program function

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

sample(options)[source]ΒΆ

create sample metadata

Parameters:

options (argparse.Namespace) – parser options

Returns:

output information

Return type:

str

show(options)[source]ΒΆ

the main function

Parameters:

options (argparse.Namespace) – parser options

nxstools.nxsfileinfo.getlist(text)[source]ΒΆ
converts a text string to a list of lists

with respect to newline and space characters

Parameters:

text (str) – parser options

Returns:

a list of list

Return type:

list < list`<:obj:`str> >

nxstools.nxsfileinfo.main()[source]ΒΆ

the main program function

nxstools.nxsfileinfo.splittext(text, lmax=68)[source]ΒΆ

split text to lines

Parameters:
  • text (str) – parser options

  • lmax (int) – maximal line length

Returns:

split text

Return type:

str

nxstools.nxsfileparser moduleΒΆ

NeXus main metadata viewer

class nxstools.nxsfileparser.FIOFileParser(root)[source]ΒΆ

Bases: object

Metadata parser for FIO files

constructor

Parameters:

root (str) – fio file content

columnsΒΆ

(dict <str, any>) columns dictionary

group_postfixΒΆ

(str) group postfix

parseMeta()[source]ΒΆ

parses the file and creates the filtered description list

class nxstools.nxsfileparser.NXSFileParser(root)[source]ΒΆ

Bases: object

Metadata parser for NeXus files

constructor

Parameters:

root (filewriter.FTGroup) – nexus root node

emptyunitsΒΆ

(bool) add empty units

filtersΒΆ

(list`< :obj:`str>) filters for full_path names

classmethod getpath(path)[source]ΒΆ

converts full_path with NX_classes into nexus_path

Parameters:

path (str) – nexus full_path

group_postfixΒΆ

(str) group postfix

parse()[source]ΒΆ

parses the file and creates the filtered description list

parseMeta()[source]ΒΆ

parses the file and creates the filtered description list

scientificΒΆ

(bool) store NXentries as scientificMetadata

valuestostoreΒΆ

(list`< :obj:`str>) field names which value should be stored

nxstools.nxsfileparser.getdsname(xmlstring)[source]ΒΆ

provides datasource name from datasource xml string

Parameters:

xmlstring (str) – datasource xml string

nxstools.nxsfileparser.getdssource(xmlstring)[source]ΒΆ

provides source from datasource xml string

Parameters:

xmlstring (str) – datasource xml string

nxstools.nxsfileparser.getdstype(xmlstring)[source]ΒΆ

provides datasource type from datasource xml string

Parameters:

xmlstring (str) – datasource xml string

nxstools.nxsfileparser.infNaN2None(obj)[source]ΒΆ

replace inf and NaN to None

nxstools.nxsfileparser.isoDate(text)[source]ΒΆ

convert date to iso format

Parameters:

text (str) – date text to convert

Returns:

date in iso format

Return type:

str

class nxstools.nxsfileparser.numpyEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]ΒΆ

Bases: JSONEncoder

numpy json encoder with list

Constructor for JSONEncoder, with sensible defaults.

If skipkeys is false, then it is a TypeError to attempt encoding of keys that are not str, int, float or None. If skipkeys is True, such items are simply skipped.

If ensure_ascii is true, the output is guaranteed to be str objects with all incoming non-ASCII characters escaped. If ensure_ascii is false, the output can contain non-ASCII characters.

If check_circular is true, then lists, dicts, and custom encoded objects will be checked for circular references during encoding to prevent an infinite recursion (which would cause an RecursionError). Otherwise, no such check takes place.

If allow_nan is true, then NaN, Infinity, and -Infinity will be encoded as such. This behavior is not JSON specification compliant, but is consistent with most JavaScript based encoders and decoders. Otherwise, it will be a ValueError to encode such floats.

If sort_keys is true, then the output of dictionaries will be sorted by key; this is useful for regression tests to ensure that JSON serializations can be compared on a day-to-day basis.

If indent is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines. None is the most compact representation.

If specified, separators should be an (item_separator, key_separator) tuple. The default is (’, β€˜, β€˜: β€˜) if indent is None and (β€˜,’, β€˜: β€˜) otherwise. To get the most compact JSON representation, you should specify (β€˜,’, β€˜:’) to eliminate whitespace.

If specified, default is a function that gets called for objects that can’t otherwise be serialized. It should return a JSON encodable version of the object or raise a TypeError.

default(obj)[source]ΒΆ

default encoder

Parameters:

obj (object or any) – numpy array object

class nxstools.nxsfileparser.numpyEncoderNull(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]ΒΆ

Bases: numpyEncoder

numpy json encoder with list with nan/inf to null

Constructor for JSONEncoder, with sensible defaults.

If skipkeys is false, then it is a TypeError to attempt encoding of keys that are not str, int, float or None. If skipkeys is True, such items are simply skipped.

If ensure_ascii is true, the output is guaranteed to be str objects with all incoming non-ASCII characters escaped. If ensure_ascii is false, the output can contain non-ASCII characters.

If check_circular is true, then lists, dicts, and custom encoded objects will be checked for circular references during encoding to prevent an infinite recursion (which would cause an RecursionError). Otherwise, no such check takes place.

If allow_nan is true, then NaN, Infinity, and -Infinity will be encoded as such. This behavior is not JSON specification compliant, but is consistent with most JavaScript based encoders and decoders. Otherwise, it will be a ValueError to encode such floats.

If sort_keys is true, then the output of dictionaries will be sorted by key; this is useful for regression tests to ensure that JSON serializations can be compared on a day-to-day basis.

If indent is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines. None is the most compact representation.

If specified, separators should be an (item_separator, key_separator) tuple. The default is (’, β€˜, β€˜: β€˜) if indent is None and (β€˜,’, β€˜: β€˜) otherwise. To get the most compact JSON representation, you should specify (β€˜,’, β€˜:’) to eliminate whitespace.

If specified, default is a function that gets called for objects that can’t otherwise be serialized. It should return a JSON encodable version of the object or raise a TypeError.

encode(obj, *args, **kwargs)[source]ΒΆ

Return a JSON string representation of a Python data structure.

>>> from json.encoder import JSONEncoder
>>> JSONEncoder().encode({"foo": ["bar", "baz"]})
'{"foo": ["bar", "baz"]}'

nxstools.nxsparser moduleΒΆ

Command-line tool for ascess to the nexdatas configuration server

class nxstools.nxsparser.ESRFConverter[source]ΒΆ

Bases: object

ESRF xml configuration converter

constructor

convert(text)[source]ΒΆ

converts ESRF xml configuration to nxsdatawriter format

Parameters:

text (str) – input xml string

Returns:

output xml string

Return type:

str

class nxstools.nxsparser.ParserTools[source]ΒΆ

Bases: object

configuration server adapter

classmethod getRecord(node)[source]ΒΆ

fetches record name or query from datasource node

Parameters:

node (lxml.etree.Element) – datasource node

Returns:

record name or query

Return type:

str

classmethod mergeDefinitions(xmls)[source]ΒΆ
merges the xmls list of definitions xml strings

to one output xml string

Parameters:

xmls (list <str>) – a list of xml string with definitions

Returns:

one output xml string

Return type:

str

classmethod parseAttributes(xmlc)[source]ΒΆ

provides datasources and its records from xml string

Parameters:

xmlc (str) – xml string

Returns:

list of datasource descriptions

Return type:

list < dict <str, any> >

classmethod parseDataSources(xmlc)[source]ΒΆ

provides datasources and its records from xml string

Parameters:

xmlc (str) – xml string

Returns:

list of datasource descriptions

Return type:

list <dict <str, str>>

classmethod parseFields(xmlc)[source]ΒΆ

provides datasources and its records from xml string

Parameters:

xmlc (str) – xml string

Returns:

list of datasource descriptions

Return type:

list < dict <str, any> >

provides datasources and its records from xml string

Parameters:

xmlc (str) – xml string

Returns:

list of datasource descriptions

Return type:

list < dict <str, any> >

classmethod parseRecord(xmlc)[source]ΒΆ

provides source record from xml string

Parameters:

xmlc (str) – xml string

Returns:

source record

Return type:

str

class nxstools.nxsparser.TableDictTools(description, nonone=None)[source]ΒΆ

Bases: object

configuration server adapter

constructor

Parameters:
  • description (list <str>) – description list

  • nonone (list <str>) – list of parameters which have to exist to be shown

generateList()[source]ΒΆ

generate row lists of table

Returns:

table rows

Return type:

list <str>

headersΒΆ

(list <str>) headers

titleΒΆ

(str) table title

class nxstools.nxsparser.TableTools(description, nonone=None, headers=None, filters=None)[source]ΒΆ

Bases: object

configuration server adapter

constructor

Parameters:
  • description (list <str>) – description list

  • nonone (list <str>) – list of parameters which have to exist to be shown

  • headers (list <str>) – list of output parameters

  • filters (list <str>) – filters for first column names

filtersΒΆ

(list <str>) filter list

generateList()[source]ΒΆ

generate row lists of table

Returns:

table rows

Return type:

list <str>

headersΒΆ

(list <str>) table headers

loadDescription(description)[source]ΒΆ

loads description

Parameters:

description (list <str>) – description list

titleΒΆ

(str) table title

nxstools.nxsxml moduleΒΆ

Creator of XML configuration files

class nxstools.nxsxml.NAttr(parent, nameAttr, typeAttr='')[source]ΒΆ

Bases: NTag

Attribute tag wrapper

constructor

Parameters:
  • parent (NTag) – parent tag element

  • nameAttr (str) – name attribute

  • typeAttr (str) – type attribute

setStrategy(mode='STEP', trigger=None, value=None, canfail=None)[source]ΒΆ

sets the attribute strategy

Parameters:
  • mode (str) – mode data writing, i.e. INIT, STEP, FINAL, POSTRUN

  • trigger (str) – for asynchronous writting, e.g. with different subentries

  • value (str) – label for postrun mode

  • canfail (bool) – can fail strategy flag

class nxstools.nxsxml.NDSource(parent)[source]ΒΆ

Bases: NTag

Source tag wrapper

constructor

Parameters:

parent (NTag) – parent tag element

addDoc(doc)[source]ΒΆ

adds doc tag content

Parameters:

doc (str) – doc tag content

initClient(name, recordName)[source]ΒΆ

sets paramters for Client data

Parameters:
  • name (str) – name of datasource

  • recordName (str) – name of the data object

initDBase(name, dbtype, query, dbname=None, rank=None, mycnf=None, user=None, passwd=None, dsn=None, mode=None, host=None, port=None)[source]ΒΆ

sets parameters of DataBase

Parameters:
  • name (str) – name of datasource

  • dbname (str) – name of used DataBase

  • query (str) – database query

  • dbtype (str) – type of the database, i.e. MYSQL, PGSQL, ORACLE

  • rank (str) – rank of the query output, i.e. SCALAR, SPECTRUM, IMAGE

  • mycnf (str) – MYSQL config file

  • user (str) – database user name

  • passwd (str) – database user password

  • dsn (str) – DSN string to initialize ORACLE and PGSQL databases

  • mode (str) – mode for ORACLE databases, i.e. SYSDBA or SYSOPER

  • host (str) – name of the host

  • port (str) – port number

initTango(name, device, memberType, recordName, host=None, port=None, encoding=None, group=None)[source]ΒΆ

sets paramters for Tango device

Parameters:
  • name (str) – name of datasource

  • device (str) – device name

  • memberType (str) – type of the data object, i.e. attribute, property, command

  • recordName (str) – name of the data object

  • host (str) – host name

  • port (str) – port

  • encoding (str) – encoding of DevEncoded data

class nxstools.nxsxml.NDeviceGroup(parent, deviceName, nameAttr, typeAttr='', commands=True, blackAttrs=None)[source]ΒΆ

Bases: NGroup

Tango device tag creator

constructor

Parameters:
  • parent (NTag) – parent tag element

  • deviceName (str) – tango device name

  • nameAttr (str) – name attribute

  • typeAttr (str) – type attribute

  • commands (bool) – if we call the commands

  • blackAttrs (list <str>) – list of excluded attributes

nTypes = ['NX_CHAR', 'NX_BOOLEAN', 'NX_INT32', 'NX_INT32', 'NX_FLOAT32', 'NX_FLOAT64', 'NX_UINT32', 'NX_UINT32', 'NX_CHAR', 'NX_CHAR', 'NX_INT32', 'NX_INT32', 'NX_FLOAT32', 'NX_FLOAT64', 'NX_UINT32', 'NX_UINT32', 'NX_CHAR', 'NX_CHAR', 'NX_CHAR', 'NX_CHAR', 'NX_CHAR', 'NX_BOOLEAN', 'NX_CHAR', 'NX_INT64', 'NX_UINT64', 'NX_INT64', 'NX_UINT64', 'NX_INT32', 'NX_CHAR']ΒΆ

(list <str>) NeXuS types corresponding to the Tango types

tTypes = ['DevVoid', 'DevBoolean', 'DevShort', 'DevLong', 'DevFloat', 'DevDouble', 'DevUShort', 'DevULong', 'DevString', 'DevVarCharArray', 'DevVarShortArray', 'DevVarLongArray', 'DevVarFloatArray', 'DevVarDoubleArray', 'DevVarUShortArray', 'DevVarULongArray', 'DevVarStringArray', 'DevVarLongStringArray', 'DevVarDoubleStringArray', 'DevState', 'ConstDevString', 'DevVarBooleanArray', 'DevUChar', 'DevLong64', 'DevULong64', 'DevVarLong64Array', 'DevVarULong64Array', 'DevInt', 'DevEncoded']ΒΆ

(list < str>) Tango types

class nxstools.nxsxml.NDim(parent, indexAttr, valueAttr)[source]ΒΆ

Bases: NTag

Dim tag wrapper

constructor

Parameters:
  • parent (NTag) – parent tag element

  • indexAttr (str) – index attribute

  • valueAttr (str) – value attribute

class nxstools.nxsxml.NDimensions(parent, rankAttr)[source]ΒΆ

Bases: NTag

Dimensions tag wrapper

constructor

Parameters:
  • parent (NTag) – parent tag element

  • rankAttr (str) – rank attribute

dim(indexAttr, valueAttr)[source]ΒΆ

adds dim tag

Parameters:
  • indexAttr (str) – index attribute

  • valueAttr (str) – value attribute

dimsΒΆ

(dict <str, NDim>) container with dim tag wrapper

class nxstools.nxsxml.NField(parent, nameAttr, typeAttr='')[source]ΒΆ

Bases: NTag

Field tag wrapper

constructor

Parameters:
  • parent (NTag) – parent tag element

  • nameAttr (str) – name attribute

  • typeAttr (str) – type attribute

addAttr(attrName, attrType, attrValue='')[source]ΒΆ

adds attribute tag

Parameters:
  • attrName (str) – name attribute

  • attrType (str) – type attribute

  • attrValue (str) – content of the attribute tag

addDoc(doc)[source]ΒΆ

adds doc tag content

Parameters:

doc (str) – doc tag content

setStrategy(mode='STEP', trigger=None, value=None, grows=None, compression=False, rate=None, shuffle=None, canfail=None, compression_opts=None)[source]ΒΆ

sets the field strategy

Parameters:
  • mode (str) – mode data writing, i.e. INIT, STEP, FINAL, POSTRUN

  • trigger (str) – for asynchronous writting, e.g. with different subentries

  • value (str) – label for postrun mode

  • grows (str) – growing dimension

  • compression (str) – flag if compression shuold be applied

  • rate (str) – compression rate

  • shuffle (str) – flag if compression shuffle

  • canfail (bool) – can fail strategy flag

setUnits(unitsAttr)[source]ΒΆ

sets the field unit

Parameters:

unitsAttr (str) – the field unit

class nxstools.nxsxml.NGroup(parent, nameAttr, typeAttr='')[source]ΒΆ

Bases: NTag

Group tag wrapper

constructor

Parameters:
  • parent (NTag) – parent tag element

  • nameAttr (str) – name attribute

  • typeAttr (str) – type attribute

addAttr(attrName, attrType, attrValue='')[source]ΒΆ

adds attribute: tag

Parameters:
  • attrName (str) – name attribute

  • attrType (str) – type attribute

  • attrValue (str) – content of the attribute tag

addDoc(doc)[source]ΒΆ

adds doc tag content

Parameters:

doc (str) – doc tag content

Bases: NTag

Link tag wrapper

constructor

Parameters:
  • parent (NTag) – parent tag element

  • nameAttr (str) – name attribute

  • gTarget (str) – target attribute

addDoc(doc)[source]ΒΆ

adds doc tag content

Parameters:

doc (str) – doc tag content

class nxstools.nxsxml.NTag(parent, tagName, nameAttr='', typeAttr='')[source]ΒΆ

Bases: object

tag wrapper

constructor

Parameters:
  • parent (NTag) – parent tag element

  • tagName (str) – tag name

  • nameAttr (str) – value of name attribute

  • typeAttr (str) – value of type attribute

addTagAttr(name, value)[source]ΒΆ

adds tag attribute

Parameters:
  • name (str) – attribute name

  • value (str) – attribute value

addText(text)[source]ΒΆ

adds tag content

Parameters:

text (str) – tag content

elemΒΆ

(lxml.etree.Element) tag element from etree

setText(text)[source]ΒΆ

sets tag content

Parameters:

text (str) – tag content

class nxstools.nxsxml.XMLFile(fname)[source]ΒΆ

Bases: object

XML file object

constructor

Parameters:

fname (str) – XML file name

dump()[source]ΒΆ

dumps XML structure into the XML file

Brief:

It opens XML file, calls prettyPrint and closes the XML file

elemΒΆ

(lxml.etree.Element) XML root instance

fnameΒΆ

(str) XML file name

prettyPrint(etNode=None)[source]ΒΆ

prints pretty XML making use of etree

Parameters:

etNode (lxml.etree.Element) – node

setDependencies(components, entry=None)[source]ΒΆ

sets tag content

Parameters:
  • components (list <str>) – component dependencies

  • entry (lxml.etree.Element) – entry node

nxstools.nxsxml.main()[source]ΒΆ

the main function

nxstools.release moduleΒΆ

NXS tools release version

nxstools.redisutils moduleΒΆ

Provides redis utils

class nxstools.redisutils.DESYIdentityModel(*, pk: Optional[str] = None, name: str, number: int, data_policy: str, beamline: Optional[str] = None, session: Optional[str] = None, proposal: Optional[str] = None, collection: Optional[str] = None, dataset: Optional[str] = None, path: Optional[str] = None, **extra_data: Any)[source]ΒΆ

Bases: HashModel

Institute specific information used to link scans in Redis to external services.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

class Meta[source]ΒΆ

Bases: object

database = <blissdata.redis_engine.identities._UninitializedRedis object>ΒΆ
encoding = 'utf-8'ΒΆ
global_key_prefix = 'esrf'ΒΆ
index_name = 'esrf:id:index'ΒΆ
model_key_prefix = 'id'ΒΆ
primary_key = PrimaryKey(name='pk', field=ModelField(name='pk', type=Optional[str], required=False, default=None))ΒΆ
primary_key_creator_clsΒΆ

alias of UlidPrimaryKey

primary_key_pattern = '{pk}'ΒΆ
beamline: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
collection: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
data_policy: Union[str, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
dataset: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
name: Union[str, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
number: Union[int, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
path: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
pk: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
proposal: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
session: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>ΒΆ
nxstools.redisutils.getDataStore(redisURL)[source]ΒΆ

Module contentsΒΆ

NXS tools

xml templates

nxstools.xmltemplates.moduleMultiAttributes = {'cobold': ['BinSize', 'ExposureTime'], 'dalsa': ['FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'TriggerMode', 'Width', 'Height', 'ExtendedExposure', 'BinComment', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'FramesReceived', 'FrameRate', 'FramesPerNXFile', 'NXFileCompression', 'TurboMode', 'ImageEnc', 'ViewingMode', 'ThrashedBuffers', 'FramesToAcquire', 'AcquisitionFrameCount', 'AcquisitionMode', 'AcquisitionFrameMode', 'LinearityEqualizer', 'NrExposedFrames', 'NrOffsetFrames', 'Offset', 'PixelFormat', 'ReadOutMode', 'Standby', 'SumScheme'], 'dalsavds': ['FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'TriggerMode', 'Width', 'Height', 'ExtendedExposure', 'BinComment', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'FramesReceived', 'FrameRate', 'FramesPerNXFile', 'NXFileCompression', 'TurboMode', 'ImageEnc', 'ViewingMode', 'ThrashedBuffers', 'FramesToAcquire', 'AcquisitionFrameCount', 'AcquisitionMode', 'AcquisitionFrameMode', 'LinearityEqualizer', 'NrExposedFrames', 'NrOffsetFrames', 'Offset', 'PixelFormat', 'ReadOutMode', 'Standby', 'SumScheme'], 'eiger1m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger1m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger4m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger4m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger9m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger9m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eigerdectris': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eigerdectrismesh': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'lambda': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'lambda2m': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'OpMode', 'Translations'], 'lambdavds': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'lambdavdsnm': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'limaccd': ['camera_type', 'camera_pixelsize', 'camera_model', 'acq_mode', 'acq_nb_frames', 'acq_trigger_mode', 'last_image_saved', 'latency_time', 'acc_max_expo_time', 'acc_expo_time', 'acc_time_mode', 'acc_dead_time', 'acc_live_time', 'saving_mode', 'saving_directory', 'saving_prefix', 'saving_suffix', 'saving_next_number', 'saving_format', 'saving_frame_per_file', 'image_type', 'image_width', 'image_height', 'image_sizes', 'image_roi', 'image_bin', 'image_flip', 'image_rotation', 'shutter_mode', 'shutter_open_time'], 'limaccds': ['camera_type', 'camera_pixelsize', 'camera_model', 'acq_mode', 'acq_nb_frames', 'acq_trigger_mode', 'last_image_saved', 'latency_time', 'acc_max_expo_time', 'acc_expo_time', 'acc_time_mode', 'acc_dead_time', 'acc_live_time', 'saving_mode', 'saving_directory', 'saving_prefix', 'saving_suffix', 'saving_next_number', 'saving_format', 'saving_frame_per_file', 'image_type', 'image_width', 'image_height', 'image_sizes', 'image_roi', 'image_bin', 'image_flip', 'image_rotation', 'shutter_mode', 'shutter_open_time'], 'maiadimension': ['Name', 'PositionSource', 'PixelPitch', 'PixelOrigin', 'PixelHysteresis', 'PositionUnit', 'PixelCoordExtent'], 'maiaflux': ['FluxCoeff', 'FluxName', 'FluxUnit', 'FluxSource'], 'maiainterlock': ['BiasPeltierInterlock', 'BiasPeltierInterlockUptime', 'Pressure'], 'maialogger': ['RunNumber'], 'maiaprocessing': ['GaintrimEnable', 'LineariseEnable', 'PhotonEnable', 'PileupRejectEnable', 'PixelEnable', 'ThrottleEnable'], 'maiasensor': ['BiasVoltage', 'LeakageCurrent', 'PeltierCurrent', 'WaterTemperature', 'DetectorTemperature', 'MosfetTemperature', 'Identity'], 'marccd': ['FrameShift', 'SavingDirectory', 'SavingPostfix', 'SavingPrefix'], 'mca_xia': ['ICR', 'OCR'], 'mca_xia@pool': ['CountsRoI', 'RoIEnd', 'RoIStart'], 'mythen': ['Counts1', 'Counts2', 'CountsMax', 'CountsTotal', 'ExposureTime', 'FileDir', 'FileIndex', 'FilePrefix', 'Data', 'RoI1', 'RoI2'], 'mythen2': ['Counts1', 'Counts2', 'CountsMax', 'CountsTotal', 'ExposureTime', 'FileDir', 'FileIndex', 'FilePrefix', 'Data', 'Energy', 'NbFrames', 'RoI1End', 'RoI2End', 'RoI1Start', 'RoI2Start', 'Threshold'], 'pco': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pco4000': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pcoedge': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pedetector': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'perkinelmer': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'perkinelmerdetector': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'pilatus': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus100k': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus1m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus2m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus300k': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus6m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilc': ['PositionTriggerStart', 'PositionTriggerStepSize', 'PositionTriggerStop', 'NbTriggers', 'TriggerPulseLength', 'Arm', 'TriggerMode', 'TimeTriggerStart', 'TimeTriggerStepSize', 'FilePrefix', 'FileDir', 'FileName', 'TriggerCounter', 'EncoderTrigger', 'RemainingTriggers', 'EncoderTriggering', 'BufferLoad', 'Position1Conversion', 'Position2Conversion', 'Position3Conversion', 'Position4Conversion', 'Position5Conversion', 'CurrentPosition1', 'CurrentPosition2', 'CurrentPosition3', 'CurrentPosition4', 'CurrentPosition5', 'MaskDataToWrite', 'Metadata1', 'Metadata2', 'Metadata3', 'Metadata4', 'Metadata5', 'TriggersPerFile', 'SoftwareInhibit', 'HardwareInhibit', 'CounterConfig'], 'pilctimeid': ['PositionTriggerStart', 'PositionTriggerStepSize', 'PositionTriggerStop', 'NbTriggers', 'TriggerPulseLength', 'Arm', 'TriggerMode', 'TimeTriggerStart', 'TimeTriggerStepSize', 'FilePrefix', 'FileDir', 'FileName', 'TriggerCounter', 'EncoderTrigger', 'RemainingTriggers', 'EncoderTriggering', 'BufferLoad', 'Position1Conversion', 'Position2Conversion', 'Position3Conversion', 'Position4Conversion', 'Position5Conversion', 'CurrentPosition1', 'CurrentPosition2', 'CurrentPosition3', 'CurrentPosition4', 'CurrentPosition5', 'MaskDataToWrite', 'Metadata1', 'Metadata2', 'Metadata3', 'Metadata4', 'Metadata5', 'TriggersPerFile', 'SoftwareInhibit', 'HardwareInhibit', 'CounterConfig'], 'tangovimba': ['Width', 'WidthMax', 'TriggerSource', 'PixelFormat', 'OffsetY', 'OffsetX', 'HeightMax', 'Height', 'GainRaw', 'ExposureTimeAbs', 'AcquisitionFrameRateAbs', 'AcquisitionFrameRateLimit', 'StreamBytesPerSecond', 'BinComment', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'MaxLoad', 'ReadMode', 'TuneMode', 'ViewingMode']}ΒΆ

(dict <str , list <str> >) important attributes of modules

nxstools.xmltemplates.moduleTemplateFiles = {'cobold': ['cobold.xml'], 'dalsa': ['dalsa.xml', 'dalsa_nxdata.ds.xml', 'dalsa_external_data.ds.xml'], 'dalsavds': ['dalsavds.xml', 'dalsavds_nxdata.ds.xml', 'dalsavds_triggermode_cb.ds.xml', 'dalsavds_filestartnum_cb.ds.xml', 'dalsavds_nrexposedframes_cb.ds.xml'], 'eiger1m16vds': ['eiger1m16vds.xml', 'eiger1m16vds_stepindex.ds.xml', 'eiger1m16vds_nbimages_cb.ds.xml', 'eiger1m16vds_description_cb.ds.xml', 'eiger1m16vds_triggermode_cb.ds.xml'], 'eiger1m32vds': ['eiger1m32vds.xml', 'eiger1m32vds_stepindex.ds.xml', 'eiger1m32vds_nbimages_cb.ds.xml', 'eiger1m32vds_description_cb.ds.xml', 'eiger1m32vds_triggermode_cb.ds.xml'], 'eiger4m16vds': ['eiger4m16vds.xml', 'eiger4m16vds_stepindex.ds.xml', 'eiger4m16vds_nbimages_cb.ds.xml', 'eiger4m16vds_description_cb.ds.xml', 'eiger4m16vds_triggermode_cb.ds.xml'], 'eiger4m32vds': ['eiger4m32vds.xml', 'eiger4m32vds_stepindex.ds.xml', 'eiger4m32vds_nbimages_cb.ds.xml', 'eiger4m32vds_description_cb.ds.xml', 'eiger4m32vds_triggermode_cb.ds.xml'], 'eiger9m16vds': ['eiger9m16vds.xml', 'eiger9m16vds_stepindex.ds.xml', 'eiger9m16vds_nbimages_cb.ds.xml', 'eiger9m16vds_description_cb.ds.xml', 'eiger9m16vds_triggermode_cb.ds.xml'], 'eiger9m32vds': ['eiger9m32vds.xml', 'eiger9m32vds_stepindex.ds.xml', 'eiger9m32vds_nbimages_cb.ds.xml', 'eiger9m32vds_description_cb.ds.xml', 'eiger9m32vds_triggermode_cb.ds.xml'], 'eigerdectris': ['eigerdectris.xml', 'eigerdectris_stepindex.ds.xml', 'eigerdectris_nbimages_cb.ds.xml', 'eigerdectris_description_cb.ds.xml', 'eigerdectris_triggermode_cb.ds.xml'], 'eigerdectrismesh': ['eigerdectrismesh.xml', 'eigerdectrismesh_stepindex.ds.xml', 'eigerdectrismesh_nbimages_cb.ds.xml', 'eigerdectrismesh_description_cb.ds.xml', 'eigerdectrismesh_triggermode_cb.ds.xml'], 'lambda': ['lambda.xml', 'lambda_nxdata.ds.xml', 'lambda_external_data.ds.xml'], 'lambda2m': ['lambda2m.xml', 'lambda2m_m1_nxdata.ds.xml', 'lambda2m_m2_nxdata.ds.xml', 'lambda2m_m3_nxdata.ds.xml', 'lambda2m_m1_external_data.ds.xml', 'lambda2m_m2_external_data.ds.xml', 'lambda2m_m3_external_data.ds.xml'], 'lambdavds': ['lambdavds.xml', 'lambdavds_nxdata.ds.xml', 'lambdavds_description.ds.xml', 'lambdavds_triggermode_cb.ds.xml', 'lambdavds_framenumbers_cb.ds.xml', 'lambdavds_savefilename_cb.ds.xml'], 'lambdavdsnm': ['lambdavdsnm.xml', 'lambdavdsnm_triggermode_cb.ds.xml', 'lambdavdsnm_nxdata.ds.xml'], 'limaccd': ['limaccd.xml', 'limaccd_postrun.ds.xml', 'limaccd_xpixelsize.ds.xml', 'limaccd_ypixelsize.ds.xml', 'limaccd_description.ds.xml', 'limaccd_filestartnum_cb.ds.xml'], 'limaccds': ['limaccd.xml', 'limaccd_postrun.ds.xml', 'limaccd_xpixelsize.ds.xml', 'limaccd_ypixelsize.ds.xml', 'limaccd_description.ds.xml', 'limaccd_filestartnum_cb.ds.xml'], 'marccd': ['marccd.xml', 'marccd_postrun.ds.xml'], 'mca_xia': ['mcaxia.xml'], 'mythen': ['mythen.xml', 'mythen_postrun.ds.xml', 'mythen_filestartnumber.ds.xml'], 'mythen2': ['mythen2.xml'], 'pco': ['pco.xml', 'pco_postrun.ds.xml', 'pco_description.ds.xml', 'pco_filestartnum_cb.ds.xml'], 'pco4000': ['pco.xml', 'pco_postrun.ds.xml', 'pco_description.ds.xml', 'pco_filestartnum_cb.ds.xml'], 'pcoedge': ['pco.xml', 'pco_postrun.ds.xml', 'pco_description.ds.xml', 'pco_filestartnum_cb.ds.xml'], 'pedetector': ['perkinelmerdetector.xml', 'perkinelmerdetector_postrun.ds.xml', 'perkinelmerdetector_description.ds.xml', 'perkinelmerdetector_fileindex_cb.ds.xml'], 'perkinelmer': ['perkinelmerdetector.xml', 'perkinelmerdetector_postrun.ds.xml', 'perkinelmerdetector_description.ds.xml', 'perkinelmerdetector_fileindex_cb.ds.xml'], 'perkinelmerdetector': ['perkinelmerdetector.xml', 'perkinelmerdetector_postrun.ds.xml', 'perkinelmerdetector_description.ds.xml', 'perkinelmerdetector_fileindex_cb.ds.xml'], 'pilatus': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus100k': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus100k_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus1m': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus1m_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus2m': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus6m_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus300k': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus300k_description.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilatus6m': ['pilatus.xml', 'pilatus_postrun.ds.xml', 'pilatus_mxparameters_cb.ds.xml', 'pilatus6m_description.ds.xml', 'pilatus_filestartnum_cb.ds.xml'], 'pilc': ['pilc.xml', 'pilc_triggermode_cb.ds.xml'], 'pilctimeid': ['pilctimeid.xml', 'pilctimeid_triggermode_cb.ds.xml'], 'tangovimba': ['tangovimba.xml', 'tangovimba_nxdata.ds.xml', 'tangovimba_external_data.ds.xml']}ΒΆ

(dict <str , list <str> >) xml template files of modules

nxstools.xmltemplates.standardComponentTemplateFiles = {'absorber': ['absorber_foil.ds.xml', 'absorber_thickness.ds.xml', 'absorber.xml'], 'beamstop': ['beamstop.xml'], 'beamtimefname': ['beamtimefname.xml', 'beamtimefname.ds.xml', 'start_time.ds.xml'], 'beamtimeid': ['beamtimeid.xml', 'beamtimeid.ds.xml', 'start_time.ds.xml'], 'chcut': ['chcut.xml', 'chcut_unitcalibration.ds.xml', 'chcut_crystal.ds.xml'], 'coboldhisto': ['coboldhisto.xml', 'coboldhisto_timeofflight.ds.xml'], 'collect2': ['collect2.xml'], 'collect3': ['collect3.xml'], 'collect4': ['collect4.xml'], 'collect5': ['collect5.xml'], 'collect6': ['collect6.xml'], 'common2': ['common2_common.ds.xml'], 'common3': ['common3_common.ds.xml'], 'dataaxessignal': ['dataaxessignal.xml', 'defaultsignal.ds.xml', 'defaultaxes.ds.xml', 'signal_name.ds.xml', 'signalname.ds.xml', 'sardanaenvironment.ds.xml'], 'datasignal': ['datasignal.xml', 'defaultsignal.ds.xml', 'signal_name.ds.xml', 'signalname.ds.xml', 'signal_axes.ds.xml', 'sardanaenvironment.ds.xml'], 'dcm': ['dcm.xml', 'dcm_reflection.ds.xml', 'dcm_unitcalibration.ds.xml', 'dcm_crystal.ds.xml'], 'default': ['default.xml', 'defaultsample.xml', 'defaultinstrument.xml', 'sample_name.ds.xml', 'chemical_formula.ds.xml', 'beamtime_id.ds.xml', 'beamtime_filename.ds.xml', 'start_time.ds.xml', 'end_time.ds.xml', 'nexdatas_version.ds.xml', 'nexdatas_configuration.ds.xml', 'title.ds.xml'], 'defaultinstrument': ['defaultinstrument.xml', 'beamtime_id.ds.xml', 'beamtime_filename.ds.xml', 'start_time.ds.xml', 'end_time.ds.xml', 'nexdatas_version.ds.xml', 'nexdatas_configuration.ds.xml', 'title.ds.xml'], 'defaultsample': ['defaultsample.xml', 'sample_name.ds.xml', 'chemical_formula.ds.xml'], 'description': ['description.xml', 'experiment_description.ds.xml'], 'descriptiontext': ['descriptiontext.xml'], 'detectorlive': ['detectorlive.xml'], 'empty': ['empty.xml'], 'groupsecop': ['groupsecop.ds.xml', 'groupsecop_time.ds.xml', 'client_start_time.ds.xml', 'sample_env_links.ds.xml', 'sample_log_links.ds.xml'], 'keithley': ['keithley.xml'], 'maia': ['maia.xml', 'empty.xml'], 'maiadimension': ['maiadimension.xml'], 'maiaflux': ['maiaflux.xml'], 'msnsar': ['msnsar_env.ds.xml', 'sardanaenvironment.ds.xml'], 'mssar': ['mssar_env.ds.xml', 'sardanaenvironment.ds.xml'], 'parametercopymap': ['parametercopymap.xml'], 'pinhole': ['pinhole.xml'], 'pointdet': ['pointdet.xml'], 'qbpm': ['qbpm_foil.ds.xml', 'qbpm.xml'], 'sampledescription': ['sampledescription.xml', 'sample_description.ds.xml'], 'sampledescriptiontext': ['sampledescriptiontext.xml'], 'samplehkl': ['samplehkl.xml'], 'secop': ['secop.ds.xml', 'secop_time.ds.xml', 'client_start_time.ds.xml', 'sample_env_links.ds.xml', 'sample_log_links.ds.xml'], 'secoplinks': ['sample_env_links.ds.xml', 'sample_log_links.ds.xml', 'sample_nxdata.ds.xml', 'sampleenv_nxdata.ds.xml'], 'singlesecop': ['singlesecop.ds.xml', 'singlesecop_time.ds.xml', 'client_start_time.ds.xml', 'sample_env_links.ds.xml', 'sample_log_links.ds.xml'], 'slit': ['slit.xml'], 'source': ['source.xml'], 'starttime': ['starttime.xml', 'starttime.ds.xml', 'start_timestamp.ds.xml', 'client_start_time.ds.xml'], 'tango': ['tango.ds.xml'], 'undulator': ['undulator.xml']}ΒΆ

(dict <str , list <str> >) xml template files of modules

nxstools.xmltemplates.standardComponentVariables = {'absorber': {'attenfactor': {'default': None, 'doc': 'attenuation factor (datasource)'}, 'dependstop': {'default': None, 'doc': 'the first transformation, e.g. distance (string)'}, 'distance': {'default': None, 'doc': 'distance for the sample in m, e.g. 0 (string)'}, 'distancename': {'default': 'distance', 'doc': 'distance name for the sample in m, e.g. 0 (string)'}, 'distanceoffset': {'default': None, 'doc': '3-vector distance offset in m, e.g. sample-source offset if the distance is taken from the source (string)'}, 'foil': {'default': None, 'doc': 'foil type, i.e. standard <cpname>_foil (datasource)'}, 'foillist': {'default': '["Ag", "Ag", "Ag", "Ag", "", "Al", "Al", "Al", "Al"]', 'doc': 'foil_type position json dictionary (string)'}, 'position': {'default': None, 'doc': 'which sliders are in [bitarray] MANDATORY (datasource)'}, 'thickness': {'default': None, 'doc': 'foil thickness, i.e. standard <cpname>_thickness (datasource)'}, 'thicknesslist': {'default': '[0.5, 0.05, 0.025, 0.0125, 0, 0.1, 0.3, 0.5, 1.0]', 'doc': 'foil_type position json dictionary (string)'}, 'transformations': {'default': None, 'doc': "transformations group name i.e. 'transformations'. If it is  not set it is not created (string)"}, 'y': {'default': None, 'doc': 'vertical position (datasource)'}, 'yname': {'default': 'y', 'doc': 'vertical position name (string)'}}, 'beamstop': {'description': {'default': 'circular', 'doc': ' circular or  rectangular (string)'}, 'x': {'default': None, 'doc': 'horizontal position (datasource)'}, 'xname': {'default': 'x', 'doc': 'horizontal position name (string)'}, 'xsign': {'default': '', 'doc': "horizontal position sign, e.g. '-' (string)"}, 'y': {'default': None, 'doc': 'vertical position (datasource)'}, 'yname': {'default': 'y', 'doc': 'vertical position name (string)'}, 'z': {'default': None, 'doc': 'vertical position (datasource)'}, 'zname': {'default': 'z', 'doc': 'along the beam position name (string)'}}, 'beamtimefname': {'commissiondir': {'default': '/gpfs/commissioning', 'doc': 'commission file directory (string)'}, 'commissionpostfix': {'default': '.json', 'doc': 'commission file postfix (string)'}, 'commissionprefix': {'default': 'commissioning-metadata-', 'doc': 'commission file prefix (string)'}, 'currentdir': {'default': '/gpfs/current', 'doc': 'beamtime file directory (string)'}, 'currentpostfix': {'default': '.json', 'doc': 'beamtime file postfix (string)'}, 'currentprefix': {'default': 'beamtime-metadata-', 'doc': 'beamtime file prefix (string)'}, 'localdir': {'default': '/gpfs/local', 'doc': 'local file directory (string)'}, 'shortname': {'default': 'P09', 'doc': 'beamline short name (string)'}}, 'beamtimeid': {'commissiondir': {'default': '/gpfs/commissioning', 'doc': 'commission file directory (string)'}, 'commissionpostfix': {'default': '.json', 'doc': 'commission file postfix (string)'}, 'commissionprefix': {'default': 'commissioning-metadata-', 'doc': 'commission file prefix (string)'}, 'currentdir': {'default': '/gpfs/current', 'doc': 'beamtime file directory (string)'}, 'currentpostfix': {'default': '.json', 'doc': 'beamtime file postfix (string)'}, 'currentprefix': {'default': 'beamtime-metadata-', 'doc': 'beamtime file prefix (string)'}, 'localdir': {'default': '/gpfs/local', 'doc': 'local file directory (string)'}, 'shortname': {'default': 'P09', 'doc': 'beamline short name (string)'}}, 'chcut': {'braggangle': {'default': None, 'doc': 'bragg angle (datasource)'}, 'bragganglename': {'default': 'bragg', 'doc': 'bragg angle name  (string)'}, 'chcutdevice': {'default': None, 'doc': 'FMBOxfDCMEnergy tango device name (string)'}, 'crystal': {'default': None, 'doc': ' type of crystal i.e. 0->Si111,1->Si311,2->Si111 ChannelCut  (datasource)'}, 'energy': {'default': None, 'doc': 'synchronized monochromator energy (datasource)'}, 'energyfmb': {'default': None, 'doc': 'monochromator energy (datasource)'}, 'jack1': {'default': None, 'doc': 'first vertical jack of table (datasource)'}, 'jack1name': {'default': 'jack1', 'doc': 'first vertical jack name of table (string)'}, 'jack2': {'default': None, 'doc': 'second vertical jack of table (datasource)'}, 'jack2name': {'default': 'jack2', 'doc': 'second vertical jack name of table (string)'}, 'jack3': {'default': None, 'doc': 'third vertical jack of table (datasource)'}, 'jack3name': {'default': 'jack3', 'doc': 'third vertical jack name of table (string)'}, 'lat': {'default': None, 'doc': 'horizontal lattice translation of the first cristal (datasource)'}, 'latname': {'default': 'lat', 'doc': 'horizontal lattice translation name of the first cristal (string)'}, 'oxfordhorizontal': {'default': None, 'doc': ' horizontal translation (datasource)'}, 'para': {'default': None, 'doc': 'distance between the crystals (string)'}, 'paraname': {'default': 'para', 'doc': 'beam parallel translation name of the second cristal (string)'}, 'reflection': {'default': None, 'doc': 'reflection from string (datasource)'}, 'table': {'default': None, 'doc': 'vertical position of table (datasource)'}, 'tablename': {'default': 'table', 'doc': 'vertical position name of table (string)'}, 'theta': {'default': None, 'doc': 'theta angle (datasource)'}, 'thetaname': {'default': 'theta', 'doc': 'theta angle name (string)'}, 'unitcalibration': {'default': None, 'doc': ' unit calibration from dcmmotor (datasource)'}, 'usage': {'default': 'Bragg', 'doc': 'the crystall usage, e.g. Laue (string)'}, 'yaw': {'default': None, 'doc': 'phi rotation of the first cristal (datasource)'}, 'yawname': {'default': 'phi', 'doc': 'phi rotation name of the first cristal (string)'}}, 'coboldhisto': {'binsize': {'default': None, 'doc': 'bin size of histogram data (datasource)'}, 'exposuretime': {'default': None, 'doc': 'exposure time for histogram data (datasource)'}, 'histogram': {'default': None, 'doc': 'histogram data (datasource)'}}, 'collect2': {'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}}, 'collect3': {'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}, 'third': {'default': None, 'doc': 'name of the third component to collect MANDATORY (datasource)'}}, 'collect4': {'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'fourth': {'default': None, 'doc': 'name of the fourth component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}, 'third': {'default': None, 'doc': 'name of the third component to collect MANDATORY (datasource)'}}, 'collect5': {'fifth': {'default': None, 'doc': 'name of the fifth component to collect MANDATORY (datasource)'}, 'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'fourth': {'default': None, 'doc': 'name of the fourth component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}, 'third': {'default': None, 'doc': 'name of the third component to collect MANDATORY (datasource)'}}, 'collect6': {'fifth': {'default': None, 'doc': 'name of the fifth component to collect MANDATORY (datasource)'}, 'first': {'default': None, 'doc': 'name of the first component to collect MANDATORY (datasource)'}, 'fourth': {'default': None, 'doc': 'name of the fourth component to collect MANDATORY (datasource)'}, 'second': {'default': None, 'doc': 'name of the second component to collect MANDATORY (datasource)'}, 'sixth': {'default': None, 'doc': 'name of the sixth component to collect MANDATORY (datasource)'}, 'third': {'default': None, 'doc': 'name of the third component to collect MANDATORY (datasource)'}}, 'common2': {'dds': {'default': None, 'doc': 'default read datasource name MANDATORY (datasource)'}, 'ods': {'default': None, 'doc': 'optional detasource name MANDATORY (datasource)'}}, 'common3': {'dds': {'default': None, 'doc': 'default read datasource name MANDATORY (datasource)'}, 'ods1': {'default': None, 'doc': 'fist optional detasource name MANDATORY (datasource)'}, 'ods2': {'default': None, 'doc': 'second optional detasource name MANDATORY (datasource)'}}, 'dataaxessignal': {'__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'axes': {'default': 'defaultaxes', 'doc': 'list of data axes field names (datasource)'}, 'defaultattrs': {'default': 'False', 'doc': 'add default attributes (string)'}, 'msenv': {'default': None, 'doc': 'sardana environment (datasource)'}, 'mssardanadevice': {'default': None, 'doc': 'macroserver sardana device name MANDATORY (string)'}, 'nchannelstoskip': {'default': '0', 'doc': 'number of mg channels to skip (string)'}, 'sardanasignal': {'default': 'SignalCounter', 'doc': 'signal sardana variable name (string)'}, 'signal': {'default': 'defaultsignal', 'doc': 'data signal field name (datasource)'}}, 'datasignal': {'__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'axes': {'default': None, 'doc': 'data axes field name(s) (datasource)'}, 'msenv': {'default': None, 'doc': 'sardana environment (datasource)'}, 'mssardanadevice': {'default': None, 'doc': 'macroserver sardana device name MANDATORY (string)'}, 'nchannelstoskip': {'default': '0', 'doc': 'number of mg channels to skip (string)'}, 'sardanasignal': {'default': 'SignalCounter', 'doc': 'signal sardana variable name (string)'}, 'signal': {'default': 'defaultsignal', 'doc': 'data signal field name (datasource)'}}, 'dcm': {'bend1': {'default': None, 'doc': 'bending of the first cristal (datasource)'}, 'bend2': {'default': None, 'doc': 'bending of the second cristal (datasource)'}, 'braggangle': {'default': None, 'doc': 'bragg angle (datasource)'}, 'bragganglename': {'default': 'bragg', 'doc': 'bragg angle name  (string)'}, 'chi2dependson': {'default': 'theta', 'doc': 'the depends_on field of the second cristal chi, e.g. phi (string)'}, 'crystal': {'default': None, 'doc': 'type of crystal i.e. 0->Si111,1->Si311,2->Si111 ChannelCut (datasource)'}, 'dcmdevice': {'default': None, 'doc': 'FMBOxfDCMEnergy tango device (string)'}, 'energy': {'default': None, 'doc': 'synchronized monochromator energy (datasource)'}, 'energyfmb': {'default': None, 'doc': 'monochromator energy (datasource)'}, 'exitoffset': {'default': None, 'doc': ' exit offset (datasource)'}, 'jack1': {'default': None, 'doc': 'first vertical jack of table (datasource)'}, 'jack1name': {'default': 'jack1', 'doc': 'first vertical jack name of table (string)'}, 'jack2': {'default': None, 'doc': 'second vertical jack of table (datasource)'}, 'jack2name': {'default': 'jack2', 'doc': 'second vertical jack name of table (string)'}, 'jack3': {'default': None, 'doc': 'third vertical jack of table (datasource)'}, 'jack3name': {'default': 'jack3', 'doc': 'third vertical jack name of table (string)'}, 'lat': {'default': None, 'doc': 'horizontal lattice translation of the first cristal (datasource)'}, 'lat2': {'default': None, 'doc': 'horizontal lattice translation of the second cristal (datasource)'}, 'lat2name': {'default': 'lat', 'doc': 'horizontal lattice translation name of the second cristal (string)'}, 'latname': {'default': 'lat', 'doc': 'horizontal lattice translation name of the first cristal (string)'}, 'oxfordhorizontal': {'default': None, 'doc': ' horizontal translation (datasource)'}, 'par2': {'default': None, 'doc': 'beam parallel translation of the second cristal (datasource)'}, 'par2name': {'default': 'para', 'doc': 'beam parallel translation name of the second cristal (string)'}, 'perp2': {'default': None, 'doc': 'vertical translation of the second cristal (datasource)'}, 'perp2name': {'default': 'perp', 'doc': 'vertical translation name of the second cristal (string)'}, 'phi1dependson': {'default': '../../transformations/bragg', 'doc': 'the depends_on field of the first cristal phi, e.g. theta (string)'}, 'pitch1': {'default': None, 'doc': 'theta rotation of the first cristal (datasource)'}, 'pitch1name': {'default': 'theta', 'doc': 'theta rotation name of the first cristal (string)'}, 'pitch2': {'default': None, 'doc': 'theta rotation of the second cristal (datasource)'}, 'pitch2name': {'default': 'theta', 'doc': 'theta rotation name of the second cristal (string)'}, 'roll1': {'default': None, 'doc': 'chi rotation of the first cristal (datasource)'}, 'roll1name': {'default': 'chi', 'doc': 'chi rotation name of the first cristal (string)'}, 'roll2': {'default': None, 'doc': 'chi rotation of the second cristal (datasource)'}, 'roll2name': {'default': 'chi', 'doc': 'chi rotation name of the second cristal (string)'}, 'table': {'default': None, 'doc': 'vertical position of table (datasource)'}, 'tablename': {'default': 'table', 'doc': 'vertical position name of table (string)'}, 'theta': {'default': None, 'doc': 'theta angle (datasource)'}, 'thetaname': {'default': 'theta', 'doc': 'theta angle name (string)'}, 'topdependson2': {'default': 'chi', 'doc': 'the first transformation of the second crystal, e.g. lat (string)'}, 'unitcalibration': {'default': None, 'doc': 'unit calibration from dcmmotor (datasource)'}, 'usage': {'default': 'Bragg', 'doc': 'the crystall usage, e.g. Laue (string)'}, 'yaw': {'default': None, 'doc': 'phi rotation of the first cristal (datasource)'}, 'yaw2': {'default': None, 'doc': 'phi rotation of the second cristal (datasource)'}, 'yaw2name': {'default': 'phi', 'doc': 'phi rotation name of the second cristal (string)'}, 'yawname': {'default': 'phi', 'doc': 'phi rotation name of the first cristal (string)'}}, 'default': {'__configdevice__': {'default': 'nxs/configserver/localhost', 'doc': 'configuration server device name (string)'}, '__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'control': {'default': None, 'doc': 'group name of the monitor (string)'}, 'longname': {'default': 'P09 Resonant Scattering and Diffraction beamline', 'doc': 'beamline long name (string)'}, 'shortname': {'default': 'P09', 'doc': 'beamline short name (string)'}, 'sourcename': {'default': 'PETRA III', 'doc': 'source name (string)'}, 'srcname': {'default': 'source', 'doc': 'source group name (string)'}}, 'defaultinstrument': {'__configdevice__': {'default': 'nxs/configserver/localhost', 'doc': 'configuration server device name (string)'}, '__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'control': {'default': None, 'doc': 'group name of the monitor (string)'}, 'longname': {'default': 'P09 Resonant Scattering and Diffraction beamline', 'doc': 'beamline long name (string)'}, 'shortname': {'default': 'P09', 'doc': 'beamline short name (string)'}, 'sourcename': {'default': 'PETRA III', 'doc': 'source name (string)'}, 'srcname': {'default': 'source', 'doc': 'source group name (string)'}}, 'defaultsample': {}, 'description': {}, 'descriptiontext': {'description': {'default': 'scan', 'doc': 'scan technique (string)'}}, 'detectorlive': {'datatype': {'default': 'NX_UINT32', 'doc': 'list of devices (string)'}, 'detectordata': {'default': None, 'doc': 'detector live data (datasource)'}, 'detname': {'default': 'detector', 'doc': 'list of devices (string)'}}, 'empty': {}, 'groupsecop': {'access': {'default': None, 'doc': 'secop access list (string)'}, 'group': {'default': None, 'doc': 'secop group name (string)'}, 'host': {'default': None, 'doc': 'secop host name (string)'}, 'message': {'default': None, 'doc': 'secop command MANDATORY (string)'}, 'port': {'default': '5000', 'doc': 'secop port name (string)'}, 'timeout': {'default': '0.0001', 'doc': 'secop timeout (string)'}}, 'keithley': {'current': {'default': None, 'doc': 'current in A (datasource)'}, 'gain': {'default': None, 'doc': 'gain in V/A (datasource)'}, 'risetime': {'default': None, 'doc': 'rise time (datasource)'}, 'sourvoltlevel': {'default': None, 'doc': 'source voltage level in V (datasource)'}, 'voltage': {'default': None, 'doc': 'voltage in V (datasource)'}}, 'maia': {'chillersetpoint': {'default': None, 'doc': 'chiller set point temperature in Celsus (datasource)'}, 'chiptemperature': {'default': None, 'doc': 'detector chip temperature sensor for maia in Celsus (datasource)'}, 'gaintrimenable': {'default': None, 'doc': 'gaintrim enable status for maia (datasource)'}, 'identity': {'default': None, 'doc': 'sensor identity for maia (datasource)'}, 'interlockpressure': {'default': None, 'doc': 'interlock pressure for maia in mbar (datasource)'}, 'leakagecurrent': {'default': None, 'doc': 'leakage current sensor for maia in A (datasource)'}, 'lineariseenable': {'default': None, 'doc': 'linearise enable status for maia (datasource)'}, 'maiadimensions': {'default': 'empty', 'doc': 'maia dimensions component name (component)'}, 'maiafluxes': {'default': 'empty', 'doc': 'maia fluxes component name (component)'}, 'maiastage': {'default': 'empty', 'doc': 'maia stage component name (component)'}, 'mosfettemperature': {'default': None, 'doc': 'mosfet temperature sensor for maia in Celsus (datasource)'}, 'peltiercurrent': {'default': None, 'doc': 'peltier current sensor for maia in A (datasource)'}, 'photonenable': {'default': None, 'doc': 'photon enable status for maia (datasource)'}, 'pileuprejectionenable': {'default': None, 'doc': 'pileup rejection enable status for maia (datasource)'}, 'pixelenable': {'default': None, 'doc': 'pixel enable status for maia (datasource)'}, 'pressure': {'default': None, 'doc': 'gas pressure in mbar (datasource)'}, 'runnumber': {'default': None, 'doc': 'run number of maia (datasource)'}, 'status': {'default': None, 'doc': 'interlock status for maia (datasource)'}, 'throttleenable': {'default': None, 'doc': 'throttle enable status for maia (datasource)'}, 'uptime': {'default': None, 'doc': 'interlock uptime for maia (datasource)'}, 'voltagesetpoint': {'default': None, 'doc': 'voltage set point temperature in Celsus (datasource)'}, 'watertemperature': {'default': None, 'doc': 'water temperature sensor for maia in Celsus (datasource)'}}, 'maiadimension': {'detname': {'default': 'maia', 'doc': 'detector (alias) name (string)'}, 'dimname': {'default': None, 'doc': 'dimension name for maia (datasource)'}, 'dname': {'default': 'dimension', 'doc': 'dimension name group (string)'}, 'hysteresis': {'default': None, 'doc': 'pixel hysteresis of dimension for maia (datasource)'}, 'numberofpixels': {'default': None, 'doc': 'number of pixels of dimension for maia (datasource)'}, 'origin': {'default': None, 'doc': 'pixel origin of dimension for maia (datasource)'}, 'pixelpitch': {'default': None, 'doc': 'pixel pitch of dimension for maia (datasource)'}, 'positionsource': {'default': None, 'doc': 'position source of dimension for maia (datasource)'}, 'unit': {'default': None, 'doc': 'position units of dimension for maia (datasource)'}}, 'maiaflux': {'coefficient': {'default': None, 'doc': 'flux coefficient  for maia (datasource)'}, 'detname': {'default': 'maia', 'doc': 'detector (alias) name (string)'}, 'fluxname': {'default': None, 'doc': 'flux name for maia (datasource)'}, 'fname': {'default': 'fluxdevice', 'doc': 'flux name group (string)'}, 'keithleydevice': {'default': 'keithley', 'doc': 'keithley device name (string)'}, 'source': {'default': None, 'doc': 'flux source for maia (datasource)'}, 'unit': {'default': None, 'doc': 'flux unit for maia (datasource)'}, 'vfcfactor': {'default': None, 'doc': 'vfc conversion factor (datasource)'}}, 'msnsar': {'__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'msenv': {'default': None, 'doc': 'sardana environment (datasource)'}, 'mssardanadevice': {'default': None, 'doc': 'sardana device name MANDATORY (string)'}, 'varname': {'default': None, 'doc': 'nested sardana environment variable name  MANDATORY (string)'}}, 'mssar': {'__tangohost__': {'default': 'localhost', 'doc': 'tango host (string)'}, '__tangoport__': {'default': '10000', 'doc': 'tango port (string)'}, 'msenv': {'default': None, 'doc': 'sardana environment (datasource)'}, 'mssardanadevice': {'default': None, 'doc': 'macroserver sardana device name MANDATORY (string)'}, 'varname': {'default': None, 'doc': 'sardana environment variable name MANDATORY (string)'}}, 'parametercopymap': {'copymap': {'default': None, 'doc': 'yaml dictionary with {output: input} copy map (string)'}, 'parameter': {'default': 'copymap', 'doc': 'parameter name of copymap (string)'}, 'program': {'default': 'nxsfileinfo_parameters', 'doc': 'group name of NXparameters (string)'}}, 'pinhole': {'diameter': {'default': None, 'doc': 'pinhole diameter (datasource)'}, 'x': {'default': None, 'doc': 'horizontal position (datasource)'}, 'xname': {'default': 'x', 'doc': 'horizontal position name (string)'}, 'xsign': {'default': '', 'doc': "horizontal position sign, e.g. '-' (string)"}, 'y': {'default': None, 'doc': 'vertical position (datasource)'}, 'yname': {'default': 'y', 'doc': 'vertical position name (string)'}, 'z': {'default': None, 'doc': 'along the beam position (datasource)'}, 'zname': {'default': 'z', 'doc': 'along the beam position name (string)'}}, 'pointdet': {'data': {'default': None, 'doc': 'diode data (datasource)'}, 'detname': {'default': 'detector', 'doc': 'detector group name (string)'}}, 'qbpm': {'dependsony': {'default': '', 'doc': 'the  depends_on y field value,  e.g. distance (string)'}, 'dependstop': {'default': 'x', 'doc': 'the first transformation, e.g. distance (string)'}, 'distance': {'default': None, 'doc': 'distance for the sample in m, e.g. 0 (string)'}, 'distancename': {'default': 'distance', 'doc': 'distance name for the sample in m, e.g. 0 (string)'}, 'distanceoffset': {'default': None, 'doc': '3-vector distance offset in m, e.g. sample-source offset if the distance is taken from the source (string)'}, 'foil': {'default': None, 'doc': 'foil type, i.e. standard <cpname>_foil (datasource)'}, 'foilpos': {'default': None, 'doc': 'foil position MANDATORY (datasource)'}, 'foilposdict': {'default': '{"Ti": 43, "Ni": 23, "Out": 3}', 'doc': 'foil_type position json dictionary (string)'}, 'x': {'default': None, 'doc': 'horizontal position (datasource)'}, 'xname': {'default': 'x', 'doc': 'horizontal position name (string)'}, 'y': {'default': None, 'doc': 'vertical position (datasource)'}, 'yname': {'default': 'y', 'doc': 'vertical position name (string)'}}, 'sampledescription': {'sname': {'default': 'sample', 'doc': 'sample group name (string)'}}, 'sampledescriptiontext': {'description': {'default': '', 'doc': 'sample description or sampleId (string)'}, 'sname': {'default': 'sample', 'doc': 'sample group name (string)'}}, 'samplehkl': {'h': {'default': None, 'doc': 'h position in hkl space (datasource)'}, 'k': {'default': None, 'doc': 'k position in hkl space (datasource)'}, 'l': {'default': None, 'doc': 'l position in hkl space (datasource)'}, 'psi': {'default': None, 'doc': 'psi angle position of analyzer (datasource)'}, 'sname': {'default': 'sample', 'doc': 'sample group name (string)'}}, 'secop': {'host': {'default': None, 'doc': 'secop host name (string)'}, 'message': {'default': None, 'doc': 'secop command MANDATORY (string)'}, 'port': {'default': '5000', 'doc': 'secop port name (string)'}, 'timeout': {'default': '0.0001', 'doc': 'secop timeout (string)'}}, 'secoplinks': {'environments': {'default': 'temperature,magnetic_field', 'doc': 'secop environment link lists MANDATORY (string)'}, 'meanings': {'default': 'temperature,magnetic_field,electric_field,stress_field,pressure', 'doc': 'secop meanings link lists MANDATORY (string)'}, 'sampleenvname': {'default': 'sample_environment', 'doc': 'sample environment group name (string)'}, 'samplename': {'default': 'sample', 'doc': 'sample group name (string)'}}, 'singlesecop': {'host': {'default': None, 'doc': 'secop host name (string)'}, 'message': {'default': None, 'doc': 'secop command MANDATORY (string)'}, 'port': {'default': '5000', 'doc': 'secop port name (string)'}, 'timeout': {'default': '0.0001', 'doc': 'secop timeout (string)'}}, 'slit': {'bottom': {'default': None, 'doc': 'bottom blade position (datasource)'}, 'bottomclosed': {'default': None, 'doc': 'bottom blade closed position (datasource)'}, 'dependstop': {'default': None, 'doc': 'the first transformation, e.g. distance (string)'}, 'distance': {'default': None, 'doc': 'distance for the sample in m, e.g. 0 (string)'}, 'distancename': {'default': 'distance', 'doc': 'distance name for the sample in m, e.g. 0 (string)'}, 'distanceoffset': {'default': None, 'doc': '3-vector distance offset in m, e.g. sample-source offset if the distance is taken from the source (string)'}, 'left': {'default': None, 'doc': 'left blade position (datasource)'}, 'leftclosed': {'default': None, 'doc': 'left blade closed position (datasource)'}, 'right': {'default': None, 'doc': 'right blade position (datasource)'}, 'rightclosed': {'default': None, 'doc': 'right blade closed position (datasource)'}, 'top': {'default': None, 'doc': 'top blade position (datasource)'}, 'topclosed': {'default': None, 'doc': 'top blade closed position (datasource)'}, 'transformations': {'default': None, 'doc': "transformations group name i.e. 'transformations'. If it is  not set it is not created (string)"}, 'xgap': {'default': None, 'doc': 'horizontal gap (datasource)'}, 'xoffdependson': {'default': 'y_offset', 'doc': 'the first transformation, e.g. distance (string)'}, 'xoffset': {'default': None, 'doc': 'horizontal offset (datasource)'}, 'xoffsetcalibration': {'default': None, 'doc': 'horizontal offset calibration (datasource)'}, 'xoffsetcalibrationname': {'default': 'x_offset_calibration', 'doc': 'horizontal offset calibration name (string)'}, 'xoffsetname': {'default': 'x_offset', 'doc': 'horizontal offset name (string)'}, 'ygap': {'default': None, 'doc': 'vertical gap (datasource)'}, 'yoffdependson': {'default': 'distance', 'doc': 'the first transformation, e.g. distance (string)'}, 'yoffset': {'default': None, 'doc': 'vertiacal offset (datasource)'}, 'yoffsetcalibration': {'default': None, 'doc': 'vertiacal offset calibration (datasource)'}, 'yoffsetcalibrationname': {'default': 'y_offset_calibration', 'doc': 'vertiacal offset calibration name (string)'}, 'yoffsetname': {'default': 'y_offset', 'doc': 'vertiacal offset name (string)'}}, 'source': {'beamcurrent': {'default': None, 'doc': 'ring beam current (datasource)'}, 'bunchmode': {'default': 'Multi Bunch', 'doc': 'bunch mode (string)'}, 'numberofbunches': {'default': None, 'doc': 'number of source bunches (datasource)'}, 'sourceenergy': {'default': None, 'doc': 'ring beam energy (datasource)'}, 'srcname': {'default': 'source', 'doc': 'source group name (string)'}}, 'starttime': {}, 'tango': {'attribute': {'default': 'Position', 'doc': 'tango device attribute (string)'}, 'device': {'default': None, 'doc': 'tango device MANDATORY (string)'}}, 'undulator': {'dependstop': {'default': None, 'doc': 'the first transformation, e.g. distance (string)'}, 'distance': {'default': None, 'doc': 'distance from the sample in m, e.g. 0 (string)'}, 'distancename': {'default': 'distance', 'doc': 'distance name from the sample in m, e.g. 0 (string)'}, 'distanceoffset': {'default': None, 'doc': '3-vector distance offset in m, e.g. sample-source offset if the distance is taken from the source (string)'}, 'energy': {'default': None, 'doc': 'undulator energy (datasource)'}, 'gap': {'default': None, 'doc': 'separation between opposing pairs of magnetic pole (datasource)'}, 'gapunits': {'default': 'mm', 'doc': 'gap units (string)'}, 'harmonic': {'default': None, 'doc': 'undulator harmonic (datasource)'}, 'length': {'default': '2', 'doc': 'length of insertion device in meters (string)'}, 'shift': {'default': None, 'doc': 'undulator shift (datasource)'}, 'shiftunits': {'default': 'mm', 'doc': 'shift units (string)'}, 'speed': {'default': None, 'doc': 'undulator speed (datasource)'}, 'speedunits': {'default': '', 'doc': 'speed units (string)'}, 'taper': {'default': None, 'doc': 'gap difference between upstream and downstream ends of the insertion device (datasource)'}, 'taperunits': {'default': 'mm', 'doc': 'gap units (string)'}, 'transformations': {'default': None, 'doc': "transformations group name i.e. 'transformations'. If it is  not set it is not created (string)"}, 'type': {'default': 'undulator', 'doc': 'undulator or wiggler (string)'}, 'uname': {'default': 'insertion_device', 'doc': 'insertion_device group name (string)'}}}ΒΆ

(dict <str , dict <str , str > >) standard component template variables and its [default value, doc string]

pyeval functions