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 metadata 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/nxstools
    Web page: https://nexdatas.github.io/nxstools
    NexDaTaS Web page: https://nexdatas.github.io

INSTALLATION

Install the dependencies:
pninexus or h5py, numpy, tango, sphinx

  From sources

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

Extract sources and run

$ python3 setup.py install

  Debian packages

Debian bookworm, bullseye, buster or Ubuntu oracluar, noble, jammy packages can be found in the HDRI repository.

To install the debian packages, add the PGP repository key

$ sudo su
$ curl -s http://repos.pni-hdri.de/debian_repo.pub.gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/debian-hdri-repo.gpg --import
$ chmod 644 /etc/apt/trusted.gpg.d/debian-hdri-repo.gpg

and then download the corresponding source list

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

To install nxstools scripts

$ apt-get update
$ apt-get install nxstools

or

$ apt-get update
$ apt-get install nxstools3

for older python3 releases.

To install only the python3 package

$ apt-get update
$ apt-get install python3-nxstools

and for python2

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

if exists.

  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, poolds, stdcomp, comp, secopcp, compare.

  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 secopcp

It creates a component or components describing modules of the secop node.

  Synopsis

nxscreate secopcp [-h] [-l] [-o] [-a] [-q] [-w] [-c COMPONENT] [-e PARAMSTRATEGY] [-g STRATEGY] [-m TIMEOUT] [-s SAMPLENAME] [-s SAMPLEENVNAME] [-k MEANINGS] [-v ENVIRONMENTS] [-f FIRST] [-z TRANSATTRS] [-p XMLPACKAGE] [-y ENTRYNAME] [-i INSNAME] [-d DIRECTORY] [-j JSON] [-x FILE] [-n] [-b] [-u HOST] [-t PORT] [-r SERVER] [component_name ...]

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

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

•   default <port> is 5000

Options:

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

-l, --list
    list modules of the given node

-o, --overwrite
    overwrite existing components

-a, --can-fail
    can fail strategy flag

-q, --dynamic
    create dynamic links

--sample-nxdata
    create NXdata in NXsample

-c COMPONENT, --component COMPONENT
    component namesecop component name

-e PARAMSTRATEGY, --param-strategy PARAMSTRATEGY
    sensor parameter strategy, i.e. INIT, STEP or FINAL, default: INIT

-g STRATEGY, --strategy STRATEGY
    sensor value strategy, i.e. INIT, STEP or FINAL, default: INIT

-m TIMEOUT, --timeout TIMEOUT
    sensor minimum timeout default: 0.001

-s SAMPLENAME, --sample SAMPLENAME
    sample name

-w SAMPLEENVNAME, --sample-environment SAMPLEENVNAME
    sample environment name

-k MEANINGS, --links MEANINGS
    NXlog links of physical quantities to sensors separated by comman. Default: 'temperature,magnetic_field,electric_field,stress_field,pressure'

-v ENVIRONMENTS, --environments ENVIRONMENTS
    NXenvironment links of physical quantities separated by comman. Default: 'temperature,magnetic_field'

-f FIRST, --first FIRST
    first linked targets separated by comman

-z TRANSATTRS, --transformation-attributes TRANSATTRS
    a JSON dictionary with transformation parameters i.e, "transformation_type", "vector", "depends_on". Default: {"rotation_z":{"transformation_type":"rotation","vector":[0,-1,0]}}

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

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

-i INSNAME, --insname INSNAME
    instrument group name

-d DIRECTORY, --directory DIRECTORY
    output component directory

-j JSON, --json-file JSON
    json configuration file

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

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

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

-u HOST, --host HOST
    secop host name

-t PORT, --port PORT
    secop host port

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

  Example

nxscreate secopcp
nxscreate secopcp -l
    - list all modules of the given node
nxscreate secopcp -c temp_node -d . -j secop_node.json
    - create the all secop components in the local directory for the node configured with the json file
nxscreate secopcp T -t 5001 -b
    - create the component for the T secop module  in the NXSConfigServer database for the node on the port 5000
nxscreate secopcp -d /home/user/xmldir/
    - create the all secop components in the given directory

  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, metadata, origdatablock, sample, instrument, attachment

  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 [options]  <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

--h5cpp
    use h5cpp module as a nexus reader

  Example

nxsfileinfo field /tmp/saxs_ref1_02.nxs
nxsfileinfo field /user/data/myfile.nxs -g
nxsfileinfo field /user/data/myfile.nxs -s

  nxsfileinfo metadata

It shows metadata of the nexus file.

  Synopsis

Usage: nxsfileinfo metadata [options] <file_name>

Options:

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

-a ATTRS, --attributes ATTRS
    names of field or group attributes to be show (separated by commas without spaces). The default takes all attributes

-n NATTRS, --hidden-attributes NATTRS
    names of field or group attributes to be hidden (separated by commas without spaces). The default: 'nexdatas_source,nexdatas_strategy'

-v VALUES, --values VALUES
    field names of more dimensional datasets which value should be shown (separated by commas without spaces)

-z KEYWORDS, --keywords KEYWORDS
    dataset keywords separated by commas.

-w OWNERGROUP, --owner-group OWNERGROUP
    owner group name. Default is {beamtimeid}-part

-c ACCESSGROUPS, --access-groups ACCESSGROUPS
    access group names separated by commas. Default is {beamtimeid}-clbt,{beamtimeId}-dmgt,{beamline}dmgt

-g GROUP_POSTFIX, --group-postfix GROUP_POSTFIX
    postfix to be added to NeXus group name. The default: 'Parameters'

-t ENTRYCLASSES, --entry-classes ENTRYCLASSES
    names of entry NX_class to be shown (separated by commas without spaces). If name is '' all groups are shown. The default: 'NXentry'

-e ENTRYNAMES, --entry-names ENTRYNAMES
    names of entry groups to be shown (separated by commas without spaces). If name is '' all groups are shown. The default: ''

-m, --raw-metadata
    do not store NXentry as scientificMetadata

--dont-merge
    keep entries separate

--add-empty-units
    add empty units for fields without units

--oned
    add 1d values to scientificMetadata

--max-oned-size MAXONEDSIZE
    add min and max (or first and last) values of 1d records to scientificMetadata if its size excides --max-oned-size value

-p PID, --pid PID
    dataset pid

-i BEAMTIMEID, --beamtimeid BEAMTIMEID
    beamtime id

-u, --pid-with-uuid
    generate pid with uuid

-f, --pid-with-filename
    generate pid with file name

-q TECHNIQUES, --techniques TECHNIQUES
    names of techniques (separated by commas without spaces).The default: ''

-j SAMPLEID, --sample-id SAMPLEID
    sampleId

--sample-id-from-name
    get sampleId from the sample name

-y INSTRUMENTID, --instrument-id INSTRUMENTID
    instrumentId

--raw-instrument-id
    leave raw instrument id

-b BEAMTIMEMETA, --beamtime-meta BEAMTIMEMETA
    beamtime metadata file

-s SCIENTIFICMETA, --scientific-meta SCIENTIFICMETA
    scientific metadata file

-o OUTPUT, --output OUTPUT
    output scicat metadata file

-r RELPATH, --relative-path RELPATH
    relative path to the scan files

-x CHMOD, --chmod CHMOD
    json metadata file mod bits, e.g. 0o662

--copy-map COPYMAP
    json or yaml map {output: input} or [[output, input],] or a text file list to re-arrange metadata

--copy-map-field COPYMAPFIELD
    field json or yaml with map {output: input} or [[output, input],] or a text file list to re-arrange metadata. The default: 'scientificMetadata.nxsfileinfo_parameters.copymap.value'

--copy-map-error
    Raise an error when the copy map file does not exist

--copy-map-file COPYMAPFILE
    json or yaml file containing the copy map, see also --copy-map

-f FILEFORMAT, --file-format FILEFORMAT
    input file format, e.g. 'nxs'. Default is defined by the file extension

--proposal-as-proposal
    Store the DESY proposal as the SciCat proposal

--h5py
    use h5py module as a nexus reader

--h5cpp
    use h5cpp module as a nexus reader

  Example

nxsfileinfo metadata /user/data/myfile.nxs
nxsfileinfo metadata /user/data/myfile.fio
nxsfileinfo metadata /user/data/myfile.nxs -p 'Group'
nxsfileinfo metadata /user/data/myfile.nxs -s
nxsfileinfo metadata /user/data/myfile.nxs -a units,NX_class

  nxsfileinfo origdatablock

It generates description of all scan files

  Synopsis

Usage: nxsfileinfo origdatablock [options] <scan_name>

Options:

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

-p PID, --pid PID
    dataset pid

-o OUTPUT, --output OUTPUT
    output scicat metadata file

-w OWNERGROUP, --owner-group OWNERGROUP
    owner group name. Default is {beamtimeid}-part

-c ACCESSGROUPS, --access-groups ACCESSGROUPS
    access group names separated by commas. Default is {beamtimeid}-clbt,{beamtimeId}-dmgt

-s SKIP, --skip SKIP
    filters for files to be skipped (separated by commas without spaces). Default: ''. E.g. '.pyc,~'

-a ADD, --add ADD
    list of files to be added (separated by commas without spaces). Default: ''. E.g. 'scan1.nxs,scan2.nxs'

-r RELPATH, --relative-path RELPATH
    relative path to the scan files

-x CHMOD, --chmod CHMOD
    json metadata file mod bits, e.g. 0o662

  Example

nxsfileinfo origdatablock /user/data/scan_12345

  nxsfileinfo sample

It generates description of sample

  Synopsis

Usage: nxsfileinfo sample [options]

Options:

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

-s SAMPLEID, --sample-id SAMPLEID
    sample id

-i BEAMTIMEID, --beamtimeid BEAMTIMEID
    beamtime id

-b BEAMLINE, --beamline BEAMLINE
    beamline

-d DESCRIPTION, --description DESCRIPTION
    sample description

-r OWNER, --owner OWNER
    sample owner

-p, --published
    sample is published

-w OWNERGROUP, --owner-group OWNERGROUP
    owner group name. Default is {beamtimeid}-dmgt

-c ACCESSGROUPS, --access-groups ACCESSGROUPS
    access group names separated by commas. Default is {be amtimeId}-dmgt,{beamtimeid}-clbt,{beamtimeId}-part,{be amline}dmgt,{beamline}staff

-x CHMOD, --chmod CHMOD
    json metadata file mod bits, e.g. 0o662

-m CHARACTERISTICSMETA, --sample-characteristics CHARACTERISTICSMETA
    sample characteristics metadata file

-o OUTPUT, --output OUTPUT
    output scicat metadata file

  Example

nxsfileinfo sample -i petra3/h2o/234234 -d 'HH water' -s ~/cm.json

  nxsfileinfo instrument

It generates description of instrument

  Synopsis

Usage: nxsfileinfo instrument [options]

Options:

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

-p PID, --pid PID
    instrument pid

-n NAME, --name NAME
    instrument name

-i BEAMTIMEID, --beamtimeid BEAMTIMEID
    beamtime id

-b BEAMLINE, --beamline BEAMLINE
    beamline

-w OWNERGROUP, --owner-group OWNERGROUP
    owner group name. Default is {beamtimeid}-dmgt

-c ACCESSGROUPS, --access-groups ACCESSGROUPS
    access group names separated by commas. Default is {be amtimeId}-dmgt,{beamtimeid}-clbt,{beamtimeId}-part,{be amline}dmgt,{beamline}staff

-x CHMOD, --chmod CHMOD
    json metadata file mod bits, e.g. 0o662

-m CUSTOMMETA, --custom-metadata CUSTOMMETA
    instrument characteristics metadata file

-o OUTPUT, --output OUTPUT
    output scicat metadata file

  Example

nxsfileinfo instrument -p /petra3/p00 -n P00 -m ~/cm.json

  nxsfileinfo attachment

It generates description of attachment

  Synopsis

Usage: nxsfileinfo attachment [options] <image_file|scan_file>

Options:

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

-a ATID, --id ATID
    attachment id

-t CAPTION, --caption CAPTION
    caption text

-i BEAMTIMEID, --beamtimeid BEAMTIMEID
    beamtime id

-b BEAMLINE, --beamline BEAMLINE
    beamline

-r OWNER, --owner OWNER
    attachment owner

-w OWNERGROUP, --owner-group OWNERGROUP
    owner group name. Default is {beamtimeid}-dmgt

-c ACCESSGROUPS, --access-groups ACCESSGROUPS
    access group names separated by commas. Default is {be amtimeId}-dmgt,{beamtimeid}-clbt,{beamtimeId}-part,{be amline}dmgt,{beamline}staff

