NXSTOOLS(1)

NAME
nxstools - nxstools Documentation

Authors: Jan Kotanski

INTRODUCTION

Configuration tools for NeXDaTaS Tango Servers consists of the following command-line scripts:

•   nxscollect uploads external images into the NeXus/HDF5 file

•   nxsconfig reads NeXus Configuration Server settings

•   nxscreate creates NeXus Configuration components

•   nxsdata runs NeXus Data Writer

•   nxsfileinfo shows nedadata of the NeXus/HDF5 file

•   nxsetup setups NeXDaTaS Tango Server environment

    as well as the nxstools package which allows perform these operations directly from a python code.
    Source code: https://github.com/nexdatas/tools
    Web page: https://nexdatas.github.io/tools
    NexDaTaS Web page: https://nexdatas.github.io

INSTALLATION

Install the dependencies:
PyTango, sphinx

  From sources

Download the latest NXS Tools version from
https://github.com/nexdatas/tools

Extract sources and run

$ python setup.py install

  Debian packages

Debian stretch, jessie (and wheezy) or Ubuntu bionic (and xenial) packages can be found in the HDRI repository.

To install the debian packages, add the PGP repository key

$ sudo su
$ wget -q -O - http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -

and then download the corresponding source list

$ cd /etc/apt/sources.list.d
$ wget http://repos.pni-hdri.de/stretch-pni-hdri.list

For releases (>= 2.61.0) to insall python2 scripts

$ apt-get update
$ apt-get install nxstools

and for python3 scripts

$ apt-get update
$ apt-get install nxstools3

For older releases

$ apt-get update
$ apt-get install python-nxstools

and

$ apt-get install python3-nxstools

if exists.

To instal other NexDaTaS packages

$ apt-get install python-nxswriter nxsconfigserver-db python-nxsconfigserver nxsconfigtool

and

$ apt-get install python-nxsrecselector nxselector python-sardana-nxsrecorder

for Component Selector and Sardana related packages.

  From pip

To install it from pip you can

$ python3 -m venv myvenv
$ . myvenv/bin/activate
$ pip install nxstools

Moreover it is also good to install

$ pip install pytango

NXCOLLECT

  Description

The nxscollect is a command-line tool dedicated to collect detector images.

The append sub-commnand adds images of external formats into the NeXus master file. The images to collect should be denoted by postrun fields inside NXcollection groups or given by command-line parameters.

The link sub-commnand creates external or internal link in the NeXus master file to NeXus data files.

  Synopsis for nxscollect append

        nxscollect append [-h] [-c COMPRESSION] [-p PATH] [-i INPUTFILES]
                       [--separator SEPARATOR] [--dtype DATATYPE]
                       [--shape SHAPE] [-s] [-r] [--test] [--h5py]
                       [--h5cpp]
                       [nexus_file [nexus_file ...]]
nexus_file            nexus files to be collected

Options:

-h, --help
    show this help message and exit

-c COMPRESSION, --compression COMPRESSION
    deflate compression rate from 0 to 9 (default: 2) or <filterid>:opt1,opt2,… e.g. -c 32008:0,2 for bitshuffle with lz4

-p PATH, --path PATH
    nexus path for the output field, e.g. /scan/instrument/pilatus/data

-i INPUTFILES, --input_files INPUTFILES
    input data files defined with a pattern or separated by ‘,’ e.g.’scan_%05d.tif:0:100’

--separator SEPARATOR
    input data files separator (default: ‘,’)

--dtype DATATYPE
    datatype of input data - only for raw data, e.g. ‘uint8’

--shape SHAPE
    shape of input data - only for raw data, e.g. ‘[4096,2048]’

-s, --skip_missing
    skip missing files

-r, --replace_nexus_file
    if it is set the old file is not copied into a file with .__nxscollect__old__* extension

--test
    execute in the test mode

--h5py
    use h5py module as a nexus reader/writer

--h5cpp
    use h5cpp module as a nexus reader/writer

  Examples of nxscollect append

nxscollect append -c1 /tmp/gpfs/raw/scan_234.nxs
nxscollect append -c32008:0,2 /ramdisk/scan_123.nxs
nxscollect append --test /tmp/gpfs/raw/scan_234.nxs
nxscollect append scan_234.nxs --path /scan/instrument/pilatus/data  --inputfiles 'scan_%05d.tif:0:100'

  Synopsis for nxscollect link

        nxscollect link [-h] [-n NAME] [-t TARGET] [-r] [--test]
                     [--h5py] [--h5cpp]
                     [nexus_file_path]
nexus_file_path       nexus files with the nexus directory to place the link

Options:

-h, --help
    show this help message and exit

-n NAME, --name NAME
    link name

-t TARGET, --target TARGET
    link target with the file name if external

-r, --replace_nexus_file
    if it is set the old file is not copied into a file with .__nxscollect__old__* extension

--test
    execute in the test mode

--h5py
    use h5py module as a nexus reader/writer

--h5cpp
    use h5cpp module as a nexus reader

  Examples of nxscollect link

nxscollect link scan_234.nxs://entry/instrument/lambda --name data --target lambda.nxs://entry/data/data
nxscollect link scan_123.nxs://entry:NXentry/instrument/eiger:NXdetector  --target eiger.nxs://entry/data/data

  Synopsis for nxscollect vds

nxscollect vds [-h] [-e TARGETFIELDS] [--separator SEPARATOR]
            [-t DTYPE] [-s SHAPE] [-f FILLVALUE] [-p SHAPES]
            [-o OFFSETS] [-b BLOCKS] [-c COUNTS] [-d STRIDES]
            [-l SLICES] [-P TARGETSHAPES] [-O TARGETOFFSETS]
            [-B TARGETBLOCKS] [-C TARGETCOUNTS] [-D TARGETSTRIDES]
            [-L TARGETSLICES] [-r] [--test] [--h5cpp] [--h5py]
            [nexus_file_path_field]

create a virual dataset in the master file

nexus_file_path_field nexus files with the nexus directory and a field name to create the VDS field

Options:

-h, --help
    show this help message and exit

-t DTYPE, --dtype DTYPE
    datatype of the VDS field, e.g. ‘uint8’

-s SHAPE, --shape SHAPE
    shape of the VDS field, e.g. ‘[U,4096,2048]’ or U,4096,2048 where U means span along the field’

-f FILLVALUE, --fill-value FILLVALUE
    fill value for the gaps, default is 0

-e TARGETFIELDS, --target-fields TARGETFIELDS
    external fields with their NeXus file paths defined with a pattern or separated by ‘,’ e.g.’scan_123/lambda_%05d.nxs://entry/data/data:0:3’

--separator SEPARATOR
    input data files separator (default: ‘,’)

-p SHAPES, --shapes SHAPES
    shapes in the VDS layout hyperslab for the corresponding target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g.’,,;,300,;,600,0’ where an empty coordinate means 0

-o OFFSETS, --offsets OFFSETS
    offsets in the VDS layout hyperslab for the corresponding target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g.’,,;,300,;,600,0’ where an empty coordinate means 0

-b BLOCKS, --blocks BLOCKS
    block sizes in the VDS layout hyperslab for the corresponding target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g. ‘,256,512;,256,512;,256,512’ where an empty coordinate means 1

-c COUNTS, --counts COUNTS
    count numbers in the VDS layout hyperslabfor the corresponding target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g. ‘,1,1;,1,1;,1,1’ where an empty coordinate means span along the layout

-d STRIDES, --strides STRIDES
    stride sizes in the VDS layout hyperslabfor the corresponding target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g. ‘,,;,,;,,’ where an empty coordinate means 1

-l SLICES, --slices SLICES
    mapping slices in the VDS layoutfor the corresponding target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’ or spaces e.g. ‘:,0:50,: :,50:100,:’ where U means span along the layout

-P TARGETSHAPES, --target-shapes TARGETSHAPES
    field shapes with coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g.’,,;,300,;,600,0’

-O TARGETOFFSETS, --target-offsets TARGETOFFSETS
    offsets in the view hyperslab of target fieldswith coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g.’,,;,300,;,600,0’ where an empty coordinate means 0

-B TARGETBLOCKS, --target-blocks TARGETBLOCKS
    block sizes in the view hyperslab of target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g. ‘,256,512;,256,512;,256,512’ where an empty coordinate means 1

-C TARGETCOUNTS, --target-counts TARGETCOUNTS
    count numbers in the view hyperslab of target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g. ‘,1,1;,1,1;,1,1’ where an empty coordinate means span along the layout

-D TARGETSTRIDES, --target-strides TARGETSTRIDES
    stride sizes numbers in the view hyperslab of target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’, ‘:’ or spaces e.g. ‘,,;,,;,,’ where an empty coordinate means 1

-L TARGETSLICES, --target-slices TARGETSLICES
    view slices of target fields with coordinates sepatated by ‘,’ and different fields separated by ‘;’ or spaces e.g. ‘:,0:50,: :,0:50,:’ where U means span along the layout

-r, --replace-nexus-file
    if it is set the old file is not copied into a file with .__nxscollect__old__* extension

--test
    execute in the test mode

--h5cpp
    use h5cpp module as a nexus reader

--h5py
    use h5py module as a nexus reader/writer

  Examples of nxscollect vds

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,,'
    - creates VDS (shape [1000,2048,1024]) of ten nexus files (shape [100,2048,1024]) merged in their first dimension
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
    - creates VDS (shape [100,300,762]) of three nexus files (shape [100,300,250]) merged in their third dimension,
        separated with a 6 pixel gap of 1 values and unlimited first dimension
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,,'
    - creates VDS (shape [1000,1600,2000]) of three nexus files (shape [1000,1600,2000])
         merged in their the first dimension with interlaying frames
         and unlimited first dimension

NXSCONFIG

  Description

The nxsconfig program is a command-line interface to NXS Configuration Tango Server. It allows one to read XML configuration datasources and components. It also gives possibility to perform the process of component merging.

  Synopsis

nxsconfig <command> [-s <config_server>]  [-d] [-r] [-m] [-n] [-p] [<name1>] [<name2>] [<name3>] ...

Commands:

list [-s <config_server>] [-m] [-p] [-n]
    list names of available components

list -d [-s <config_server>] [-n]
    list names of available datasources

list -r [-s <config_server>] [-n]
    list names of available profiles

show [-s <config_server>] [-m] [-o <dir>] component_name1 component_name2 …
    show components with given names

show -d [-s <config_server>] [-o <dir>] dsource_name1 dsource_name2 …
    show datasources with given names

show -r [-s <config_server>] [-o <dir>] profile_name1 profile_name2 …
    show profiles with given names

upload [-s <config_server>] [-m] [-i <dir>] [-f] component_name1 component_name2 …
    load components from given files

upload -d [-s <config_server>] [-i <dir>] [-f] dsource_name1 dsource_name2 …
    load datasources from given files

upload -r [-s <config_server>] [-i <dir>] [-f] profile_name1 profile_name2 …
    load profiles from given files

get [-s <config_server>] [-n] component_name1 component_name2 …
    get merged configuration of components

delete [-s <config_server>] [-f] component_name1 component_name2 …
    delete components with given names

delete -d [-s <config_server>] [-f] dsource_name1 dsource_name2 …
    delete datasources with given names

delete -r [-s <config_server>] [-f] profile_name1 profile_name2 …
    delete profiles with given names

sources [-s <config_server>] [-m] [-n] component_name1 component_name2 …
    get a list of component datasources

components [-s <config_server>] [-n] component_name1 component_name2 …
    get a list of dependent components

variables [-s <config_server>] [-m] [-n] component_name1 component_name2 …
    get a list of component variables

data [-s <config_server>] json_data
    set values of component variables

record [-s <config_server>] [-n] component_name1
    get a list of datasource record names from component

record -d [-s <config_server>] [-n] datasource_name1
    get a list of datasource record names

servers [-s <config_server/host>] [-n]
    get lists of configuration servers from the current tango host

describe [-s <config_server>] [-m | -p] [-n] component_name1 component_name2 …
    show all parameters of given components

describe|info -d [-s <config_server>] [-n] dsource_name1 dsource_name2 …
    show all parameters of given datasources

info [-s <config_server>] [-m | -p] [-n] component_name1 component_name2 …
    show source parameters of given components

info -r [-s <config_server>] [-n] profile_name1 profile_name2 …
    show general parameters of given profiles

geometry [-s <config_server>] [-m | -p] [-n] component_name1 component_name2 …
    show transformation parameters of given components

Options:

-h, --help
    show this help message and exit

-s SERVER, --server=SERVER
    configuration server device name

-d, --datasources
    perform operation on datasources

-m, --mandatory
    make use mandatory components as well

-p, --private
    make use private components, i.e. starting with ‘__’

-n, --no-newlines
    split result with space characters

-f, --force
    do not ask

  Example

nxsconfig list -s p02/xmlconfigserver/exp.01 -d
nxsconfig info
nxsconfig geometry

NXSCREATE

  Description

The nxscreate program allows one to create simple datasources and components.

  Synopsis

nxscreate  <command> [ <options>]  [<arg1> [<arg2>  ...]]

The following commands are available: clientds, tangods, deviceds, onlineds, onlinecp, comp.

  nxscreate clientds

It creates a set of CLIENT datasources.

  Synopsis

nxscreate clientds [options] [name1] [name2]

•   with -b: datasources are created in Configuration Server database

•   without -b: datasources are created on the local filesystem in -d <directory>

•   default <directory> is ‘.’

•   default <server> is taken from Tango DB

Options:

-h, --help
    show this help message and exit

-v DEVICE, --device-prefix=DEVICE
    device prefix, i.e. exp_c (mandatory w/o <name1>)

-f FIRST, --first=FIRST
    first index (mandatory w/o <name1>)

-l LAST, --last=LAST
    last index (mandatory w/o <name1>)

-o, --overwrite
    overwrite existing datasources

-d DIRECTORY, --directory=DIRECTORY
    output datasource directory

-x FILE, --file-prefix=FILE
    file prefix, i.e. counter

-s DSOURCE, --datasource-prefix=DSOURCE
    datasource prefix, i.e. counter (useful for avoiding duplicated datasource names)

-b, --database
    store datasources in Configuration Server database

-m, --minimal_device
    device name without first ‘0’

-r SERVER, --server=SERVER
    configuration server device name

  Example

nxscreate clientds starttime -b
nxscreate clientds title -d /home/user/xmldir
nxscreate clientds -v exp_c -f1 -l4 -b
nxscreate clientds -v hasppXX:10000/expchan/vfcadc_exp/ -f1 -l8  -m -b -s exp_vfc

  nxscreate tangods

It creates a set of TANGO datasources.

  Synopsis

nxscreate tangods [options]

•   with -b: datasources are created in Configuration Server database

•   without -b: datasources are created on the local filesystem in -d <directory>

•   default <directory> is ‘.’

•   default <server> is taken from Tango DB

•   default <datasource> is ‘exp_mot’

•   default <host>, <port> are taken from <server>

Options:

-h, --help
    show this help message and exit

-v DEVICE, --device-prefix=DEVICE
    device prefix, i.e. exp_c (mandatory)

-f FIRST, --first=FIRST
    first index