-f FILEFORMAT, --file-format FILEFORMAT
    input file format, e.g. 'nxs'. Default is defined by the file extension

--h5py
    use h5py module as a nexus reader

--h5cpp
    use h5cpp module as a nexus reader

-x CHMOD, --chmod CHMOD
    json metadata file mod bits, e.g. 0o662

-s SIGNALS, --signals SIGNALS
    signals data name(s) separated by comma

-e AXES, --axes AXES
    axis/axes data name(s) separated by comma

-q SCANCMDAXES, --scan-command-axes SCANCMDAXES
    a JSON dictionary with scan-command axes to override, axis/axes data name(s) separated by comma for detectors and by semicolon for more plots. Default: {"hklscan":"h;k;l","qscan":"qz;qpar"}

-m FRAME, --frame FRAME
    a frame number for if more 2D images in the data

--signal-label SLABEL
    signal label

--xlabel XLABEL
    x-axis label

--ylabel YLABEL
    y-axis label

-u, --override
    override NeXus entries by script parameters

--parameters-in-caption
    add plot paramters to the caption

-n NEXUSPATH, --nexus-path NEXUSPATH
    base nexus path to element to be shown. If th path is '' the default group is shown. The default: ''

-o OUTPUT, --output OUTPUT
    output scicat metadata file

  Example

nxsfileinfo attachment -b p00 -i 2342342 -t 'HH water' -o ~/at1.json thumbnail.png
nxsfileinfo attachment -b p00 -i 2342342 -t 'HH water' -o ~/at2.json -s pilatus myscan_00123.nxs
nxsfileinfo attachment -b p00 -i 2342342 -t 'HH water' -o ~/at2.json  myscan_00124.fio

  nxsfileinfo groupmetadata

It groups scan metadata to one dataset

  Synopsis

Usage: nxsfileinfo groupmetadata [options] [groupname]

Options:

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

-p PID, --pid PID
    dataset pid

--raw
    raw dataset type

-i BEAMTIMEID, --beamtimeid
    BEAMTIMEID beamtime id

-s, --skip-group-datablock
    skip group datablock

-w, --allow-duplication
    allow to merge metadata with duplicated pid

-q, --raw
    raw dataset type

-f, --write-files
    write output to files

-k SCICATVERSION, --scicat-version SCICATVERSION
    major scicat version metadata

-x CHMOD, --chmod CHMOD
    json metadata file mod bits, e.g. 0o662

-g GROUPMAP, --group-map GROUPMAP
    json or yaml map of {output: input} or [[output, input],] or a text file list to re-arrange metadata

-e, --group-map-error
    Raise an error when the group map file does not exist

-r GROUPMAPFILE, --group-map-file GROUPMAPFILE
    json or yaml file containing the copy map, see also

-m METADATAFILE, --metadata METADATAFILE
    json metadata file

-d ORIGDATABLOCKFILE, --origdatablock ORIGDATABLOCKFILE
    json origmetadata file

-a ATTACHMENTFILE, --attachment ATTACHMENTFILE
    json attachment file

-o OUTPUT, --output OUTPUT
    output scicat group metadata file

-l DBOUTPUT, --datablock-output DBOUTPUT
    output scicat group datablocks list file

-t ATOUTPUT, --attachment-output ATOUTPUT
    output scicat group attachments list file

  Example

nxsfileinfo groupmetadata -o /user/data/myscan.scan.json  -t /user/data/myscan.attachment.json  -l /user/data/myscan.origdatablock.json  -c /home/user/group_config.txt  -m /user/data/myscan_00023.scan.json  -d /user/data/myscan_00023.origdatablock.json  -a /user/data/myscan_00023.attachment.json
nxsfileinfo groupmetadata myscan_m001  -m /user/data/myscan_00021.scan.json -c /home/user/group_config.txt
nxsfileinfo groupmetadata  myscan_m001  -c /home/user/group_config.txt  -m /user/data/myscan_00023.scan.json  -d /user/data/myscan_00023.origdatablock.json  -a /user/data/myscan_00023.attachment.json
nxsfileinfo groupmetadata  -m /user/data/myscan_00023.scan.json  -d /user/data/myscan_00023.origdatablock.json  -c /home/user/group_config.txt

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> )
  -c CONFIGHOST, --confighost CONFIGHOST
                        the host to run the config server ( default: <mysqlhost> )
  -r RUNHOST, --runhost RUNHOST
                        the host to run the server ( 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" )
  -k CLASSNAME, --class-name CLASSNAME
                        tango server class name
  -y PROPJSON, --json-device-properties PROPJSON
                        JSON tango device properties ( default: '{}' )
  -t, --postpone        do not start the server
 examples:
       nxsetup set
       nxsetup set -b p09 -m haso228 -u p09user -d nxsconfig NXSConfigServer
       nxsetup set NexusWriter/haso228  -k NexusWriter  -y '{"p00/bliss_nexuswriter/test_session":{"session":"test_session","beacon_host":"haso228:25000"}}'  -t

  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
     -z TIMEOUT, --timeout TIMEOUT
                           timeout in seconds
     -e, --no-wait         do not wait
examples:
    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
  -z TIMEOUT, --timeout TIMEOUT
                        timeout in seconds
  -e, --no-wait         do not wait
 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 wait

usage: nxsetup wait [-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
  -z TIMEOUT, --timeout TIMEOUT
                        timeout in seconds
 examples:
       nxsetup wait 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
  -z TIMEOUT, --timeout TIMEOUT
                        timeout in seconds
  -e, --no-wait         do not wait
 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
  -z TIMEOUT, --timeout TIMEOUT
                        timeout in seconds
  -e, --no-wait         do not wait
 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
  -z TIMEOUT, --timeout TIMEOUT
                        timeout in seconds
  -e, --no-wait         do not wait
  -i INSTANCE, --instance INSTANCE
                        macroserver instance name, i.e. haso ( default: '*')
 examples:
       nxsetup add-recorder-path /usr/share/pyshared/sardananxsrecorder
       nxsetup add-recorder-path -t /usr/share/pyshared/sardananxsrecorder

NXSTOOLS PACKAGE

  Submodules

  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
    (int) file start index

file_template
    (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
    (int) file stop index

  nxstools.filewriter module

Provides abstraction for file writer

class nxstools.filewriter.FTAttribute(h5object, tparent=None)
    Bases: FTObject

    virtual file tree attribute

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

property dtype
    attribute data type

Returns
    attribute data type

Return type
    str

read()
    read attribute value

Returns
    python object

Return type
    any

reopen()
    reopen attribute

property shape
    attribute shape

Returns
    attribute shape

Return type
    list < int >

write(o)
    write attribute value

Parameters
    o (any) -- python object

class nxstools.filewriter.FTAttributeManager(h5object, tparent=None)
    Bases: FTObject

    file tree attribute

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

create(name, dtype, shape=None, overwrite=False)
    create a new attribute

Parameters

•   name (str) -- attribute name

•   dtype (str) -- attribute type

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

•   overwrite (bool) -- overwrite flag

Returns
    attribute object

Return type
    FTAtribute

names()
    key values

Returns
    attribute names

Return type
    list <str>

reopen()
    reopen attribute

class nxstools.filewriter.FTDataFilter(h5object=None, tparent=None)
    Bases: FTObject

    file tree data filter

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

property availability
    getter for filter availability

Returns
    filter availability

Return type
    tuple <str>

property filterid
    getter for compression filter id

Returns
    compression rate

Return type
    int

property name
    getter for filter name

Returns
    filter name

Return type
    tuple <str>

property options
    getter for compression options

Returns
    compression options

Return type
    tuple <int>

property rate
    getter for compression rate

Returns
    compression rate

Return type
    int

reopen()
    reopen attribute

property shuffle
    getter for compression shuffle

Returns
    compression shuffle

Return type
    bool

class nxstools.filewriter.FTDeflate(h5object=None, tparent=None)
    Bases: FTDataFilter

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

class nxstools.filewriter.FTField(h5object, tparent=None)
    Bases: FTObject

    file writer field

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

property attributes
    return the attribute manager

Returns
    attribute manager

Return type
    FTAttributeManager

property dtype
    field data type

Returns
    field data type

Return type
    str

grow(dim=0, ext=1)
    grow the field

Parameters

•   dim (int) -- growing dimension

•   dim -- size of the grow

read()
    read the field value

Returns
    h5 object

Return type
    any

refresh()
    refresh the field

Returns
    refreshed

Return type
    bool

reopen()
    reopen attribute

property shape
    field shape

Returns
    field shape

Return type
    list < int >

property size
    field size

Returns
    field size

Return type
    int

write(o)
    write the field value

Parameters
    o (any) -- h5 object

class nxstools.filewriter.FTFile(h5object, filename)
    Bases: FTObject

    file tree file

    constructor

Parameters

•   h5object (any) -- h5 object

•   filename (str) -- file name

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

classmethod currenttime()
    returns current time string

Returns
    current time

Return type
    str

default_field()
    field pointed by default attributes

Returns
    field pointed by default attributes

Return type
    FTField

flush()
    flash the data

hasswmr()
    if has swmr_mode

Returns
    has swmr_mode

Return type
    bool

name
    (str) file name

property readonly
    check if file is readonly

Returns
    readonly flag

Return type
    bool

reopen(readonly=False, swmr=False, libver=None)
    reopen attribute

Parameters

•   readonly (bool) -- readonly flag

•   swmr (bool) -- swmr flag

•   libver (str) -- library version, default: 'latest'

root()
    root object

Returns
    parent object

Return type
    FTGroup

class nxstools.filewriter.FTGroup(h5object, tparent=None)
    Bases: FTObject

    file tree group

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

property attributes
    return the attribute manager

Returns
    attribute manager

Return type
    FTAttributeManager

create_field(name, type_code, shape=None, chunk=None, dfilter=None)
    open a file tree element

Parameters

•   n (str) -- group name

•   type_code (str) -- nexus field type

•   shape (list < int >) -- shape

•   chunk (list < int >) -- chunk

•   dfilter (FTDeflate) -- filter deflater

Returns
    file tree field

Return type
    FTField

create_group(n, nxclass='')
    open a file tree element

Parameters

•   n (str) -- group name

•   nxclass (str) -- group type

Returns
    file tree group

Return type
    FTGroup

create_virtual_field(name, layout, fillvalue=None)
    creates a virtual filed tres element

Parameters

•   name (str) -- group name

•   layout (H5CppFieldLayout) -- virual field layout

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

default_field(signals=None, nexuspath=None)
    field pointed by default attributes

Parameters

•   axes -- axes names

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

Returns
    field pointed by default attributes

Return type
    FTField

exists(name)
    if child exists

Parameters
    name (str) -- child name

Returns
    existing flag

Return type
    bool

names()
    read the child names

Returns
    h5 object

Return type
    list <str>

open(name)
    open a file tree element

Parameters
    name (str) -- element name

Returns
    file tree object

Return type
    FTObject

open_link(name)
    open a file tree element as link

Parameters
    name (str) -- element name

Returns
    file tree object

Return type
    FTObject

reopen()
    reopen attribute

property size
    group size

Returns
    group size

Return type
    int

stepsperfile
    (int) steps per file

class nxstools.filewriter.FTHyperslab(offset=None, block=None, count=None, stride=None)
    Bases: object

    hyperslab class

    constructor

Parameters

•   offset (tuple <int>) -- a list of offsets

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

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

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

class nxstools.filewriter.FTLink(h5object, tparent=None)
    Bases: FTObject

    file tree link

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

refresh()
    refresh the link

Returns
    refreshed

Return type
    bool

reopen()
    reopen attribute

property target_path
    target path

Returns
    target path

Return type
    str

class nxstools.filewriter.FTObject(h5object, tparent=None)
    Bases: object

    virtual file tree object

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- tree parent

append(child)
    append child weakref

Parameters
    tparent (FTObject) -- tree parent

close()
    close element

property h5object
    provide object of native library

Returns
    h5 object

Return type
    any

property is_valid
    check if attribute is valid

Returns
    valid flag

Return type
    bool

property parent
    return the parent object

Returns
    file tree group

Return type
    FTGroup

reload()
    reload a list of valid children

class nxstools.filewriter.FTTargetFieldView(h5object=None)
    Bases: FTObject

    target field view for VDS

    constructor

Parameters
    h5object (any) -- h5 object

class nxstools.filewriter.FTVirtualFieldLayout(h5object=None)
    Bases: FTObject

    virtual field layout

    constructor

Parameters
    h5object (any) -- h5 object

add(key, source, sourcekey=None)
    add target field to layout

Parameters

•   key (tuple) -- slide or selection

•   source (FTTargetFieldView) -- target field

•   sourcekey (tuple) -- slide or selection

nxstools.filewriter.create_file(filename, overwrite=False, **pars)
    create a new file

Parameters

•   filename (str) -- file name

•   overwrite (bool) -- overwrite flag

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

Returns
    file object

Return type
    FTFile

nxstools.filewriter.data_filter(parent=None)
    create deflate filter

Parameters
    parent (FTObject) -- parent object

Returns
    deflate filter object

Return type
    FTDeflate

nxstools.filewriter.deflate_filter(parent=None)
    create deflate filter

Parameters
    parent (FTObject) -- parent object

Returns
    deflate filter object

Return type
    FTDeflate

nxstools.filewriter.first(array)
    get first element if the only

Parameters
    array (any) -- numpy array

Returns
    first element of the array

nxstools.filewriter.get_links(parent)
    get links

Parameters
    parent (FTObject) -- parent object

Returns
    list of link objects

Return type

obj list <FTLink>

nxstools.filewriter.link(target, parent, name)
    create link

Parameters

•   target (str) -- file name

•   parent (FTObject) -- parent object

•   name (str) -- link name

Returns
    link object

Return type
    FTLink

nxstools.filewriter.load_file(membuffer, filename=None, readonly=False, **pars)
    load a file from memory byte buffer

Parameters

•   membuffer (bytes or io.BytesIO) -- memory buffer

•   filename (str) -- file name

•   readonly (bool) -- readonly flag

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

Returns
    file objects

Return type
    H5PYFile or H5CppFile

nxstools.filewriter.open_file(filename, readonly=False, **pars)
    open the new file

Parameters

•   filename (str) -- file name

•   readonly (bool) -- readonly flag

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

Returns
    file object

Return type
    FTFile

nxstools.filewriter.setwriter(wr)
    sets writer

Parameters
    wr (PNIWriter or H5PYWriter or H5CppWriter) -- writer module

nxstools.filewriter.target_field_view(filename, fieldpath, shape, dtype=None, maxshape=None, parent=None)
    create target field view for VDS

Parameters

•   filename (str) -- file name

•   fieldpath (str) -- nexus field path

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

•   parent (FTObject) -- parent object

Returns
    target field object

Return type
    FTTargetFieldView

nxstools.filewriter.unlimited(parent=None)
    return dataspace UNLIMITED variable for the current writer module

Parameters
    parent (FTObject) -- parent object

Returns
    dataspace UNLIMITED variable

Return type
    h5cpp.dataspace.UNLIMITED or h5py.UNLIMITED

nxstools.filewriter.virtual_field_layout(shape, dtype, maxshape=None, parent=None)
    creates a virtual field layout for a VDS file

Parameters

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

•   parent (FTObject) -- parent object

Returns
    virtual layout

Return type
    FTVirtualFieldLayout

nxstools.filewriter.writerlock = <unlocked _thread.lock object>
    (threading.Lock) writer module

  nxstools.h5cppwriter module

Provides h5cpp file writer

class nxstools.h5cppwriter.H5CppAttribute(h5object, tparent=None)
    Bases: FTAttribute

    file tree attribute

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

close()
    close attribute

property dtype
    field data type

Returns
    field data type

Return type
    str

property is_valid
    check if attribute is valid

Returns
    valid flag

Return type
    bool

name
    (str) object name

path
    (str) object nexus path

read()
    read attribute value

Returns
    python object

Return type
    any

reopen()
    reopen attribute

property shape
    attribute shape

Returns
    attribute shape

Return type
    list < int >

write(o)
    write attribute value

Parameters
    o (any) -- python object

class nxstools.h5cppwriter.H5CppAttributeManager(h5object, tparent=None)
    Bases: FTAttributeManager

    file tree attribute

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

close()
    close attribure manager

create(name, dtype, shape=None, overwrite=False)
    create a new attribute

Parameters

•   name (str) -- attribute name

•   dtype (str) -- attribute type

•   shape (list < int >) -- attribute shape

•   overwrite (bool) -- overwrite flag

Returns
    attribute object

Return type
    H5CppAtribute

property is_valid
    check if link is valid

Returns
    valid flag

Return type
    bool

name
    (str) object name

names()
    key values

Returns
    attribute names

Return type
    list <str>

path
    (str) object nexus path

reopen()
    reopen field

class nxstools.h5cppwriter.H5CppDataFilter(h5object=None, tparent=None)
    Bases: FTDataFilter

    file tree deflate

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

class nxstools.h5cppwriter.H5CppDeflate(h5object=None, tparent=None)
    Bases: H5CppDataFilter

    deflate filter

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

class nxstools.h5cppwriter.H5CppField(h5object, tparent=None)
    Bases: FTField

    file tree file

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

property attributes
    return the attribute manager

Returns
    attribute manager

Return type
    H5CppAttributeManager

close()
    close field

property dtype
    field data type

Returns
    field data type

Return type
    str

grow(dim=0, ext=1)
    grow the field

Parameters

•   dim (int) -- growing dimension

•   dim -- size of the grow

property is_valid
    check if field is valid

Returns
    valid flag

Return type
    bool

name
    (str) object name

path
    (str) object nexus path

read()
    read the field value

Returns
    h5 object

Return type
    any

refresh()
    refresh the field

Returns
    refreshed

Return type
    bool

reopen()
    reopen field

property shape
    field shape

Returns
    field shape

Return type
    list < int >

property size
    field size

Returns
    field size

Return type
    int

write(o)
    write the field value

Parameters
    o (any) -- h5 object

class nxstools.h5cppwriter.H5CppFile(h5object, filename)
    Bases: FTFile

    file tree file

    constructor

Parameters

•   h5object (any) -- h5 object

•   filename (str) -- file name

close()
    close file

filename
    (str) nexus file name

flush()
    flash the data

property is_valid
    check if file is valid

Returns
    valid flag

Return type
    bool

path
    (str) object nexus path

property readonly
    check if file is readonly

Returns
    readonly flag

Return type
    bool

reopen(readonly=False, swmr=False, libver=None)
    reopen file

Parameters

•   readonly (bool) -- readonly flag

•   swmr (bool) -- swmr flag

•   libver (str) -- library version, default: 'latest'

root()
    root object

Returns
    parent object

Return type
    H5CppGroup

class nxstools.h5cppwriter.H5CppGroup(h5object, tparent=None)
    Bases: FTGroup

    file tree group

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- tree parent

class H5CppGroupIter(group)
    Bases: object

    constructor

Parameters
    group -- group object

next()
    the next attribute

Returns
    attribute object

Return type
    FTAtribute

property attributes
    return the attribute manager

Returns
    attribute manager

Return type
    H5CppAttributeManager

close()
    close group

create_field(name, type_code, shape=None, chunk=None, dfilter=None)
    open a file tree element

Parameters

•   n (str) -- group name

•   type_code (str) -- nexus field type

•   shape (list < int >) -- shape

•   chunk (list < int >) -- chunk

•   dfilter (H5CppDataFilter) -- filter deflater

Returns
    file tree field

Return type
    H5CppField

create_group(n, nxclass=None)
    open a file tree element

Parameters

•   n (str) -- group name

•   nxclass (str) -- group type

Returns
    file tree group

Return type
    H5CppGroup

create_virtual_field(name, layout, fillvalue=0)
    creates a virtual filed tres element

Parameters

•   name (str) -- field name

•   layout (H5CppFieldLayout) -- virual field layout

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

exists(name)
    if child exists

Parameters
    name (str) -- child name

Returns
    existing flag

Return type
    bool

property is_valid
    check if field is valid

Returns
    valid flag

Return type
    bool

name
    (str) object name

names()
    read the child names

Returns
    h5 object

Return type
    list <str>

open(name)
    open a file tree element

Parameters
    name (str) -- element name

Returns
    file tree object

Return type
    FTObject

open_link(name)
    open a file tree element as link

Parameters
    name (str) -- element name

Returns
    file tree object

Return type
    FTObject

path
    (str) object nexus path

reopen()
    reopen group

property size
    group size

Returns
    group size

Return type
    int

class nxstools.h5cppwriter.H5CppLink(h5object, tparent=None)
    Bases: FTLink

    file tree link

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

close()
    close group

classmethod getfilename(obj)
    provides a filename from h5 node

Parameters
    obj (FTObject) -- h5 node

Returns
    file name

Return type
    str

property is_valid
    check if link is valid

Returns
    valid flag

Return type
    bool

name
    (str) object name

path
    (str) object nexus path

refresh()
    refresh the field

Returns
    refreshed

Return type
    bool

reopen()
    reopen field

property target_path
    target path

Returns
    target path

Return type
    str

class nxstools.h5cppwriter.H5CppTargetFieldView(filename, fieldpath, shape, dtype=None, maxshape=None)
    Bases: FTTargetFieldView

    target field for VDS

    constructor

Parameters

•   filename (str) -- file name

•   fieldpath (str) -- nexus field path

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

fieldpath
    (str) nexus field path

filename
    (str) directory and file name

maxshape
    (list < int >) maximal shape

shape
    (list < int >) shape

class nxstools.h5cppwriter.H5CppVirtualFieldLayout(h5object, shape, dtype=None, maxshape=None)
    Bases: FTVirtualFieldLayout

    virtual field layout

    constructor

Parameters

•   h5object (any) -- h5 object

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

add(key, source, sourcekey=None, shape=None)
    add target field to layout

Parameters

•   key (tuple) -- slide

•   source (H5PYTargetFieldView) -- target field view

•   sourcekey (tuple) -- slide or selection

•   shape (tuple) -- target shape in the layout

maxshape
    (list < int >) maximal shape

shape
    (list < int >) shape

nxstools.h5cppwriter.create_file(filename, overwrite=False, libver=None, swmr=None)
    create a new file

Parameters

•   filename (str) -- file name

•   overwrite (bool) -- overwrite flag

•   libver (str) -- library version: 'lastest' or 'earliest'

Returns
    file object

Return type
    H5CppFile

nxstools.h5cppwriter.data_filter(filterid=None, name=None, options=None, availability=None, shuffle=None, rate=None)
    create data filter

Parameters

•   filterid (int) -- hdf5 filter id

•   name (str) -- filter name

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

•   availability (str) -- filter availability i.e. 'optional' or 'mandatory'

•   shuffle (bool) -- filter shuffle

•   rate (bool) -- filter shuffle

Returns
    data filter object

Return type
    H5CppDataFilter

nxstools.h5cppwriter.deflate_filter(rate=None, shuffle=None, availability=None)
    create data filter

Parameters

•   rate (bool) -- filter shuffle

•   shuffle (bool) -- filter shuffle

Returns
    deflate filter object

Return type
    H5CppDataFilter

nxstools.h5cppwriter.get_links(parent)
    get links

Parameters
    parent (FTObject) -- parent object

Returns
    list of link objects

Returns
    link object

Return type

obj list <H5CppLink>

nxstools.h5cppwriter.is_image_file_supported()
    provides if loading of image files are supported

Retruns
    if loading of image files are supported

Return type
    bool

nxstools.h5cppwriter.is_unlimited_vds_supported()
    provides if unlimited vds are supported

Retruns
    if unlimited vds are supported

Return type
    bool

nxstools.h5cppwriter.is_vds_supported()
    provides if vds are supported

Retruns
    if vds are supported

Return type
    bool

nxstools.h5cppwriter.link(target, parent, name)
    create link

Parameters

•   target (str) -- nexus path name

•   parent (FTObject) -- parent object

•   name (str) -- link name

Returns
    link object

Return type
    H5CppLink

nxstools.h5cppwriter.load_file(membuffer, filename=None, readonly=False, **pars)
    load a file from memory byte buffer

Parameters

•   membuffer (bytes or io.BytesIO) -- memory buffer

•   filename (str) -- file name

•   readonly (bool) -- readonly flag

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

Returns
    file object

Return type
    H5PYFile

nxstools.h5cppwriter.nptype(dtype)
    converts to numpy types

Parameters
    dtype (str) -- h5 writer type type

Returns
    nupy type

Return type
    str

nxstools.h5cppwriter.open_file(filename, readonly=False, libver=None, swmr=False)
    open the new file

Parameters

•   filename (str) -- file name

•   readonly (bool) -- readonly flag

•   libver (str) -- library version: 'lastest' or 'earliest'

Returns
    file object

Return type
    H5CppFile

nxstools.h5cppwriter.target_field_view(filename, fieldpath, shape, dtype=None, maxshape=None)
    create target field view for VDS

Parameters

•   filename (str) -- file name

•   fieldpath (str) -- nexus field path

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

Returns
    target field view object

Return type
    H5CppTargetFieldView

nxstools.h5cppwriter.unlimited(parent=None)
    return dataspace UNLIMITED variable for the current writer module

Parameters
    parent (FTObject) -- parent object

Returns
    dataspace UNLIMITED variable

Return type
    h5cpp.dataspace.UNLIMITED

nxstools.h5cppwriter.unlimited_selection(sel, shape)
    checks if hyperslab is unlimited

Parameters

•   sel (filewriter.FTHyperslab) -- hyperslab selection

•   shape (list) -- give shape

Returns
    if hyperslab is unlimited list

Return type
    list <bool>

nxstools.h5cppwriter.virtual_field_layout(shape, dtype, maxshape=None)
    creates a virtual field layout for a VDS file

Parameters

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

Returns
    virtual layout

Return type
    H5CppVirtualFieldLayout

  nxstools.h5pywriter module

Provides h5py file writer

class nxstools.h5pywriter.H5PYAttribute(h5object, tparent=None)
    Bases: FTAttribute

    file tree attribute

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

close()
    close attribute

property dtype
    attribute data type

Returns
    attribute data type

Return type
    str

property is_valid
    check if field is valid

Returns
    valid flag

Return type
    bool

read()
    read attribute value

Returns
    python object

Return type
    any

reopen()
    reopen attribute

property shape
    attribute shape

Returns
    attribute shape

Return type
    list < int >

write(o)
    write attribute value

Parameters
    o (any) -- python object

class nxstools.h5pywriter.H5PYAttributeManager(h5object, tparent=None)
    Bases: FTAttributeManager

    file tree attribute

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

class H5PYAttrIter(manager)
    Bases: object

    constructor

Parameters
    manager (H5PYAttributeManager) -- attribute manager

next()
    the next attribute

Returns
    attribute object

Return type
    FTAtribute

close()
    close attribure manager

create(name, dtype, shape=None, overwrite=False)
    create a new attribute

Parameters

•   name (str) -- attribute name

•   dtype (str) -- attribute type

•   shape (list < int >) -- attribute shape

•   overwrite (bool) -- overwrite flag

Returns
    attribute object

Return type
    H5PYAtribute

property is_valid
    check if link is valid

Returns
    valid flag

Return type
    bool

name
    (str) object name

names()
    key values

Returns
    attribute names

Return type
    list <str>

path
    (str) object nexus path

reopen()
    reopen field

class nxstools.h5pywriter.H5PYDataFilter(h5object=None, tparent=None)
    Bases: FTDataFilter

    file tree data filter

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

class nxstools.h5pywriter.H5PYDeflate(h5object=None, tparent=None)
    Bases: H5PYDataFilter

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

class nxstools.h5pywriter.H5PYField(h5object, tparent=None)
    Bases: FTField

    file writer field

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

property attributes
    return the attribute manager

Returns
    attribute manager

Return type
    H5PYAttributeManager

close()
    close field

property dtype
    field data type

Returns
    field data type

Return type
    str

grow(dim=0, ext=1)
    grow the field

Parameters

•   dim (int) -- growing dimension

•   dim -- size of the grow

property is_valid
    check if group is valid

Returns
    valid flag

Return type
    bool

read()
    read the field value

Returns
    h5 object

Return type
    any

refresh()
    refresh the field

Returns
    refreshed

Return type
    bool

reopen()
    reopen field

property shape
    field shape

Returns
    field shape

Return type
    list < int >

property size
    field size

Returns
    field size

Return type
    int

write(o)
    write the field value

Parameters
    o (any) -- h5 object

class nxstools.h5pywriter.H5PYFile(h5object, filename)
    Bases: FTFile

    file tree file

    constructor

Parameters

•   h5object (any) -- h5 object

•   filename (str) -- file name

close()
    close file

flush()
    flash the data

hasswmr()
    if has swmr_mode

Returns
    has swmr_mode

Return type
    bool

property is_valid
    check if group is valid

Returns
    valid flag

Return type
    bool

path
    (str) object nexus path

property readonly
    check if file is readonly

Returns
    readonly flag

Return type
    bool

reopen(readonly=False, swmr=False, libver=None)
    reopen file

Parameters

•   readonly (bool) -- readonly flag

•   swmr (bool) -- swmr flag

•   libver (str) -- library version, default: 'latest'

root()
    root object

Returns
    parent object

Return type
    H5PYGroup

class nxstools.h5pywriter.H5PYGroup(h5object, tparent=None)
    Bases: FTGroup

    file tree group

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

class H5PYGroupIter(group)
    Bases: object

    constructor

Parameters
    group -- group object

next()
    the next attribute

Returns
    attribute object

Return type
    FTAtribute

property attributes
    return the attribute manager

Returns
    attribute manager

Return type
    H5PYAttributeManager

close()
    close group

create_field(name, type_code, shape=None, chunk=None, dfilter=None)
    creates a field tree element

Parameters

•   name (str) -- group name

•   type_code (str) -- nexus field type

•   shape (list < int >) -- shape

•   chunk (list < int >) -- chunk

•   dfilter (H5PYDataFilter) -- filter deflater

Returns
    file tree field

Return type
    H5PYField

create_group(n, nxclass='')
    open a file tree element

Parameters

•   n (str) -- group name

•   nxclass (str) -- group type

Returns
    file tree group

Return type
    H5PYGroup

create_virtual_field(name, layout, fillvalue=None)
    creates a virtual filed tres element

Parameters

•   name (str) -- group name

•   layout (H5PYFieldLayout) -- virual field layout

•   fillvalue (int) -- fill value

exists(name)
    if child exists

Parameters
    name (str) -- child name

Returns
    existing flag

Return type
    bool

property is_valid
    check if group is valid

Returns
    valid flag

Return type
    bool

names()
    read the child names

Returns
    h5 object

Return type
    list <str>

open(name)
    open a file tree element

Parameters
    name (str) -- element name

Returns
    file tree object

Return type
    FTObject

open_link(name)
    open a file tree element as link

Parameters
    name (str) -- element name

Returns
    file tree object

Return type
    FTObject

reopen()
    reopen file

property size
    group size

Returns
    group size

Return type
    int

class nxstools.h5pywriter.H5PYLink(h5object, tparent=None)
    Bases: FTLink

    file tree link

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

close()
    close group

classmethod getfilename(obj)
    provides a filename from h5 node

Parameters
    obj (FTObject) -- h5 node

Returns
    file name

Return type
    str

property is_valid
    check if link is valid

Returns
    valid flag

Return type
    bool

read()
    read object value

Returns
    valid flag

Return type
    bool

refresh()
    refresh the field

Returns
    refreshed

Return type
    bool

reopen()
    reopen field

setname(name)

property target_path
    target path

Returns
    target path

Return type
    str

class nxstools.h5pywriter.H5PYTargetFieldView(h5object, shape)
    Bases: FTTargetFieldView

    target field view for VDS

    constructor

Parameters

•   h5object (any) -- h5 object

•   shape (list < int >) -- shape

shape
    (list < int >) shape

class nxstools.h5pywriter.H5PYVirtualFieldLayout(h5object, shape)
    Bases: FTVirtualFieldLayout

    virtual field layout

    constructor

Parameters

•   h5object (any) -- h5 object

•   shape (list < int >) -- shape

add(key, source, sourcekey=None, shape=None)
    add target field to layout

Parameters

•   key (tuple) -- slide

•   source (H5PYTargetFieldView) -- target field view

•   sourcekey (tuple) -- slide or selection

•   shape (tuple) -- target shape in the layout

shape
    (list < int >) shape

nxstools.h5pywriter.create_file(filename, overwrite=False, **pars)
    create a new file

Parameters

•   filename (str) -- file name

•   overwrite (bool) -- overwrite flag

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

Returns
    file object

Return type
    H5PYFile

nxstools.h5pywriter.data_filter(filterid=None, name=None, options=None, availability=None, shuffle=None, rate=None)
    create data filter

Parameters

•   filterid (int) -- hdf5 filter id

•   name (str) -- filter name

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

•   availability (str) -- filter availability i.e. 'optional' or 'mandatory'

•   shuffle (bool) -- filter shuffle

•   rate (bool) -- filter shuffle

Returns
    deflate filter object

Return type
    H5PYDataFilter

nxstools.h5pywriter.deflate_filter(rate=None, shuffle=None, availability=None)
    create data filter

Parameters

•   rate (bool) -- filter shuffle

•   shuffle (bool) -- filter shuffle

Returns
    deflate filter object

Return type
    H5CppDataFilter

nxstools.h5pywriter.get_links(parent)
    get links

Parameters
    parent (FTObject) -- parent object

Returns
    list of link objects

Returns
    link object

Return type

obj list <H5PYLink>

nxstools.h5pywriter.is_image_file_supported()
    provides if loading of image files are supported

Retruns
    if loading of image files are supported

Return type
    bool

nxstools.h5pywriter.is_mbs_supported()
    provides if MultiBlockSlice are supported

Retruns
    if MultiBlockSlice are supported

Return type
    bool

nxstools.h5pywriter.is_strings_as_bytes()
    provides if string read to bytes

Retruns
    if string read to bytes

Return type
    bool

nxstools.h5pywriter.is_unlimited_vds_supported()
    provides if unlimited vds are supported

Retruns
    if unlimited vds are supported

Return type
    bool

nxstools.h5pywriter.is_vds_supported()
    provides if VDS are supported

Retruns
    if VDS are supported

Return type
    bool

nxstools.h5pywriter.link(target, parent, name)
    create link

Parameters

•   target (str) -- file name

•   parent (FTObject) -- parent object

•   name (str) -- link name

Returns
    link object

Return type
    H5PYLink

nxstools.h5pywriter.load_file(membuffer, filename=None, readonly=False, **pars)
    load a file from memory byte buffer

Parameters

•   membuffer (bytes or io.BytesIO) -- memory buffer

•   filename (str) -- file name

•   readonly (bool) -- readonly flag

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

Returns
    file object

Return type
    H5PYFile

nxstools.h5pywriter.nptype(dtype)
    converts to numpy types

Parameters
    dtype (str) -- h5 writer type type

Returns
    nupy type

Return type
    str

nxstools.h5pywriter.open_file(filename, readonly=False, **pars)
    open the new file

Parameters

•   filename (str) -- file name

•   readonly (bool) -- readonly flag

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

Returns
    file object

Return type
    H5PYFile

nxstools.h5pywriter.target_field_view(filename, fieldpath, shape, dtype=None, maxshape=None)
    create target field view for VDS

Parameters

•   filename (str) -- file name

•   fieldpath (str) -- nexus field path

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

Returns
    target field view object

Return type
    FTTargetFieldView

nxstools.h5pywriter.unlimited(parent=None)
    return dataspace UNLIMITED variable for the current writer module

Parameters
    parent (FTObject) -- parent object

Returns
    dataspace UNLIMITED variable

Return type
    h5py.h5s.UNLIMITED

nxstools.h5pywriter.unlimited_selection(sel, shape)
    checks if hyperslab is unlimited

Parameters

•   sel (filewriter.FTHyperslab) -- hyperslab selection

•   shape (list) -- give shape

Returns
    if hyperslab is unlimited list

Return type
    list <bool>

nxstools.h5pywriter.virtual_field_layout(shape, dtype, maxshape=None)
    creates a virtual field layout for a VDS file

Parameters

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

Returns
    virtual layout

Return type
    FTVirtualFieldLayout

  nxstools.h5rediswriter module

Provides redis h5cpp file writer

class nxstools.h5rediswriter.H5RedisAttribute(h5object=None, tparent=None, h5imp=None)
    Bases: H5CppAttribute

    file tree attribute

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

•   h5imp (filewriter.FTAttribute) -- h5 implementation attribute

class nxstools.h5rediswriter.H5RedisAttributeManager(h5object=None, tparent=None, h5imp=None)
    Bases: H5CppAttributeManager

    file tree attribute

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

•   h5imp (filewriter.FTAttributeManager) -- h5 implementation attributemanager

create(name, dtype, shape=None, overwrite=False)
    create a new attribute

Parameters

•   name (str) -- attribute name

•   dtype (str) -- attribute type

•   shape (list < int >) -- attribute shape

•   overwrite (bool) -- overwrite flag

Returns
    attribute object

Return type
    H5RedisAttribute

class nxstools.h5rediswriter.H5RedisDataFilter(h5object=None, tparent=None, h5imp=None)
    Bases: H5CppDataFilter

    file tree deflate

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

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

class nxstools.h5rediswriter.H5RedisDeflate(h5object=None, tparent=None, h5imp=None)
    Bases: H5RedisDataFilter

    deflate filter

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

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

class nxstools.h5rediswriter.H5RedisField(h5object=None, tparent=None, h5imp=None)
    Bases: H5CppField

    file tree file

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

•   h5imp (filewriter.FTField) -- h5 implementation field

append_devices(value, keys=None)
    append device parameters

Parameters

•   value (any) -- device value

•   keys -- device parameter keys

append_scaninfo(value, keys=None, direct=False)
    append scan info parameters

Parameters

•   value (any) -- scan parameter value

•   keys -- scan parameter value

append_stream(name, stream)
    scan object

Parameters

•   name (str) -- stream name

•   scan (Stream) -- stream object

property attributes
    return the attribute manager

Returns
    attribute manager

Return type
    H5CppAttributeManager

get_channels(value, keys=None)
    get scan info parameters

Parameters
    keys -- device parameter keys

Returns value
    device parameter value

Rtype value
    any

get_devices(value, keys=None)
    get scan info parameters

Parameters
    keys -- device parameter keys

Returns value
    device parameter value

Rtype value
    any

get_scaninfo(keys=None, direct=False)
    get scan info parameters

Parameters
    keys -- scan parameter value

Returns value
    scan parameter value

Rtype value
    any

scan_command(command, *args, **kwargs)
    set scan attribute

Parameters

•   command (str) -- scan command

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

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

Returns
    scan command value

Return type
    any

scan_getattr(attr)
    get scan attribute

Parameters
    attr (str) -- scan attr

Returns
    scan attr value

Return type
    any

scan_setattr(attr, value)
    set attribute

Parameters

•   attr (str) -- scan attr

•   value (any) -- scan attr value

set_channels(value, keys=None)
    set device parameters

Parameters

•   value (any) -- device parameter value

•   keys -- device parameter keys

set_devices(value, keys=None)
    set device parameters

Parameters

•   value (any) -- device parameter value

•   keys -- device parameter keys

set_scan(scan)
    scan object

Parameters

•   scan -- scan object

•   type -- Scan

set_scaninfo(value, keys=None, direct=False)
    set scan info parameters

Parameters

•   value (any) -- scan parameter value

•   keys -- scan parameter value

class nxstools.h5rediswriter.H5RedisFile(h5object=None, filename=None, h5imp=None, redisurl=None, session=None)
    Bases: H5CppFile

    file tree file

    constructor

Parameters

•   h5object (any) -- h5 object

•   filename (str) -- file name

•   h5imp (filewriter.FTFile) -- h5 implementation file

•   redisurl (str) -- redis url string

•   session (str) -- redis session

append_devices(value, keys=None)
    append device info parameters

Parameters

•   value (any) -- device parameter value

•   keys -- device parameter value

append_scaninfo(value, keys=None, direct=False)
    append scan info parameters

Parameters

•   value (any) -- scan parameter value

•   keys -- scan parameter value

•   direct (any) -- scan info direct flag

append_stream(name, stream)
    scan object

Parameters

•   name (str) -- stream name

•   scan (Stream) -- stream object

finish()
    start scan

get_channels(keys=None)
    get channel info parameters

Parameters
    keys -- channel parameter keys

Returns value
    channel parameter value

Rtype value
    any

get_devices(keys=None)
    get devices info parameters

Parameters
    keys -- device parameter keys

Returns value
    device parameter value

Rtype value
    any

get_scaninfo(keys=None, direct=False)
    get scan info parameters

Parameters

•   keys -- scan parameter value

•   direct (any) -- scan info direct flag

Returns value
    scan parameter value

Rtype value
    any

prepare()
    start scan

reset_scaninfo(entryname)
    reset scan info

Parameters
    entryname (str) -- NXentry group name

root()
    root object

Returns
    parent object

Return type
    H5RedisGroup

scan_command(command, *args, **kwargs)
    set scan attribute

Parameters

•   command (str) -- scan command

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

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

Returns
    scan command value

Return type
    any

scan_getattr(attr)
    get scan attribute

Parameters
    attr (str) -- scan attr

Returns
    scan attr value

Return type
    any

scan_setattr(attr, value)
    set attribute

Parameters

•   attr (str) -- scan attr

•   value (any) -- scan attr value

set_channels(value, keys=None)
    set channel info parameters

Parameters

•   value (any) -- channel parameter value

•   keys -- channel parameter keys

set_devices(value, keys=None)
    set device info parameters

Parameters

•   value (any) -- device parameter value

•   keys -- device parameter keys

set_entryname(entryname)
    set entry name

Parameters
    entryname (str) -- entry name

set_insname(insname)
    set instrument name

Parameters
    insname (str) -- instrument name

set_scan(scan)
    scan object

Parameters
    scan (Scan) -- scan object

set_scaninfo(value, keys=None, direct=False)
    set scan info parameters

Parameters

•   value (any) -- scan parameter value

•   keys -- scan parameter value

•   direct (any) -- scan info direct flag

start()
    start scan

class nxstools.h5rediswriter.H5RedisGroup(h5object=None, tparent=None, h5imp=None, nxclass=None)
    Bases: H5CppGroup

    file tree group

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- tree parent

•   h5imp (filewriter.FTGroup) -- h5 implementation group

•   redis (any) -- redis object

•   nxclass (str) -- nxclass

class H5RedisGroupIter(group=None)
    Bases: object

    constructor

Parameters
    group (H5RedisGroup) -- group object

next()
    the next attribute

Returns
    attribute object

Return type
    FTAtribute

append_devices(value, keys=None)
    append device parameters

Parameters

•   value (any) -- device value

•   keys -- device parameter keys

append_scaninfo(value, keys=None, direct=False)
    append scan info parameters

Parameters

•   value (any) -- scan parameter value

•   keys -- scan parameter keys

•   direct (any) -- scan info direct flag

append_stream(name, stream)
    scan object

Parameters

•   name (str) -- stream name

•   scan (Stream) -- stream object

property attributes
    return the attribute manager

Returns
    attribute manager

Return type
    H5CppAttributeManager

create_field(name, type_code, shape=None, chunk=None, dfilter=None)
    open a file tree element

Parameters

•   n (str) -- group name

•   type_code (str) -- nexus field type

•   shape (list < int >) -- shape

•   chunk (list < int >) -- chunk

•   dfilter (H5CppDataFilter) -- filter deflater

Returns
    file tree field

Return type
    H5RedisField

create_group(n, nxclass=None)
    open a file tree element

Parameters

•   n (str) -- group name

•   nxclass (str) -- group type

Returns
    file tree group

Return type
    H5RedisGroup

create_virtual_field(name, layout, fillvalue=0)
    creates a virtual filed tres element

Parameters

•   name (str) -- field name

•   layout (H5CppFieldLayout) -- virual field layout

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

Returns
    file tree field

Return type
    H5RedisField

get_channels(value, keys=None)
    get scan info parameters

Parameters
    keys -- device parameter keys

Returns value
    device parameter value

Rtype value
    any

get_devices(value, keys=None)
    get scan info parameters

Parameters
    keys -- device parameter keys

Returns value
    device parameter value

Rtype value
    any

get_scaninfo(keys=None, direct=False)
    get scan info parameters

Parameters

•   keys -- scan parameter keys

•   direct (any) -- scan info direct flag

Returns value
    scan parameter value

Rtype value
    any

open(name)
    open a file tree element

Parameters
    name (str) -- element name

Returns
    file tree object

Return type
    H5RedisLink

open_link(name)
    open a file tree element as link

Parameters
    name (str) -- element name

Returns
    file tree object

Return type
    H5RedisLink

reset_scaninfo(entryname)
    reset scan info

Parameters
    entryname (str) -- NXentry group name

scan_command(command, *args, **kwargs)
    set scan attribute

Parameters

•   command (str) -- scan command

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

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

Returns
    scan command value

Return type
    any

scan_getattr(attr)
    get scan attribute

Parameters
    attr (str) -- scan attr

Returns
    scan attr value

Return type
    any

scan_setattr(attr, value)
    set attribute

Parameters

•   attr (str) -- scan attr

•   value (any) -- scan attr value

set_channels(value, keys=None)
    set device parameters

Parameters

•   value (any) -- device parameter value

•   keys -- device parameter keys

set_devices(value, keys=None)
    set device parameters

Parameters

•   value (any) -- device parameter value

•   keys -- device parameter keys

set_entryname(entryname)
    set entry name

Parameters
    entryname (str) -- entry name

set_insname(insname)
    set instrument name

Parameters
    insname (str) -- instrument name

set_scan(scan)
    scan object

Parameters

•   scan -- scan object

•   type -- Scan

set_scaninfo(value, keys=None, direct=False)
    set scan info parameters

Parameters

•   value (any) -- scan parameter value

•   keys -- scan parameter keys

•   direct (any) -- scan info direct flag

class nxstools.h5rediswriter.H5RedisLink(h5object=None, tparent=None, h5imp=None)
    Bases: H5CppLink

    file tree link

    constructor

Parameters

•   h5object (any) -- h5 object

•   tparent (FTObject) -- treee parent

class nxstools.h5rediswriter.H5RedisTargetFieldView(filename=None, fieldpath=None, shape=None, dtype=None, maxshape=None, h5imp=None)
    Bases: H5CppTargetFieldView

    target field for VDS

    constructor

Parameters

•   filename (str) -- file name

•   fieldpath (str) -- nexus field path

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

•   h5imp (filewriter.FTTargetFieldView) -- h5 implementation targetfieldview

class nxstools.h5rediswriter.H5RedisVirtualFieldLayout(h5object=None, shape=None, dtype=None, maxshape=None, h5imp=None)
    Bases: H5CppVirtualFieldLayout

    virtual field layout

    constructor

Parameters

•   h5object (any) -- h5 object

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

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

nxstools.h5rediswriter.create_file(filename, overwrite=False, redisurl=None, session=None, **pars)
    create a new file

Parameters

•   filename (str) -- file name

•   overwrite (bool) -- overwrite flag

•   libver (str) -- library version: 'lastest' or 'earliest'

•   redisurl (str) -- redis URL

•   session (str) -- redis session

Returns
    file object

Return type
    H5RedisFile

nxstools.h5rediswriter.data_filter(filterid=None, name=None, options=None, availability=None, shuffle=None, rate=None)
    create data filter

Parameters

•   filterid (int) -- hdf5 filter id

•   name (str) -- filter name

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

•   availability (str) -- filter availability i.e. 'optional' or 'mandatory'

•   shuffle (bool) -- filter shuffle

•   rate (bool) -- filter shuffle

Returns
    data filter object

Return type
    H5RedisDataFilter

nxstools.h5rediswriter.deflate_filter(rate=None, shuffle=None, availability=None)
    create data filter

Parameters

•   rate (bool) -- filter shuffle

•   shuffle (bool) -- filter shuffle

Returns
    deflate filter object

Return type
    H5RedisDataFilter

nxstools.h5rediswriter.get_links(parent)
    get links

Parameters
    parent (FTObject) -- parent object

Returns
    list of link objects

Returns
    link object

Return type

obj list <H5RedisLink>

nxstools.h5rediswriter.is_image_file_supported()
    provides if loading of image files are supported

Retruns
    if loading of image files are supported

Return type
    bool

nxstools.h5rediswriter.is_unlimited_vds_supported()
    provides if unlimited vds are supported

Retruns
    if unlimited vds are supported

Return type
    bool

nxstools.h5rediswriter.is_vds_supported()
    provides if vds are supported

Retruns
    if vds are supported

Return type
    bool

nxstools.h5rediswriter.link(target, parent, name)
    create link

Parameters

•   target (str) -- nexus path name

•   parent (FTObject) -- parent object

•   name (str) -- link name

Returns
    link object

Return type
    H5RedisLink

nxstools.h5rediswriter.load_file(membuffer, filename=None, readonly=False, **pars)
    load a file from memory byte buffer

Parameters

•   membuffer (bytes or io.BytesIO) -- memory buffer

•   filename (str) -- file name

•   readonly (bool) -- readonly flag

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

Returns
    file object

Return type
    H5RedisFile

nxstools.h5rediswriter.nptype(dtype)
    converts to numpy types

Parameters
    dtype (str) -- h5 writer type type

Returns
    nupy type

Return type
    str

nxstools.h5rediswriter.open_file(filename, readonly=False, redisurl=None, session=None, **pars)
    open the new file

Parameters

•   filename (str) -- file name

•   readonly (bool) -- readonly flag

•   redisurl (str) -- redis URL

•   session (str) -- redis session

•   libver (str) -- library version: 'lastest' or 'earliest'

Returns
    file object

Return type
    H5RedisFile

nxstools.h5rediswriter.splitstr(text)
    split string separated by space

Parameters

•   text (list <str>) -- text to split

•   text -- split text

nxstools.h5rediswriter.target_field_view(filename, fieldpath, shape, dtype=None, maxshape=None)
    create target field view for VDS

Parameters

•   filename (str) -- file name

•   fieldpath (str) -- nexus field path

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

Returns
    target field view object

Return type
    H5RedisTargetFieldView

nxstools.h5rediswriter.unlimited(parent=None)
    return dataspace UNLIMITED variable for the current writer module

Parameters
    parent (FTObject) -- parent object

Returns
    dataspace UNLIMITED variable

Return type
    h5cpp.dataspace.UNLIMITED

nxstools.h5rediswriter.unlimited_selection(sel, shape)
    checks if hyperslab is unlimited

Parameters

•   sel (filewriter.FTHyperslab) -- hyperslab selection

•   shape (list) -- give shape

Returns
    if hyperslab is unlimited list

Return type
    list <bool>

nxstools.h5rediswriter.virtual_field_layout(shape, dtype, maxshape=None)
    creates a virtual field layout for a VDS file

Parameters

•   shape (list < int >) -- shape

•   dtype (str) -- attribute type

•   maxshape (list < int >) -- shape

Returns
    virtual layout

Return type
    H5RedisVirtualFieldLayout

  nxstools.nxsargparser module

NeXus tool argumen parser

exception nxstools.nxsargparser.ErrorException
    Bases: Exception

    error parser exception

class nxstools.nxsargparser.NXSArgParser(**kwargs)
    Bases: 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.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: 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
    filewriter.FTHyperslab layout hyperslab or slices

shape
    tuple vds shape in layout

slices
    list <slice>

target
    TargetFieldView target field object

class nxstools.nxscollect.Link(parser)
    Bases: 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
    str file name

hyperslab
    filewriter.FTHyperslab field hyperslab or slices

maxshape
    list <int> field maximal shape

path
    str nexus field path with its name

shape
    list <int> field shape

slices
    list <slice>

class nxstools.nxscollect.TargetFieldsLayout(exfieldpaths='', exfieldshapes='', shapes=None, separator=',')
    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: 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: 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
    (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: 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: 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: 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: 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'
    (str) command epilog

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    str

class nxstools.nxsconfig.Get(parser)
    Bases: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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.SECoPCP(parser)
    Bases: Runner

    secop component runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) -- option parser

create()
    creates parser

description = 'create secop components'
    (str) command description

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

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

class nxstools.nxscreate.StdComp(parser)
    Bases: 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

postauto()
    creates parser

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

class nxstools.nxscreate.TangoDS(parser)
    Bases: 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.nxscreator module

Command-line tool for creating to the nexdatas configuration server

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

    component creator of all online.xml complex devices

    constructor

Parameters

•   options (optparse.Values) -- command options

•   args (list <str >) -- command arguments

•   printouts (bool) -- if printout is enable

components
    (dict <str, str >) component xml dictionary

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

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

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

xmlpackage
    (str) xml template component package

xmltemplatepath
    (str) xml template component package path

exception nxstools.nxscreator.CPExistsException
    Bases: Exception

    Component already exists exception

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

compare()

options
    (optparse.Values) creator options

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

options
    (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: 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: 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: 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
    (dict <str, str >) datasource xml dictionary

xmlpackage
    (str) xml template component package

xmltemplatepath
    (str) xml template component package path

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

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

    datasource creator of all sardana pool acquisition channels

    constructor

Parameters

•   options (optparse.Values) -- command options

•   args (list <str >) -- command arguments

•   printouts (bool) -- if printout is enable

create()
    creates datasources of all online.xml simple devices

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

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

class nxstools.nxscreator.SECoPCPCreator(options, args, printouts=True)
    Bases: CPCreator

    component creator of secop components

    constructor

Parameters

•   options (optparse.Values) -- command options

•   args (list < str >) -- command arguments

•   printouts (bool) -- if printout is enable

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

createSECoPDS(dsname, message, group=None, access=None, host=None, port=None, timeout=None)
    create SECoP datasource

Parameters

•   dsname (str) -- datasource name

•   message (str) -- secop command

•   group (str) -- secop group name

•   access (str) -- secop attribute access list

•   host (str) -- secop host name

•   port (str or float) -- secop port name

•   port -- minimum timeout

createSECoPLinkDS(entryname, samplename, sampleenvname, meanings, environments)
    create SECoP datasource

Parameters

•   entryname (str) -- secop entry name

•   samplename (str) -- secop sample name

•   sampleenvname (str) -- secop sample name

•   meanings (str) -- secop meanings list

•   environments (str) -- secop environments list

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

listmodules()
    provides a list of modules for the secop node

Returns
    list of modules for the secop node

Return type
    list <str >

class nxstools.nxscreator.StandardCPCreator(options, args, printouts=True)
    Bases: CPCreator

    component creator of standard templates

    constructor

Parameters

•   options (optparse.Values) -- command options

•   args (list < str >) -- command arguments

•   printouts (bool) -- if printout is enable

createXMLs()
    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: 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.nxsdata module

Command-line tool to ascess to Tango Data Server

class nxstools.nxsdata.CloseEntry(parser)
    Bases: 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'
    (str) command epilog

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.CloseFile(parser)
    Bases: 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'
    (str) command epilog

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
    (PyTango.DeviceProxy) NeXus writer device proxy

class nxstools.nxsdata.OpenEntry(parser)
    Bases: 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'
    (str) command epilog

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.OpenFile(parser)
    Bases: 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'
    (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

class nxstools.nxsdata.Record(parser)
    Bases: 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'
    (str) command epilog

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.Servers(parser)
    Bases: 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'
    (str) command epilog

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    str

class nxstools.nxsdata.SetData(parser)
    Bases: 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'
    (str) command epilog

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.nxsdevicetools module

NDTS TANGO device tools

nxstools.nxsdevicetools.PYTANGO = True
    (bool) True if tango 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 = {'cobold': ['BinSize', 'ExposureTime'], 'dalsa': ['FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'TriggerMode', 'Width', 'Height', 'ExtendedExposure', 'BinComment', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'FramesReceived', 'FrameRate', 'FramesPerNXFile', 'NXFileCompression', 'TurboMode', 'ImageEnc', 'ViewingMode', 'ThrashedBuffers', 'FramesToAcquire', 'AcquisitionFrameCount', 'AcquisitionMode', 'AcquisitionFrameMode', 'LinearityEqualizer', 'NrExposedFrames', 'NrOffsetFrames', 'Offset', 'PixelFormat', 'ReadOutMode', 'Standby', 'SumScheme'], 'dalsavds': ['FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'TriggerMode', 'Width', 'Height', 'ExtendedExposure', 'BinComment', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'FramesReceived', 'FrameRate', 'FramesPerNXFile', 'NXFileCompression', 'TurboMode', 'ImageEnc', 'ViewingMode', 'ThrashedBuffers', 'FramesToAcquire', 'AcquisitionFrameCount', 'AcquisitionMode', 'AcquisitionFrameMode', 'LinearityEqualizer', 'NrExposedFrames', 'NrOffsetFrames', 'Offset', 'PixelFormat', 'ReadOutMode', 'Standby', 'SumScheme'], 'eiger1m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger1m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger4m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger4m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger9m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger9m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eigerdectris': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eigerdectrismesh': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'lambda': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'lambda2m': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'OpMode', 'Translations'], 'lambdavds': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'lambdavdsnm': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'limaccd': ['camera_type', 'camera_pixelsize', 'camera_model', 'acq_mode', 'acq_nb_frames', 'acq_trigger_mode', 'acq_expo_time', '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_index_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_index_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'], 'limaccdvds': ['camera_type', 'camera_pixelsize', 'camera_model', 'acq_mode', 'acq_nb_frames', 'acq_trigger_mode', 'acq_expo_time', '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_index_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'], 'minipix': ['EnergyThreshold', 'TriggerMode', 'FrameNumbers', 'SaveAllImages', 'Width', 'Height', 'ConfigFilePath', 'FilePostfix', 'FilePrefix', 'SaveFilePath', 'FramesPerFile', 'SaveFileName', 'FileStartNum', 'AppendData', 'BiasVoltage', 'FrameCounter', 'FrameTime', 'LiveImage', 'OpMode'], 'mythen': ['Counts1', 'Counts2', 'CountsMax', 'CountsTotal', 'ExposureTime', 'FileDir', 'FileIndex', 'FilePrefix', 'Data', 'RoI1', 'RoI2'], 'mythen2': ['Counts1', 'Counts2', 'CountsMax', 'CountsTotal', 'ExposureTime', 'FileDir', 'FileIndex', 'FilePrefix', 'Data', 'Energy', 'NbFrames', 'RoI1End', 'RoI2End', 'RoI1Start', 'RoI2Start', 'Threshold'], 'pco': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pco4000': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pcoedge': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pedetector': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'perkinelmer': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'perkinelmerdetector': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'pilatus': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus100k': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus1m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus2m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus300k': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus6m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilc': ['PositionTriggerStart', 'PositionTriggerStepSize', 'PositionTriggerStop', 'NbTriggers', 'TriggerPulseLength', 'Arm', 'TriggerMode', 'TimeTriggerStart', 'TimeTriggerStepSize', 'FilePrefix', 'FileDir', 'FileName', 'TriggerCounter', 'EncoderTrigger', 'RemainingTriggers', 'EncoderTriggering', 'BufferLoad', 'Position1Conversion', 'Position2Conversion', 'Position3Conversion', 'Position4Conversion', 'Position5Conversion', 'CurrentPosition1', 'CurrentPosition2', 'CurrentPosition3', 'CurrentPosition4', 'CurrentPosition5', 'MaskDataToWrite', 'Metadata1', 'Metadata2', 'Metadata3', 'Metadata4', 'Metadata5', 'TriggersPerFile', 'SoftwareInhibit', 'HardwareInhibit', 'CounterConfig'], 'pilctimeid': ['PositionTriggerStart', 'PositionTriggerStepSize', 'PositionTriggerStop', 'NbTriggers', 'TriggerPulseLength', 'Arm', 'TriggerMode', 'TimeTriggerStart', 'TimeTriggerStepSize', 'FilePrefix', 'FileDir', 'FileName', 'TriggerCounter', 'EncoderTrigger', 'RemainingTriggers', 'EncoderTriggering', 'BufferLoad', 'Position1Conversion', 'Position2Conversion', 'Position3Conversion', 'Position4Conversion', 'Position5Conversion', 'CurrentPosition1', 'CurrentPosition2', 'CurrentPosition3', 'CurrentPosition4', 'CurrentPosition5', 'MaskDataToWrite', 'Metadata1', 'Metadata2', 'Metadata3', 'Metadata4', 'Metadata5', 'TriggersPerFile', 'SoftwareInhibit', 'HardwareInhibit', 'CounterConfig'], 'tangovimba': ['Width', 'WidthMax', 'TriggerSource', 'PixelFormat', 'OffsetY', 'OffsetX', 'HeightMax', 'Height', 'GainRaw', 'ExposureTimeAbs', 'AcquisitionFrameRateAbs', 'AcquisitionFrameRateLimit', 'StreamBytesPerSecond', 'BinComment', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'MaxLoad', 'ReadMode', 'TuneMode', 'ViewingMode'], 'xspress3': ['Compression', 'ExposureTime', 'FileDir', 'FilePrefix', 'FramesPerFile', 'MaskDataToWrite', 'MCALength', 'NbFrames', 'RingBuffer', 'RunMode', 'SaveBufferOnStop', 'SaveData', 'TriggerMode', 'LastFrame', 'LastFrameWritten', 'LastLiveFrame', 'BufferUsage', 'BufferUsageWriter']}
    (dict <str , list <str> >) important attributes of modules

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

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

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

nxstools.nxsdevicetools.storeComponent(name, xml, server, mandatory=False)
    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.nxsetup module

Set Up NeXus Tango Servers

class nxstools.nxsetup.AddRecorderPath(parser)
    Bases: 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: 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: 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: 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: 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 nxsetup set NexusWriter/haso228 -k NexusWriter -y \'{"p00/bliss_nexuswriter/test_session":{"session":"test_session","beacon_host":"haso228:25000"}}\' -t\n\n'
    (str) command epilog

run(options)
    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, hostname=None, postpone=False)
    creates configuration server

Parameters

•   beamline (str) -- beamline name

•   masterhost (str) -- master host of data writer

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

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

•   postpone (bool) -- postpone starting flag

Returns
    True if server was created

Return type
    bool

createDataWriter(beamline, masterhost, postpone=False)
    creates data writer

Parameters

•   beamline (str) -- beamline name

•   masterhost (str) -- master host of data writer

•   postpone (bool) -- postpone starting flag

Returns
    True if server was created

Return type
    bool

createSelector(beamline, masterhost, writer=None, cserver=None, postpone=False)
    creates selector server

Parameters

•   beamline (str) -- beamline name

•   masterhost (str) -- master host of data writer

•   writer (str) -- writer device name

•   cserver (str) -- configuration server device name

•   postpone (bool) -- postpone starting flag

Returns
    True if server was created

Return type
    bool

createServer(server_name, beamline, masterhost, hostname=None, class_name=None, jsondeviceproperties=None, postpone=False)
    creates tango server in DB

Parameters

•   server_name (str) -- server name

•   beamline (str) -- beamline name

•   masterhost (str) -- master host of data writer

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

•   class_name -- class name

•   jsondeviceproperties (str) -- json device properties

•   postpone (bool) -- postpone starting flag

Returns
    True if server was created

Return type
    bool

cserver_name
    (str) NeXus config server device name

db  (tango.Database) tango database server

getStarterName(host)
    restarts server

Parameters
    host (str) -- server host name

Returns
    starter device name

Return type
    str

killServer(server)

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

Parameters

•   name (str) -- server name

•   host (str) -- server host name

•   level (int) -- start up level

•   restart (bool) -- if server should be restarted

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

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

•   timeout (float) -- timeout for start

stopServer(name, host=None)
    restarts server

Parameters

•   name (str) -- server name

•   host (str) -- server host name

waitServerNotRunning(server=None, device=None, adminproxy=None, maxcnt=10000, verbose=True, waitforproc=True)
    wait until device is exported and server is running

Parameters

•   server (str) -- server name, check if running when not None

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

•   adminproxy (tango.DeviceProxy) -- Starter device proxy

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

•   verbose (bool) -- verbose mode

•   waitforproc -- wait for process list update

Returns
    True if server is running

Return type
    bool

waitServerRunning(server=None, device=None, adminproxy=None, maxcnt=10000, verbose=True, waitforproc=True)
    wait until device is exported and server is running

Parameters

•   server (str) -- server name, check if running when not None

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

•   adminproxy (tango.DeviceProxy) -- Starter device proxy

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

•   verbose (bool) -- verbose mode

•   waitforproc -- wait for process list update

Returns
    True if server is running

Return type
    bool

writer_name
    (str) NeXus writer device name

class nxstools.nxsetup.Start(parser)
    Bases: 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: 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

class nxstools.nxsetup.Wait(parser)
    Bases: Runner

    start runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) -- option parser

create()
    creates parser

description = 'wait for tango server'
    (str) command description

epilog = ' examples:\n nxsetup wait Pool/haso228 -z 30\n\n'
    (str) command epilog

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

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

nxstools.nxsetup.main()
    the main program function

  nxstools.nxsfileinfo module

Command-line tool for showing meta data from Nexus Files

class nxstools.nxsfileinfo.Attachment(parser)
    Bases: Runner

    Attachment runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) -- option parser

attachment(root, options)
    get metadata from nexus and beamtime file

Parameters

•   root (filewriter.FTGroup) -- nexus file root

•   options (argparse.Namespace) -- parser options

Returns
    atttachment metadata

Return type
    str

create()
    creates parser

description = 'generate description of attachment'
    (str) command description

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

postauto()
    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 (filewriter.FTGroup) -- nexus file root

class nxstools.nxsfileinfo.BeamtimeLoader(options)
    Bases: object

    loader constructor

Parameters
    options (argparse.Namespace) -- parser options

append_copymap_field(metadata, cmap, clist, cmapfield=None)
    overwrite metadata with dictionary

Parameters

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

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

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

•   cmapfield (str) -- copy map nexus field

Returns
    metadata dictionary

Return type
    dict <str, any>

btmdmap = {}

copylist = [['creationTime', 'endTime']]

copymap = {'description': 'scientificMetadata.title.value', 'endTime': 'scientificMetadata.end_time.value', 'scientificMetadata.ScanCommand': 'scientificMetadata.program_name.scan_command'}

cre = {'accessGroups': [], 'classification': [], 'createdAt': [], 'createdBy': [], 'creationTime': [], 'dataFormat': [], 'datasetName': [], 'datasetlifecycle': [], 'history': [], 'instrumentId': [], 'isPublished': ['false'], 'keywords': [], 'license': [], 'numberOfFiles': [], 'numberOfFilesArchived': [], 'orcidOfOwner': 'ORCID of owner https://orcid.org if available', 'ownerGroup': [], 'packedSize': [], 'publisheddataId': [], 'sampleId': [], 'scientificMetadata': {}, 'size': [], 'sourceFolderHost': [], 'techniques': [], 'updatedAt': [], 'updatedBy': [], 'validationStatus': [], 'version': []}

dr = {'applicant.*': [], 'beamlineAlias': [], 'eventStart': [], 'leader': [], 'onlineAnalysis': [], 'pi.*': [], 'proposalType': [], 'users': []}

facilityalias = {'PETRA III': 'petra3', 'PETRA IV': 'petra4'}

generate_techniques(techniques, techniques_pids=None)
    generate technique dictionary

Parameters

•   techniques (list <str>) -- a list of techniques splitted by comma

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

Returns
    technique dictionary

Return type
    dict <str, objstr>

merge(metadata)
    update metadata with dictionary

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

Returns
    metadata dictionary

Return type
    dict <str, any>

merge_copy_lists(clist)
    merge copy lists

Parameters
    clist -- overwrite copy list

Returns
    metadata dictionary

Return type
    list < [str, str] >

merge_copy_maps(cmap)
    merge copy maps

Parameters
    cmap (dict <str, str>) -- overwrite dictionary

Returns
    metadata dictionary

Return type
    dict <str, any>

newbtmdmap = {'contactEmail': ['pi.email', 'applicant.email'], 'description': ['title'], 'endTime': ['eventEnd'], 'owner': ['leader.lastname', 'applicant.lastname'], 'ownerEmail': ['leader.email', 'applicant.email'], 'principalInvestigator': ['applicant.email'], 'sourceFolder': ['corePath']}

oldbtmdmap = {'createdAt': ['generated'], 'updatedAt': ['generated']}

overwrite(metadata, cmap=None, clist=None, cmapfield=None)
    overwrite metadata with dictionary

Parameters

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

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

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

•   cmapfield (str) -- copy map nexus field

Returns
    metadata dictionary

Return type
    dict <str, any>

remove_metadata(metadata, cmap=None, clist=None, cmapfield=None)

remove metadata with dictionary with empty input or output
    in the copy map

Parameters

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

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

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

•   cmapfield (str) -- copy map nexus field

Returns
    metadata dictionary

Return type
    dict <str, any>

run()
    runner for DESY beamtime file parser

Parameters
    options (argparse.Namespace) -- parser options

Returns
    metadata dictionary

Return type
    dict <str, any>

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

update_instrumentid(metadata)
    update instrument id

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

Returns
    metadata dictionary

Return type
    dict <str, any>

update_pid(metadata, filename=None, puuid=False, pfname=False, beamtimeid=None)
    update pid metadata with dictionary

Parameters

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

•   filename (str) -- nexus filename

•   puuid (bool) -- pid with uuid

•   pfname (bool) -- pid with file name

Returns
    metadata dictionary

Return type
    dict <str, any>

update_sampleid(metadata, sampleid=None, sidfromname=False)
    update sampleid

Parameters

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

•   sampleid (str) -- sample id

•   sidfromname (bool) -- sample id from its name

Returns
    metadata dictionary

Return type
    dict <str, any>

update_techniques(metadata, techniques=None)
    update techniques

Parameters

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

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

Returns
    metadata dictionary

Return type
    dict <str, any>

class nxstools.nxsfileinfo.Field(parser)
    Bases: 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: 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

class nxstools.nxsfileinfo.GroupMetadata(parser)
    Bases: Runner

    Group Metadata runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) -- option parser

create()
    creates parser

description = 'group scan metadata information'
    (str) command description

dicttype = ['Dict', 'D', 'd', 'dict']

endpointstype = ['Endpoints', 'endpoints', 'E', 'e']

epilog = ' examples:\n nxsfileinfo groupmetadata -o /user/data/myscan.scan.json -t /user/data/myscan.attachment.json -l /user/data/myscan.origdatablock.json -c /home/user/group_config.txt -m /user/data/myscan_00023.scan.json -d /user/data/myscan_00023.origdatablock.json -a /user/data/myscan_00023.attachment.json \n \n nxsfileinfo groupmetadata myscan_m001 -m /user/data/myscan_00021.scan.json\n -c /home/user/group_config.txt \n \n nxsfileinfo groupmetadata myscan_m001 -c /home/user/group_config.txt -m /user/data/myscan_00023.scan.json -d /user/data/myscan_00023.origdatablock.json -a /user/data/myscan_00023.attachment.json \n \n nxsfileinfo groupmetadata -m /user/data/myscan_00023.scan.json -d /user/data/myscan_00023.origdatablock.json -c /home/user/group_config.txt \n\n'
    (str) command epilog

firstlasttype = ['FirstLast', 'firstlast']

firsttype = ['First', 'first', 'f', 'F']

classmethod groupmetadata(options)
    group scan metadata

Parameters
    options (argparse.Namespace) -- parser options

Returns
    [grouped metadata, grouped origdatablocks, grouped attachments]

Return type
    [str,:obj:str, str]

lasttype = ['Last', 'last', 'l', 'L']

listtype = ['List', 'L', 'l', 'list']

maxtype = ['Max', 'max']

minmaxtype = ['MinMax', 'M', 'm', 'minmax']

mintype = ['Min', 'min']

postauto()
    parser creator after autocomplete run

rangetype = ['Range', 'R', 'r', 'rangle']

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    str

show(options)
    the main function

Parameters
    options (argparse.Namespace) -- parser options

singlelisttype = ['SingleList', 'S', 's', 'singlelist']

uniquelisttype = ['UniqueList', 'U', 'u', 'uniquelist']

class nxstools.nxsfileinfo.Instrument(parser)
    Bases: Runner

    Instrument runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) -- option parser

create()
    creates parser

description = 'generate description of instrument'
    (str) command description

epilog = ' examples:\n nxsfileinfo instrument -p /petra3/p00 -n P00 -m ~/cm.json \n\n'
    (str) command epilog

instrument(options)
    create instrument metadata

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    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(options)
    the main function

Parameters
    options (argparse.Namespace) -- parser options

class nxstools.nxsfileinfo.Metadata(parser)
    Bases: Runner

    Metadata runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) -- option parser