-l LAST, --last=LAST
    last index

-a ATTRIBUTE, --attribute=ATTRIBUTE
    tango attribute name

-s DATASOURCE, --datasource-prefix=DATASOURCE
    datasource-prefix (useful for avoiding duplicated datasource names)

-o, --overwrite
    overwrite existing datasources

-d DIRECTORY, --directory=DIRECTORY
    output datasource directory

-x FILE, --file-prefix=FILE
    file prefix, i.e. counter

-u HOST, --host=HOST
    tango host name

-t PORT, --port=PORT
    tango host port

-b, --database
    store datasources in Configuration Server database

-g GROUP, --group=GROUP
    device group name

-e ELEMENTTYPE, --elementtype=ELEMENTTYPE
    element type, i.e. attribute, property or command

-r SERVER, --server=SERVER
    configuration server device name

  Example

nxscreate tangods -f1 -l2  -v p09/motor/exp. -s exp_mot
nxscreate tangods -f1 -l32  -v p02/motor/eh1a. -s exp_mot -b
nxscreate tangods -f1 -l32  -v p01/motor/oh1. -s exp_mot -b
nxscreate tangods -f1 -l8  -v pXX/slt/exp. -s slt_exp_ -u hasppXX.desy.de -b
nxscreate tangods -v petra/globals/keyword -s source_current -u haso228 -t 10000 \
                  -a BeamCurrent -b -r p09/nxsconfigserver/haso228 -o -g __CLIENT__

  nxscreate deviceds

It creates a set of TANGO datasources for all device attributes.

  Synopsis

nxscreate deviceds [options] [dv_attr1 [dv_attr2 [dv_attr3 ...]]]

•   without <dv_attr1>: datasources for all attributes are created

•   with -b: datasources are created in Configuration Server database

•   without -b: datasources are created on the local filesystem in -d <directory>

•   default <directory> is ‘.’

•   default <server> is taken from Tango DB

•   default <datasource> is ‘exp_mot’

•   default <host>, <port> are taken from <server>

Options:

-h, --help
    show this help message and exit

-v DEVICE, --device=DEVICE
    device, i.e. p09/pilatus300k/01 (mandatory)

-o DATASOURCE, --datasource-prefix=DATASOURCE
    datasource-prefix

-d DIRECTORY, --directory=DIRECTORY
    output datasource directory

-x FILE, --file-prefix=FILE
    file prefix, i.e. counter

-s HOST, --host=HOST
    tango host name

-t PORT, --port=PORT
    tango host port

-b, --database
    store datasources in Configuration Server database

-n, --no-group
    don’t create common group with a name of datasource prefix

-r SERVER, --server=SERVER
    configuration server device name

  Example

nxscreate deviceds  -v p09/pilatus/haso228k
nxscreate deviceds  -v p09/lambda2m/haso228k  -s haslambda -b
nxscreate deviceds  -v p09/pilatus300k/haso228k -b -o pilatus300k_ RoI Energy ExposureTime

  nxscreate onlineds

It creates a set of motor datasources from an online xml file.

  Synopsis

nxscreate onlineds [options] inputFile

•   with -b: datasources are created in Configuration Server database

•   with -d <directory>: datasources are created on the local filesystem

•   without -b or -d <directory>: run in the test mode

•   default <inputFile> is ‘/online_dir/online.xml’

•   default <server> is taken from Tango DB

    onlineds overwrites existing datasources

Options:

-h, --help
    show this help message and exit

-b, --database
    store components in Configuration Server database

-t, --noclientlike
    set motor tango datasources to be non __CLIENT__ like

-d DIRECTORY, --directory=DIRECTORY
    output directory where datasources will be saved

-n, --nolower
    do not change aliases into lower case

-r SERVER, --server=SERVER
    configuration server device name

-x FILE, --file-prefix=FILE
    file prefix, i.e. counter

-e EXTERNAL, --external=EXTERNAL
    external configuration server

-p XMLPACKAGE, --xml-package=XMLPACKAGE
    xml template package

--verbose
    printout verbose mode

  Example

nxscreate onlineds -b
nxscreate onlineds -b -t
nxscreate onlineds -d /home/user/xmldir
nxscreate onlineds

  nxscreate poolds

It creates a set of motor datasources from a sardana pool device channels.

  Synopsis

nxscreate onlineds [options] [channel [channel]]

•   with -b: datasources are created in Configuration Server database

•   with -d <directory>: datasources are created on the local filesystem

•   without -b or -d <directory>: run in the test mode

•   default <channel> is ‘ALL’

•   default <server> is taken from Tango DB

•   default <pool> is taken from Tango DB

    poolds overwrites existing datasources

Options:

-h, --help
    show this help message and exit

-b, --database
    store components in Configuration Server database

-t, --noclientlike
    set motor tango datasources to be non __CLIENT__ like

-d DIRECTORY, --directory=DIRECTORY
    output directory where datasources will be saved

-n, --nolower
    do not change aliases into lower case

-r SERVER, --server=SERVER
    configuration server device name

-x FILE, --file-prefix=FILE
    file prefix, i.e. counter

-p POOL, --pool=POOL
    sardana pool device name

  Example

nxscreate poolds -b
nxscreate poolds -b -t
nxscreate poolds -d -s p09/pool/haso228
nxscreate poolds -b Motor CTExpChannel
nxscreate poolds -b mot01 mot03
nxscreate poolds

  nxscreate onlinecp

It creates a detector component from the online.xml file and its set of datasources.

  Synopsis

nxscreate onlinecp [options] inputFile

•   without ‘-c <component>’: show a list of possible components

•   with -b: datasources are created in Configuration Server database

•   without -b: datasources are created on the local filesystem in -d <directory>

•   default <directory> is ‘.’

•   default <inputFile> is ‘/online_dir/online.xml’

•   default <server> is taken from Tango DB

Options:

-h, --help
    show this help message and exit

-c COMPONENT, --component=COMPONENT
    component namerelated to the device name from <inputFile>

-r SERVER, --server=SERVER
    configuration server device name

-t CPTYPE, --type CPTYPE
    component type

-v DEVICE, --device DEVICE
    device, i.e. p09/pilatus300k/01

-u HOST, --host HOST
    tango host name

-w PORT, --port PORT
    tango host port

-n, --nolower
    do not change aliases into lower case

-o, --overwrite
    overwrite existing component

-b, --database
    store datasources in Configuration Server database

-d DIRECTORY, --directory=DIRECTORY
    output datasource directory

-x FILE, --file-prefix=FILE
    file prefix, i.e. counter

-e EXTERNAL, --external=EXTERNAL
    external configuration server

-p XMLPACKAGE, --xml-package=XMLPACKAGE
    xml template package

-y ENTRYNAME, --entryname ENTRYNAME
    entry group name (prefix)

-i INSNAME, --insname INSNAME
    instrument group name

  Example

nxscreate onlinecp
nxscreate onlinecp -c lambda
nxscreate onlinecp -c pilatus -b
nxscreate onlinecp -c lambda -d /home/user/xmldir/
nxscreate onlinecp -c lmbd -t lambda -b
nxscreate onlinecp -c lmbd -t lambda -v p00/lmbd/1 -u haso000 -w 10000 -b

  nxscreate stdcomp

It creates a standard component from the xml template files and its set of datasources.

  Synopsis

nxscreate stdcomp [options] [name1 value1 [name2 value2] ...]

•   without ‘-t <type>’: show a list of possible component types

•   with ‘-t <type> and without -c <component>: show a list of component variables for the given component type

•   with -b: datasources are created in Configuration Server database

•   without -b: datasources are created on the local filesystem in -d <directory>

•   default <directory> is ‘.’