create()
    creates parser

description = 'show metadata information for the nexus file'
    (str) command description

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

classmethod metadata(root, options)
    get metadata from nexus and beamtime file

Parameters

•   root (filewriter.FTGroup) -- nexus file root

•   options (argparse.Namespace) -- parser options

Returns
    nexus file root metadata

Return type
    str

postauto()
    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 (filewriter.FTGroup) -- nexus file root

class nxstools.nxsfileinfo.OrigDatablock(parser)
    Bases: Runner

    OrigDatablock runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) -- option parser

create()
    creates parser

datablock(options)
    dump scan datablock JSON

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    str

datafiles(scanpath, scdir, scfiles, relpath, filters=None)

description = 'generate description of all scan files'
    (str) command description

epilog = ' examples:\n nxsfileinfo origdatablock /user/data/scan_12345\n\n'
    (str) command epilog

filterout(fpath, filters)

isotime(tme)
    returns iso time string

Returns
    iso time

Return type
    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(options)
    the main function

Parameters
    options (argparse.Namespace) -- parser options

class nxstools.nxsfileinfo.Sample(parser)
    Bases: Runner

    Sample runner

    parser creator

Parameters
    parser (NXSFileInfoArgParser) -- option parser

create()
    creates parser

description = 'generate description of sample'
    (str) command description

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