•   [name1 value1 [name2 value2] …] sequence defines component variable values

Options:

-h, --help
    show this help message and exit

-c COMPONENT, --component=COMPONENT
    component name

-t CPTYPE, --type=CPTYPE
    component type

-r SERVER, --server=SERVER
    configuration server device name

-p XMLPACKAGE, --xml-package=XMLPACKAGE
    xml template package

-n, --nolower
    do not change aliases into lower case

-o, --overwrite
    overwrite existing component

-m, --mandatory
    set the component as mandatory

-b, --database
    store datasources in Configuration Server database

-d DIRECTORY, --directory=DIRECTORY
    output datasource directory

-e EXTERNAL, --external=EXTERNAL
    external configuration server

-x FILE, --file-prefix=FILE
    file prefix, i.e. counter

-y ENTRYNAME, --entryname ENTRYNAME
    entry group name (prefix)

  Example

nxscreate stdcomp
nxscreate stdcomp -t source
nxscreate stdcomp -t slit -c -b front_slit1 xgap slt1x ygap slt1y
nxscreate stdcomp -t default -c default -b -m

  nxscreate comp

It creates a set of simple components.

  Synopsis

nxscreate comp [options] [name1] [name2] ...

•   with -b: datasources are created in Configuration Server database

•   without -b: datasources are created on the local filesystem in -d <directory>

•   default <directory> is ‘.’

•   default <server> is taken from Tango DB

•   default <strategy> is step

•   default <type> is NX_FLOAT

•   default <chunk> is SCALAR

•   default <nexuspath> is “/$var.entryname#’scan’$var.serialno:NXentry/instrument/collection/”

Options:

-h, --help
    show this help message and exit

-v DEVICE, --device-prefix=DEVICE
    device prefix, i.e. exp_c

-f FIRST, --first=FIRST
    first index

-l LAST, --last=LAST
    last index

-o, --overwrite
    overwrite existing components

-d DIRECTORY, --directory=DIRECTORY
    output component directory

-x FILE, --file-prefix=FILE
    file prefix, i.e. counter

-n NEXUSPATH, --nexuspath=NEXUSPATH
    nexus path with field name

-g STRATEGY, --strategy=STRATEGY
    writing strategy, i.e. STEP, INIT, FINAL, POSTRUN

-s DATASOURCE, --datasource-prefix DATASOURCE
    datasource-prefix or datasourcename

-t TYPE, --type=TYPE
    nexus type of the field

-u UNITS, --units=UNITS
    nexus units of the field

-k, --links
    create datasource links

-b, --database
    store components in Configuration Server database

-r SERVER, --server=SERVER
    configuration server device name

-c CHUNK, --chunk=CHUNK
    chunk format, i.e. SCALAR, SPECTRUM, IMAGE

-m, --minimal_device
    device name without first ‘0’

  Example

nxscreate comp counter
nxscreate comp -f1 -l3 -v exp_c -b
nxscreate comp lambda -d /home/user/xmldir/
nxscreate comp -n "/\$var.entryname#'scan'\$var.serialno:NXentry/instrument/sis3302:NXdetector/collection:NXcollection/' -v sis3302_1_roi -f1 -l4  -g STEP -t NX_FLOAT64 -k -b -m
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

  nxscreate compare

It compares two online.xml files

  Synopsis

nxscreate compare [-h] [-n] online_file [online_file]

•   default: second <online_file> is ‘/online_dir/online.xml’ if only file is given

positional arguments:
    online_file online.xml files

optional arguments:

-h, --help
    show this help message and exit

-n, --nolower
    do not change aliases into lower case

  Example

nxscreate onlineds /online_dir/online.xml online.xml
nxscreate compare online.xml

NXSDATA

  Description

The nxsdata program is a command-line interface to Nexus Data Tango Server. Program allows one to store NeXuS Data in H5 files. The writer provides storing data from other Tango devices, various databases as well as passed by a user client via JSON strings.

  Synopsis

nxsdata <command> [-s <nexus_server>]  [<arg1> [<arg2>  ...]]

Commands:

openfile [-s <nexus_server>] <file_name>
    open new H5 file

setdata [-s <nexus_server>] <json_data_string>
    assign global JSON data

openentry [-s <nexus_server>] <xml_config>
    create new entry

record [-s <nexus_server>] <json_data_string>
    record one step with step JSON data

closeentry [-s <nexus_server>]
    close the current entry

closefile [-s <nexus_server>]
    close the current file

servers [-s <nexus_server/host>]
    get lists of tango data servers from the current tango host

Options:

-h, --help
    show this help message and exit

-s SERVER, --server=SERVER
    tango data server device name

  Example

nxsdata openfile -s p02/tangodataserver/exp.01  /user/data/myfile.h5

NXSFILEINFO

  Description

The nxsfileinfo program show metadata from nexus files

  Synopsis

nxsfileinfo <command> [options] <nexus_file_name>

The following commands are available: general, field

  nxsfileinfo general

It shows general information for he nexus file.

  Synopsis

nxsfileinfo general <nexus_file_name>

Options:

-h, --help
    show this help message and exit

--h5py
    use h5py module as a nexus reader

--h5cpp
    use h5cpp module as a nexus reader

  Example

nxsfileinfo general saxs_ref1_02.nxs

  nxsfileinfo field

It shows field information for the nexus file.

  Synopsis

Usage: nxsfileinfo field <file_name>

Options:

-h, --help
    show this help message and exit

-c HEADERS, --columns=HEADERS
    names of column to be shown (separated by commas without spaces). The possible names are: depends_on, dtype, full_path, nexus_path, nexus_type, shape, source, source_name, source_type, strategy, trans_type, trans_offset, trans_vector, units, value

-f FILTERS, --filters=FILTERS
    full_path filters (separated by commas without spaces). Default: ‘*’. E.g. ‘:NXsample/’

-v VALUES, --values=VALUES
    field names which value should be stored (separated by commas without spaces). Default: depends_on

-g, --geometry
    show fields with geometry full_path filters, i.e. :NXtransformations/,*/depends_on. It works only when -f is not defined

-s, --source
    show datasource parameters

--h5py
    use h5py module as a nexus reader

  Example

nxsfileinfo field /tmp/saxs_ref1_02.nxs

NXSETUP

  Description

The nxsetup is is a command-line setup tool for NeXus servers. It allows to set NXSDataWriter, NXSConfigServer and NXSRecSelector in Tango environment, restart them or change property names.

  Synopsis

nxscreate  <command> [ <options>]  [<arg1> [<arg2>  ...]]

The following commands are available: set, restart, start, stop, move-prop, change-prop, add-recorder-path

  nxsetup set

usage: nxsetup set [-h] [-b BEAMLINE] [-m MASTERHOST] [-u USER] [-d DBNAME]
                   [-j CSJSON]
                   [server_name [server_name ...]]
set up NXSConfigServer NXSDataWriter and NXSRecSelector servers
positional arguments:
  server_name           server names, e.g.: NXSRecSelector NXSDataWriter/TDW1
optional arguments:
  -h, --help            show this help message and exit
  -b BEAMLINE, --beamline BEAMLINE
                        name of the beamline ( default: 'nxs' )
  -m MASTERHOST, --masterHost MASTERHOST
                        the host that stores the Mg ( default: <localhost> )
  -u USER, --user USER  the local user ( default: 'tango' )
  -d DBNAME, --database DBNAME
                        the database name ( default: 'nxsconfig')
  -j CSJSON, --csjson CSJSON
                        JSONSettings for the configuration server. ( default:
                        '{"host": "localhost","db": <DBNAME>, "use_unicode":
                        true', "read_default_file": <MY_CNF_FILE>}' where
                        <MY_CNF_FILE> stays for "/home/<USER>/.my.cnf" or
                        "/var/lib/nxsconfigserver/.my.cnf" )
 examples:
       nxsetup set
       nxsetup set -b p09 -m haso228 -u p09user -d nxsconfig NXSConfigServer

  nxsetup restart