postauto()
    parser creator after autocomplete run

run(options)
    the main program function

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    str

sample(options)
    create sample metadata

Parameters
    options (argparse.Namespace) -- parser options

Returns
    output information

Return type
    str

show(options)
    the main function

Parameters
    options (argparse.Namespace) -- parser options

nxstools.nxsfileinfo.getlist(text)

converts a text string to a list of lists
    with respect to newline and space characters

Parameters
    text (str) -- parser options

Returns
    a list of list

Return type
    list < list`<:obj:`str> >

nxstools.nxsfileinfo.main()
    the main program function

nxstools.nxsfileinfo.splittext(text, lmax=68)
    split text to lines

Parameters

•   text (str) -- parser options

•   lmax (int) -- maximal line length

Returns
    split text

Return type
    str

  nxstools.nxsfileparser module

NeXus main metadata viewer

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

    Metadata parser for FIO files

    constructor

Parameters
    root (str) -- fio file content

columns
    (dict <str, any>) columns dictionary

group_postfix
    (str) group postfix

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

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

    Metadata parser for NeXus files

    constructor

Parameters
    root (filewriter.FTGroup) -- nexus root node

emptyunits
    (bool) add empty units

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

classmethod getpath(path)
    converts full_path with NX_classes into nexus_path

Parameters
    path (str) -- nexus full_path