usage: nxsetup restart [-h] [-l LEVEL] [server_name [server_name ...]]
restart tango server
positional arguments:
  server_name           server names, e.g.: NXSRecSelector NXSDataWriter/TDW1
optional arguments:
  -h, --help            show this help message and exit
  -l LEVEL, --level LEVEL
                        startup level
 examples:
       nxsetup restart Pool/haso228 -l 2

  nxsetup start

usage: nxsetup start [-h] [-l LEVEL] [server_name [server_name ...]]
start tango server
positional arguments:
  server_name           server names, e.g.: NXSRecSelector NXSDataWriter/TDW1
optional arguments:
  -h, --help            show this help message and exit
  -l LEVEL, --level LEVEL
                        startup level
 examples:
       nxsetup start Pool/haso228 -l 2

  nxsetup stop

usage: nxsetup stop [-h] [server_name [server_name ...]]
stop tango server
positional arguments:
  server_name           server names, e.g.: NXSRecSelector NXSDataWriter/TDW1
optional arguments:
  -h, --help            show this help message and exit
 examples:
       nxsetup stop Pool/haso228

  nxsetup move-prop

usage: nxsetup move-prop [-h] [-n NEWNAME] [-o OLDNAME]
                         [server_name [server_name ...]]
change property name
positional arguments:
  server_name           server names, e.g.: NXSRecSelector NXSDataWriter/TDW1
optional arguments:
  -h, --help            show this help message and exit
  -n NEWNAME, --newname NEWNAME
                        (new) property name
  -o OLDNAME, --oldname OLDNAME
                        old property name
  -t, --postpone        do not restart the server
 examples:
       nxsetup move-prop -n DefaultPreselectedComponents -o DefaultAutomaticComponents NXSRecSelector
       nxsetup move-prop -t -n DefaultPreselectedComponents  -o DefaultAutomaticComponents NXSRecSelector

  nxsetup change-prop

usage: nxsetup change-prop [-h] [-n NEWNAME] [-w PROPVALUE]
                           [server_name [server_name ...]]
change property value
positional arguments:
  server_name           server names, e.g.: NXSRecSelector NXSDataWriter/TDW1
optional arguments:
  -h, --help            show this help message and exit
  -n NEWNAME, --newname NEWNAME
                        (new) property name
  -w PROPVALUE, --propvalue PROPVALUE
                        new property value
  -t, --postpone        do not restart the server
 examples:
       nxsetup change-prop -n ClientRecordKeys -t -w "[\"phoibos_scan_command\",\"phoibos_scan_comment\"]" NXSRecSelector/r228
       nxsetup change-prop -n DefaultPreselectedComponents -w "[\"pinhole1\",\"slit2\"]" NXSRecSelector/r228
       nxsetup change-prop -n StartDsPath -w "[\"/usr/bin\",\"/usr/lib/tango\"]" Starter

  nxsetup add-recorder-path

usage: nxsetup add-recorder-path [-h] recorder_path
add-recorder-path into MacroServer(s) property
positional arguments:
  recorder_path  sardana recorder path
optional arguments:
  -h, --help     show this help message and exit
  -t, --postpone  do not restart the server
 examples:
       nxsetup add-recorder-path /usr/share/pyshared/sardananxsrecorder
       nxsetup add-recorder-path -t /usr/share/pyshared/sardananxsrecorder

NXSTOOLS PACKAGE

  Submodules

  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)
    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)
    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)
    Bases: nxstools.nxsargparser.Runner

    Execute runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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()
    creates parser

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscollect.LayoutField(target, hyperslab=None)
    Bases: object

    constructor

Parameters

•   hyperslab (filewriter.FTHyperslab) – target field object

•   hyperslab – field hyperslab or slices

hyperslab = None
    filewriter.FTHyperslab layout hyperslab or slices

shape = None
    tuple vds shape in layout

slices = None
    list <slice>

target = None
    TargetFieldView target field object

class nxstools.nxscollect.Link(parser)
    Bases: nxstools.nxsargparser.Runner

    Execute runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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()
    creates parser

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscollect.Linker(nexusfilepath, target, name=None, storeold=False, testmode=False, writer=None)
    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

link()
    creates NeXus link

class nxstools.nxscollect.TargetFieldView(filename, path, shape=None, hyperslab=None, maxshape=None)
    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 = None
    str file name

hyperslab = None
    filewriter.FTHyperslab field hyperslab or slices

maxshape = None
    list <int> field maximal shape

path = None
    str nexus field path with its name

shape = None
    list <int> field shape

slices = None
    list <slice>

class nxstools.nxscollect.TargetFieldsLayout(exfieldpaths='', exfieldshapes='', shapes=None, separator=', ')
    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)
    add layout hyperslabs

Parameters

•   offsets (str) – layout offsets

•   blocks (str) – layout blocks

•   counts (str) – layout counts

•   strides (str) – layout strides

add_layout_slices(slices)
    add layout slices

Parameters
    slices (str) – layout slices

add_target_hyperslabs(offsets, blocks, counts, strides)
    add target hyperslabs

Parameters

•   offsets (str) – target offsets

•   blocks (str) – target blocks

•   counts (str) – target counts

•   strides (str) – target strides

add_target_slices(slices)
    add taget slices

Parameters
    slices (str) – target slices

class nxstools.nxscollect.VDS(parser)
    Bases: nxstools.nxsargparser.Runner

    Execute runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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()
    creates parser

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscollect.VirtualDataset(nexusfilepath, options, writer=None)
    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()
    creates VDS

nxstools.nxscollect.crdtoint(crd)
    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)
    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)

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()
    the main program function

nxstools.nxscollect.splitcoords(crdstr)
    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)
    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)
    Bases: nxstools.nxsargparser.Runner

    Components runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.ConfigServer(device, nonewline=False)
    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 = None
    (str) spliting character

componentsCmd(components)
    lists components of the components

Parameters
    components (list <str>) – given components

Returns
    list of component names

Return type
    list <str>

dataCmd(args)
    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)
    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)
    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)
    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)
    provides final configuration

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

Returns
    XML configuration string

Return type
    str

infoCmd(ds, args, md, pr, profiles)
    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)
    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)
    provides merged components

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

Returns
    XML configuration string with merged components

Return type
    str

recordCmd(ds, name)
    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)
    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)
    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)
    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)
    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)
    Bases: nxstools.nxsargparser.Runner

    Data runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Delete(parser)
    Bases: nxstools.nxsargparser.Runner

    Show runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Describe(parser)
    Bases: nxstools.nxsargparser.Runner

    Describe runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Geometry(parser)
    Bases: nxstools.nxsargparser.Runner

    List runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    creates parser

description = 'show transformation parameters of given components or datasources'
    (str) command description

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

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Get(parser)
    Bases: nxstools.nxsargparser.Runner

    Get runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Info(parser)
    Bases: nxstools.nxsargparser.Runner

    List runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.List(parser)
    Bases: nxstools.nxsargparser.Runner

    List runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Merge(parser)
    Bases: nxstools.nxsargparser.Runner

    Merge runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Record(parser)
    Bases: nxstools.nxsargparser.Runner

    Record runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Servers(parser)
    Bases: nxstools.nxsargparser.Runner

    Servers runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Show(parser)
    Bases: nxstools.nxsargparser.Runner

    Show runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Sources(parser)
    Bases: nxstools.nxsargparser.Runner

    Sources runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Upload(parser)
    Bases: nxstools.nxsargparser.Runner

    Store runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Variables(parser)
    Bases: nxstools.nxsargparser.Runner

    Variables runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

nxstools.nxsconfig.main()
    the main program function

  nxstools.nxscreate module

Command-line tool for creating NXSConfigServer configuration of Nexus Files

class nxstools.nxscreate.ClientDS(parser)
    Bases: nxstools.nxsargparser.Runner

    clientds runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscreate.Comp(parser)
    Bases: nxstools.nxsargparser.Runner

    comp runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscreate.Compare(parser)
    Bases: nxstools.nxsargparser.Runner

    compare runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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()
    creates parser

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscreate.DeviceDS(parser)
    Bases: nxstools.nxsargparser.Runner

    deviceds runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscreate.OnlineCP(parser)
    Bases: nxstools.nxsargparser.Runner

    onlinecp runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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()
    creates parser

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscreate.OnlineDS(parser)
    Bases: nxstools.nxsargparser.Runner

    onlineds runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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()
    creates parser

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

nxstools.nxscreate.PYTANGO = True
    (bool) True if PyTango available

class nxstools.nxscreate.PoolDS(parser)
    Bases: nxstools.nxsargparser.Runner

    poolds runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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()
    creates parser

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscreate.StdComp(parser)
    Bases: nxstools.nxsargparser.Runner

    stdcomp runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxscreate.TangoDS(parser)
    Bases: nxstools.nxsargparser.Runner

    tangods runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

nxstools.nxscreate.main()
    the main program function

  nxstools.nxsdata module

Command-line tool to ascess to Tango Data Server

class nxstools.nxsdata.CloseEntry(parser)
    Bases: nxstools.nxsargparser.Runner

    CloseEntry runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    creates parser

description = 'close the current entry'
    (str) command description

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

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.CloseFile(parser)
    Bases: nxstools.nxsargparser.Runner

    CloseFile runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    creates parser

description = 'close the current file'
    (str) command description

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

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.NexusServer(device)
    Bases: object

    configuration server adapter

    constructor

Parameters
    device (str) – device name of configuration server

closeEntry()
    closes the entry

closeFile()
    closes the file

openEntry(xmlconfig)
    opens an entry

Parameters
    xmlconfig (str) – xml configuration string

openFile(filename)
    opens the h5 file

Parameters
    filename (str) – h5 file name

record(jsondata)
    records one step

Parameters
    jsondata (str) – step JSON data

setData(jsondata)
    sets the global JSON data

Parameters
    jsondata (str) – global JSON data

tdwServer = None
    (PyTango.DeviceProxy) NeXus writer device proxy

class nxstools.nxsdata.OpenEntry(parser)
    Bases: nxstools.nxsargparser.Runner

    OpenEntry runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    creates parser

description = 'create new entry'
    (str) command description

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

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.OpenFile(parser)
    Bases: nxstools.nxsargparser.Runner

    OpenFile runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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'

postauto()
    parser creator after autocomplete run

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.Record(parser)
    Bases: nxstools.nxsargparser.Runner

    Record runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    creates parser

description = 'record one step with step JSON data'
    (str) command description

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

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.Servers(parser)
    Bases: nxstools.nxsargparser.Runner

    Servers runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    creates parser

description = 'get lists of tango data servers from the current tango host'
    (str) command description

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

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.SetData(parser)
    Bases: nxstools.nxsargparser.Runner

    SetData runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    creates parser

description = 'assign global JSON data'
    (str) command description

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

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

nxstools.nxsdata.main()
    the main program function

  nxstools.nxsetup module

Set Up NeXus Tango Servers

class nxstools.nxsetup.AddRecorderPath(parser)
    Bases: nxstools.nxsargparser.Runner

    add-recorder-path runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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()
    creates parser

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxsetup.ChangeProp(parser)
    Bases: nxstools.nxsargparser.Runner

    change-prop runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxsetup.MoveProp(parser)
    Bases: nxstools.nxsargparser.Runner

    move-prop runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxsetup.Restart(parser)
    Bases: nxstools.nxsargparser.Runner

    restart runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxsetup.Set(parser)
    Bases: nxstools.nxsargparser.Runner

    set runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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\n'
    (str) command epilog

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxsetup.SetUp
    Bases: object

    setup NXSDataWriter, NXSConfigServer and NXSRecSelector Tango servers

    constructor

changePropertyName(server, oldname, newname, sclass=None)
    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)
    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)
    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)
    creates configuration server

Parameters

•   beamline (str) – beamline name

•   masterhost (str) – master host of data writer

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

Returns
    True if server was created

Return type
    bool

createDataWriter(beamline, masterhost)
    creates data writer

Parameters

•   beamline (str) – beamline name

•   masterhost (str) – master host of data writer

Returns
    True if server was created

Return type
    bool

createSelector(beamline, masterhost, writer=None, cserver=None)
    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

Returns
    True if server was created

Return type
    bool

cserver_name = None
    (str) NeXus config server device name

db = None
    (PyTango.Database) tango database server

getStarterName(host)
    restarts server

Parameters
    host (str) – server host name

Returns
    starter device name

Return type
    str

restartServer(name, host=None, level=None, restart=True)
    restarts server

Parameters

•   name (str) – server name

•   host (str) – server host name

•   level (int) – start up level

•   restart (bool) – if server should be restarted

stopServer(name, host=None)
    restarts server

Parameters

•   name (str) – server name

•   host (str) – server host name

waitServerNotRunning(server=None, device=None, adminproxy=None, maxcnt=1000, verbose=True, waitforproc=True)
    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=1000, verbose=True, waitforproc=True)
    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 = None
    (str) NeXus writer device name

class nxstools.nxsetup.Start(parser)
    Bases: nxstools.nxsargparser.Runner

    start runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

class nxstools.nxsetup.Stop(parser)
    Bases: nxstools.nxsargparser.Runner

    Stop runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    creates parser

description = 'stop tango server'
    (str) command description

epilog = ' examples:\n nxsetup stop Pool/haso228 \n\n'
    (str) command epilog

run(options)
    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': 'p02', 'dbname': 'nxsconfig', 'masterhost': 'haspp021ch1a', 'user': 'p021user'}, 'haspp021jenkins': {'beamline': 'p021', 'dbname': 'nxsconfig', 'masterhost': 'haspp021jenkins', 'user': 'p021user'}, 'haspp022ch': {'beamline': 'p022', 'dbname': 'nxsconfig', 'masterhost': 'haspp022ch', '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()
    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)
    Bases: nxstools.nxscreator.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 = None
    (dict <str, str >) component xml dictionary

create()
    creates components of all online.xml complex devices

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

datasources = None
    (dict <str, str >) datasource xml dictionary

xmlpackage = None
    (str) xml template component package

xmltemplatepath = None
    (str) xml template component package path

exception nxstools.nxscreator.CPExistsException
    Bases: Exception

    Component already exists exception

class nxstools.nxscreator.ClientDSCreator(options, args, printouts=True)
    Bases: nxstools.nxscreator.Creator

    client datasource creator

    constructor

Parameters

•   options (optparse.Values) – command options

•   args (list < str >) – command arguments

•   printouts (bool) – if printout is enable

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

class nxstools.nxscreator.CompareOnlineDS(options, args, printouts=True)
    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 = None
    (list < str >) creator arguments

compare()

options = None
    (optparse.Values) creator options

class nxstools.nxscreator.ComponentCreator(options, args, printouts=True)
    Bases: nxstools.nxscreator.Creator

    component creator

    constructor

Parameters

•   options (optparse.Values) – command options

•   args (list < str >) – command arguments

•   printouts (bool) – if printout is enable