group_postfix
    (str) group postfix

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

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

scientific
    (bool) store NXentries as scientificMetadata

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

nxstools.nxsfileparser.getdsname(xmlstring)
    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.nxsfileparser.infNaN2None(obj)
    replace inf and NaN to None

nxstools.nxsfileparser.isoDate(text)
    convert date to iso format

Parameters
    text (str) -- date text to convert

Returns
    date in iso format

Return type
    str

class nxstools.nxsfileparser.numpyEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
    Bases: JSONEncoder

    numpy json encoder with list

    Constructor for JSONEncoder, with sensible defaults.

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

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

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

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

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

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

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

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

default(obj)
    default encoder

Parameters
    obj (object or any) -- numpy array object

class nxstools.nxsfileparser.numpyEncoderNull(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
    Bases: numpyEncoder

    numpy json encoder with list with nan/inf to null

    Constructor for JSONEncoder, with sensible defaults.

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

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

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

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

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

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

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

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

encode(obj, *args, **kwargs)
    Return a JSON string representation of a Python data structure.

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

  nxstools.nxsparser module

Command-line tool for ascess to the nexdatas configuration server

class nxstools.nxsparser.ESRFConverter
    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
    (list <str>) headers

title
    (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
    (list <str>) filter list

generateList()
    generate row lists of table

Returns
    table rows

Return type
    list <str>

headers
    (list <str>) table headers

loadDescription(description)
    loads description

Parameters
    description (list <str>) -- description list

title
    (str) table title

  nxstools.nxsxml module

Creator of XML configuration files

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

    Attribute tag wrapper

    constructor

Parameters

•   parent (NTag) -- parent tag element

•   nameAttr (str) -- name attribute

•   typeAttr (str) -- type attribute

setStrategy(mode='STEP', trigger=None, value=None, canfail=None)
    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: 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: 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: 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: 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
    (dict <str, NDim>) container with dim tag wrapper

class nxstools.nxsxml.NField(parent, nameAttr, typeAttr='')
    Bases: 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: 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: 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
    (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
    (lxml.etree.Element) XML root instance

fname
    (str) XML file name

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

Parameters
    etNode (lxml.etree.Element) -- node

setDependencies(components, entry=None)
    sets tag content

Parameters

•   components (list <str>) -- component dependencies

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

nxstools.nxsxml.main()
    the main function

  nxstools.release module

NXS tools release version

  nxstools.redisutils module

Provides redis utils

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

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

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

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

class Meta
    Bases: object

database = <blissdata.redis_engine.identities._UninitializedRedis object>

encoding = 'utf-8'

global_key_prefix = 'esrf'

index_name = 'esrf:id:index'

model_key_prefix = 'id'

primary_key = PrimaryKey(name='pk', field=ModelField(name='pk', type=Optional[str], required=False, default=None))

primary_key_creator_cls
    alias of UlidPrimaryKey

primary_key_pattern = '{pk}'

beamline: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

collection: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

data_policy: Union[str, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

dataset: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

name: Union[str, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

number: Union[int, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

path: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

pk: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

proposal: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

session: Union[str, None, ExpressionProxy] = <redis_om.model.model.ExpressionProxy object>

nxstools.redisutils.getDataStore(redisURL)

  Module contents

NXS tools

xml templates

nxstools.xmltemplates.moduleMultiAttributes = {'cobold': ['BinSize', 'ExposureTime'], 'dalsa': ['FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'TriggerMode', 'Width', 'Height', 'ExtendedExposure', 'BinComment', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'FramesReceived', 'FrameRate', 'FramesPerNXFile', 'NXFileCompression', 'TurboMode', 'ImageEnc', 'ViewingMode', 'ThrashedBuffers', 'FramesToAcquire', 'AcquisitionFrameCount', 'AcquisitionMode', 'AcquisitionFrameMode', 'LinearityEqualizer', 'NrExposedFrames', 'NrOffsetFrames', 'Offset', 'PixelFormat', 'ReadOutMode', 'Standby', 'SumScheme'], 'dalsavds': ['FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'TriggerMode', 'Width', 'Height', 'ExtendedExposure', 'BinComment', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'FramesReceived', 'FrameRate', 'FramesPerNXFile', 'NXFileCompression', 'TurboMode', 'ImageEnc', 'ViewingMode', 'ThrashedBuffers', 'FramesToAcquire', 'AcquisitionFrameCount', 'AcquisitionMode', 'AcquisitionFrameMode', 'LinearityEqualizer', 'NrExposedFrames', 'NrOffsetFrames', 'Offset', 'PixelFormat', 'ReadOutMode', 'Standby', 'SumScheme'], 'eiger1m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger1m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger4m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger4m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger9m16vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eiger9m32vds': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eigerdectris': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'eigerdectrismesh': ['TriggerMode', 'NbTriggers', 'Description', 'NbImages', 'BitDepth', 'ReadoutTime', 'CountTime', 'EnergyThreshold', 'FrameTime', 'RateCorrectionEnabled', 'FlatFieldEnabled', 'Temperature', 'AutoSummationEnabled', 'Humidity', 'PhotonEnergy', 'Wavelength'], 'lambda': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'lambda2m': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'OpMode', 'Translations'], 'lambdavds': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'lambdavdsnm': ['TriggerMode', 'ShutterTime', 'DelayTime', 'FrameNumbers', 'ThreadNo', 'EnergyThreshold', 'OperatingMode', 'ConfigFilePath', 'SaveAllImages', 'FilePrefix', 'FileStartNum', 'FilePreExt', 'FilePostfix', 'SaveFilePath', 'SaveFileName', 'LatestImageNumber', 'LiveMode', 'TotalLossFrames', 'CompressorShuffle', 'CompressionRate', 'CompressionEnabled', 'Layout', 'ShutterTimeMax', 'ShutterTimeMin', 'Width', 'Height', 'Depth', 'LiveFrameNo', 'DistortionCorrection', 'LiveLastImageData', 'FramesPerFile', 'OpMode', 'Translations'], 'limaccd': ['camera_type', 'camera_pixelsize', 'camera_model', 'acq_mode', 'acq_nb_frames', 'acq_trigger_mode', 'acq_expo_time', '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_index_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_index_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'], 'limaccdvds': ['camera_type', 'camera_pixelsize', 'camera_model', 'acq_mode', 'acq_nb_frames', 'acq_trigger_mode', 'acq_expo_time', '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_index_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'], 'minipix': ['EnergyThreshold', 'TriggerMode', 'FrameNumbers', 'SaveAllImages', 'Width', 'Height', 'ConfigFilePath', 'FilePostfix', 'FilePrefix', 'SaveFilePath', 'FramesPerFile', 'SaveFileName', 'FileStartNum', 'AppendData', 'BiasVoltage', 'FrameCounter', 'FrameTime', 'LiveImage', 'OpMode'], 'mythen': ['Counts1', 'Counts2', 'CountsMax', 'CountsTotal', 'ExposureTime', 'FileDir', 'FileIndex', 'FilePrefix', 'Data', 'RoI1', 'RoI2'], 'mythen2': ['Counts1', 'Counts2', 'CountsMax', 'CountsTotal', 'ExposureTime', 'FileDir', 'FileIndex', 'FilePrefix', 'Data', 'Energy', 'NbFrames', 'RoI1End', 'RoI2End', 'RoI1Start', 'RoI2Start', 'Threshold'], 'pco': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pco4000': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pcoedge': ['DelayTime', 'ExposureTime', 'NbFrames', 'TriggerMode', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'Binning_x', 'Binning_y', 'ROI_x_min', 'ROI_x_max', 'ROI_y_min', 'ROI_y_max', 'Pixelrate', 'ADCs', 'CoolingTemp', 'CoolingTempSet', 'ImageTimeStamp', 'RecorderMode'], 'pedetector': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'perkinelmer': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'perkinelmerdetector': ['BinningMode', 'FileIndex', 'ExposureTime', 'SkippedAtStart', 'SummedSaveImages', 'SkippedBetweenSaved', 'FilesAfterTrigger', 'FilesBeforeTrigger', 'SummedDarkImages', 'OutputDirectory', 'FilePattern', 'FileName', 'LogFile', 'UserComment1', 'CameraGain', 'UserComment2', 'UserComment3', 'UserComment4', 'SaveRawImages', 'SaveDarkImages', 'PerformIntegration', 'SaveIntegratedData', 'SaveSubtracted', 'PerformDarkSubtraction'], 'pilatus': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus100k': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus1m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus2m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus300k': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilatus6m': ['DelayTime', 'ExposurePeriod', 'ExposureTime', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileStartNum', 'LastImageTaken', 'NbExposures', 'NbFrames', 'MXparameters'], 'pilc': ['PositionTriggerStart', 'PositionTriggerStepSize', 'PositionTriggerStop', 'NbTriggers', 'TriggerPulseLength', 'Arm', 'TriggerMode', 'TimeTriggerStart', 'TimeTriggerStepSize', 'FilePrefix', 'FileDir', 'FileName', 'TriggerCounter', 'EncoderTrigger', 'RemainingTriggers', 'EncoderTriggering', 'BufferLoad', 'Position1Conversion', 'Position2Conversion', 'Position3Conversion', 'Position4Conversion', 'Position5Conversion', 'CurrentPosition1', 'CurrentPosition2', 'CurrentPosition3', 'CurrentPosition4', 'CurrentPosition5', 'MaskDataToWrite', 'Metadata1', 'Metadata2', 'Metadata3', 'Metadata4', 'Metadata5', 'TriggersPerFile', 'SoftwareInhibit', 'HardwareInhibit', 'CounterConfig'], 'pilctimeid': ['PositionTriggerStart', 'PositionTriggerStepSize', 'PositionTriggerStop', 'NbTriggers', 'TriggerPulseLength', 'Arm', 'TriggerMode', 'TimeTriggerStart', 'TimeTriggerStepSize', 'FilePrefix', 'FileDir', 'FileName', 'TriggerCounter', 'EncoderTrigger', 'RemainingTriggers', 'EncoderTriggering', 'BufferLoad', 'Position1Conversion', 'Position2Conversion', 'Position3Conversion', 'Position4Conversion', 'Position5Conversion', 'CurrentPosition1', 'CurrentPosition2', 'CurrentPosition3', 'CurrentPosition4', 'CurrentPosition5', 'MaskDataToWrite', 'Metadata1', 'Metadata2', 'Metadata3', 'Metadata4', 'Metadata5', 'TriggersPerFile', 'SoftwareInhibit', 'HardwareInhibit', 'CounterConfig'], 'tangovimba': ['Width', 'WidthMax', 'TriggerSource', 'PixelFormat', 'OffsetY', 'OffsetX', 'HeightMax', 'Height', 'GainRaw', 'ExposureTimeAbs', 'AcquisitionFrameRateAbs', 'AcquisitionFrameRateLimit', 'StreamBytesPerSecond', 'BinComment', 'FileDir', 'FilePostfix', 'FilePrefix', 'FileSaving', 'FileStartNum', 'FramesProcessed', 'Image16', 'Image8', 'ImageRaw', 'MaxLoad', 'ReadMode', 'TuneMode', 'ViewingMode'], 'xspress3': ['Compression', 'ExposureTime', 'FileDir', 'FilePrefix', 'FramesPerFile', 'MaskDataToWrite', 'MCALength', 'NbFrames', 'RingBuffer', 'RunMode', 'SaveBufferOnStop', 'SaveData', 'TriggerMode', 'LastFrame', 'LastFrameWritten', 'LastLiveFrame', 'BufferUsage', 'BufferUsageWriter']}
    (dict <str , list <str> >) important attributes of modules

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

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

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

    pyeval functions

•   Index

•   Module Index

•   Search Page

AUTHOR
Jan Kotanski

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