create()
    creates a component xml and stores it in DB or filesytem

class nxstools.nxscreator.Creator(options, args, printouts=True)
    Bases: object

    configuration server adapter

    constructor

Parameters

•   options (optparse.Values) – command options

•   args (list < str >) – command arguments

•   printouts (bool) – if printout is enable

args = None
    (list < str >) creator arguments

options = None
    (optparse.Values) creator options

exception nxstools.nxscreator.DSExistsException
    Bases: Exception

    DataSource already exists exception

class nxstools.nxscreator.Device
    Bases: object

    device from online.xml

attribute
    (str) attribute name

compare(dv)

dtype
    (str) device type

findAttribute(tangohost, clientlike=False)
    sets attribute and datasource group of online.xml device

Parameters

•   tangohost (str) – tango host

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

findDevice(tangohost)
    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)
    sets sardana name

Parameters
    tolower (bool) – If True name in lowercase

shost
    (str) sardana host without port

splitHostPort()
    spilts host name from port

sport
    (str) sardana tango port

tdevice
    (str) tango device name

thost
    (str) tango host without port

tolower()
    converts name, module, tdevice, hostname into lower case

tport
    (str) tango port

class nxstools.nxscreator.DeviceDSCreator(options, args, printouts=True)
    Bases: nxstools.nxscreator.Creator

    device datasource creator

    constructor

Parameters

•   options (optparse.Values) – command options

•   args (list < str >) – command arguments

•   printouts (bool) – if printout is enable

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

class nxstools.nxscreator.OnlineCPCreator(options, args, printouts=True)
    Bases: nxstools.nxscreator.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()
    creates component xmls of all online.xml complex devices

listcomponents()
    provides a list of components with xml templates

Returns
    list of components with xml templates

Return type
    list <str >

listcomponenttypes()
    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)
    Bases: nxstools.nxscreator.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()
    creates datasources of all online.xml simple devices

createXMLs()
    creates datasource xmls of all online.xml simple devices

datasources = None
    (dict <str, str >) datasource xml dictionary

xmlpackage = None
    (str) xml template component package

xmltemplatepath = None
    (str) xml template component package path

nxstools.nxscreator.PYTANGO = True
    (bool) True if PyTango available

class nxstools.nxscreator.PoolDSCreator(options, args, printouts=True)
    Bases: nxstools.nxscreator.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()
    creates datasources of all online.xml simple devices

createXMLs()
    creates datasource xmls of all online.xml simple devices

datasources = None
    (dict <str, str >) datasource xml dictionary

class nxstools.nxscreator.StandardCPCreator(options, args, printouts=True)
    Bases: nxstools.nxscreator.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()
    creates component xmls of all online.xml complex devices

listcomponenttypes()
    provides a list of standard component types

Returns
    list of standard component types

Return type
    list <str>

listcomponentvariables()
    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)
    Bases: nxstools.nxscreator.Creator

    tango datasource creator

    constructor

Parameters

•   options (optparse.Values) – command options

•   args (list < str >) – command arguments

•   printouts (bool) – if printout is enable

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

exception nxstools.nxscreator.WrongParameterError
    Bases: Exception

    wrong parameter exception

  nxstools.nxsfileinfo module

Command-line tool for showing meta data from Nexus Files

class nxstools.nxsfileinfo.Field(parser)
    Bases: nxstools.nxsargparser.Runner

    Field runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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()
    parser creator after autocomplete run

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

show(root, options)
    the main function

Parameters

•   options (argparse.Namespace) – parser options

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

class nxstools.nxsfileinfo.General(parser)
    Bases: nxstools.nxsargparser.Runner

    General runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    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)
    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()
    parser creator after autocomplete run

run(options)
    the main program function

Parameters
    options (argparse.Namespace) – parser options

Returns
    output information

Return type
    str

show(root)
    show general informations

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

nxstools.nxsfileinfo.main()
    the main program function

  nxstools.nxsfileparser module

NeXus main metadata viewer

class nxstools.nxsfileparser.NXSFileParser(root)
    Bases: object

    Metadata parser for NeXus files

    constructor

Parameters
    root (filewriter.FTGroup) – nexus root node

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

classmethod getpath(path)
    converts full_path with NX_classes into nexus_path

Parameters
    path (str) – nexus full_path

parse()
    parses the file and creates the filtered description list

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

nxstools.nxsfileparser.getdsname(xmlstring)
    provides datasource name from datasource xml string

Parameters
    xmlstring (str) – datasource xml string

nxstools.nxsfileparser.getdssource(xmlstring)
    provides source from datasource xml string

Parameters
    xmlstring (str) – datasource xml string

nxstools.nxsfileparser.getdstype(xmlstring)
    provides datasource type from datasource xml string

Parameters
    xmlstring (str) – datasource xml string

  nxstools.nxsargparser module

NeXus tool argumen parser

exception nxstools.nxsargparser.ErrorException
    Bases: Exception

    error parser exception

class nxstools.nxsargparser.NXSArgParser(**kwargs)
    Bases: argparse.ArgumentParser

    Argument parser with error exception

    constructor

Parameters
    kwargs – argparse.ArgumentParser parameter dictionary

createSubParsers()
    creates command-line parameters parser

Returns
    command runner

Return type
    Runner

error(message)
    error handler

Parameters
    message (str) – error message

class nxstools.nxsargparser.Runner(parser)
    Bases: object

    abstract runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) – option parser

create()
    parser creator

description = 'abstract runner'
    (str) command description

epilog = None
    (str) command epilog

postauto()
    parser creator after autocomplete run

run(options)
    run commandthe main program function

Parameters
    options (argparse.Namespace) – parser options

  nxstools.nxsparser module

Command-line tool for ascess to the nexdatas configuration server

class nxstools.nxsparser.ESRFConverter
    Bases: object

    ESRF xml configuration converter

    constructor

convert(text)
    converts ESRF xml configuration to nxsdatawriter format

Parameters
    text (str) – input xml string

Returns
    output xml string

Return type
    str

class nxstools.nxsparser.ParserTools
    Bases: object

    configuration server adapter

classmethod getRecord(node)
    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)

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)
    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)
    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)
    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 parseLinks(xmlc)
    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)
    provides source record from xml string

Parameters
    xmlc (str) – xml string

Returns
    source record

Return type
    str

class nxstools.nxsparser.TableDictTools(description, nonone=None)
    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()
    generate row lists of table

Returns
    table rows

Return type
    list <str>

headers = None
    (list <str>) headers

title = None
    (str) table title

class nxstools.nxsparser.TableTools(description, nonone=None, headers=None, filters=None)
    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 = None
    (list <str>) filter list

generateList()
    generate row lists of table

Returns
    table rows

Return type
    list <str>

headers = None
    (list <str>) table headers

loadDescription(description)
    loads description

Parameters
    description (list <str>) – description list

title = None
    (str) table title

  nxstools.nxsxml module

Creator of XML configuration files

class nxstools.nxsxml.NAttr(parent, nameAttr, typeAttr='')
    Bases: nxstools.nxsxml.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)
    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)
    Bases: nxstools.nxsxml.NTag

    Source tag wrapper

    constructor

Parameters
    parent (NTag) – parent tag element

addDoc(doc)
    adds doc tag content

Parameters
    doc (str) – doc tag content

initClient(name, recordName)
    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)
    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)
    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)
    Bases: nxstools.nxsxml.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)
    Bases: nxstools.nxsxml.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)
    Bases: nxstools.nxsxml.NTag

    Dimensions tag wrapper

    constructor

Parameters

•   parent (NTag) – parent tag element

•   rankAttr (str) – rank attribute

dim(indexAttr, valueAttr)
    adds dim tag

Parameters

•   indexAttr (str) – index attribute

•   valueAttr (str) – value attribute

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

class nxstools.nxsxml.NField(parent, nameAttr, typeAttr='')
    Bases: nxstools.nxsxml.NTag

    Field tag wrapper

    constructor

Parameters

•   parent (NTag) – parent tag element

•   nameAttr (str) – name attribute

•   typeAttr (str) – type attribute

addAttr(attrName, attrType, attrValue='')
    adds attribute tag

Parameters

•   attrName (str) – name attribute

•   attrType (str) – type attribute

•   attrValue (str) – content of the attribute tag

addDoc(doc)
    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)
    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)
    sets the field unit

Parameters
    unitsAttr (str) – the field unit

class nxstools.nxsxml.NGroup(parent, nameAttr, typeAttr='')
    Bases: nxstools.nxsxml.NTag

    Group tag wrapper

    constructor

Parameters

•   parent (NTag) – parent tag element

•   nameAttr (str) – name attribute

•   typeAttr (str) – type attribute

addAttr(attrName, attrType, attrValue='')
    adds attribute: tag

Parameters

•   attrName (str) – name attribute

•   attrType (str) – type attribute

•   attrValue (str) – content of the attribute tag

addDoc(doc)
    adds doc tag content

Parameters
    doc (str) – doc tag content

class nxstools.nxsxml.NLink(parent, nameAttr, gTarget)
    Bases: nxstools.nxsxml.NTag

    Link tag wrapper

    constructor

Parameters

•   parent (NTag) – parent tag element

•   nameAttr (str) – name attribute

•   gTarget (str) – target attribute

addDoc(doc)
    adds doc tag content

Parameters
    doc (str) – doc tag content

class nxstools.nxsxml.NTag(parent, tagName, nameAttr='', typeAttr='')
    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)
    adds tag attribute

Parameters

•   name (str) – attribute name

•   value (str) – attribute value

addText(text)
    adds tag content

Parameters
    text (str) – tag content

elem = None
    (lxml.etree.Element) tag element from etree

setText(text)
    sets tag content

Parameters
    text (str) – tag content

class nxstools.nxsxml.XMLFile(fname)
    Bases: object

    XML file object

    constructor

Parameters
    fname (str) – XML file name

dump()
    dumps XML structure into the XML file

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

elem = None
    (lxml.etree.Element) XML root instance

fname = None
    (str) XML file name

prettyPrint(etNode=None)
    prints pretty XML making use of etree

Parameters
    etNode (lxml.etree.Element) – node

nxstools.nxsxml.main()
    the main function

  nxstools.nxsdevicetools module

NDTS TANGO device tools

nxstools.nxsdevicetools.PYTANGO = True
    (bool) True if PyTango available

class nxstools.nxsdevicetools.PackageHandler(packagename='nxstools.xmltemplates')
    Bases: object

    xml templates package loader

    constructor

Parameters
    packagename (str) – full package name

loadXMLTemplates(packagename)
    load xml template module variables

Parameters
    packagename (str) – full package name

nxstools.nxsdevicetools.checkServer(name='NXSConfigServer')
    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)
    finds class name

Parameters
    name (str) – device name

Returns
    class name

Return type
    str

nxstools.nxsdevicetools.generateDeviceNames(prefix, first, last, minimal=False)
    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)
    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)
    provides device class name

Parameters
    devicename (str) – device name

Returns
    class name

Return type
    str

nxstools.nxsdevicetools.getDataSourceComponents(server, verbose=False)
    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)
    fetches the server tango_host:tango_port

Parameters
    server (str) – tango server

Returns
    tango host

Return type
    str

nxstools.nxsdevicetools.getServers(name='NXSConfigServer')
    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')
    finds server names

Parameters
    name (str) – server instance name

Returns
    server list

Return type
    list <str>

nxstools.nxsdevicetools.moduleMultiAttributes = {'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'], 'eigerdectris': ['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'], '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 = {'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'], 'eigerdectris': ['eigerdectris.xml', 'eigerdectris_stepindex.ds.xml', 'eigerdectris_description_cb.ds.xml', 'eigerdectris_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'], '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)
    opens connection to the configuration server

Parameters
    configuration (str) – server device name

Returns
    configuration server proxy

Return type
    PyTango.DeviceProxy

nxstools.nxsdevicetools.standardComponentTemplateFiles = {'absorber': ['absorber_foil.ds.xml', 'absorber_thickness.ds.xml', 'absorber.xml'], 'beamstop': ['beamstop.xml'], 'beamtimeid': ['beamtimeid.xml', 'beamtimeid.ds.xml', 'start_time.ds.xml'], 'chcut': ['chcut.xml', 'chcut_unitcalibration.ds.xml', 'chcut_crystal.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'], 'datasignal': ['datasignal.xml', 'defaultsignal.ds.xml', 'signal_name.ds.xml', 'signalname.ds.xml', 'signal_axes.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', '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', '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'], 'detectorlive': ['detectorlive.xml'], 'empty': ['empty.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'], 'pinhole': ['pinhole.xml'], 'pointdet': ['pointdet.xml'], 'qbpm': ['qbpm_foil.ds.xml', 'qbpm.xml'], 'samplehkl': ['samplehkl.xml'], 'slit': ['slit.xml'], 'source': ['source.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)'}}, '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)'}}, '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)'}}, 'datasignal': {'axes': {'default': None, 'doc': 'data axes field name(s) (string)'}, 'signal': {'default': 'defaultsignal', 'doc': 'data signal field name (string)'}}, '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': {}, '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': {}, '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)'}}, '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)'}}, '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)'}}, '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)'}}, '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)
    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)
    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.filenamegenerator module

Filename generator

class nxstools.filenamegenerator.FilenameGenerator(fname_template, start_index=0, stop_index=None)
    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 = None
    (int) file start index

file_template = None
    (str) file name template

static from_slice(file_template)
    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 = None
    (int) file stop index

  nxstools.release module

NXS tools release version

  Module contents

NXS tools

xml templates

nxstools.xmltemplates.moduleMultiAttributes = {'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'], 'eigerdectris': ['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'], '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 = {'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'], 'eigerdectris': ['eigerdectris.xml', 'eigerdectris_stepindex.ds.xml', 'eigerdectris_description_cb.ds.xml', 'eigerdectris_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'], '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'], 'beamtimeid': ['beamtimeid.xml', 'beamtimeid.ds.xml', 'start_time.ds.xml'], 'chcut': ['chcut.xml', 'chcut_unitcalibration.ds.xml', 'chcut_crystal.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'], 'datasignal': ['datasignal.xml', 'defaultsignal.ds.xml', 'signal_name.ds.xml', 'signalname.ds.xml', 'signal_axes.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', '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', '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'], 'detectorlive': ['detectorlive.xml'], 'empty': ['empty.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'], 'pinhole': ['pinhole.xml'], 'pointdet': ['pointdet.xml'], 'qbpm': ['qbpm_foil.ds.xml', 'qbpm.xml'], 'samplehkl': ['samplehkl.xml'], 'slit': ['slit.xml'], 'source': ['source.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)'}}, '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)'}}, '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)'}}, 'datasignal': {'axes': {'default': None, 'doc': 'data axes field name(s) (string)'}, 'signal': {'default': 'defaultsignal', 'doc': 'data signal field name (string)'}}, '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': {}, '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': {}, '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)'}}, '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)'}}, '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)'}}, '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)'}}, '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]

•   genindex

•   modindex

•   search

AUTHOR
Jan Kotanski

COPYRIGHT
2012-2018 DESY, Jan Kotanski <jkotan@mail.desy.de> GNU GENERAL PUBLIC LICENSE, version 3