nxsfromxml(1)

NAME
nxsfromxml - command-line tool for creating NeXus files from XML template

SYNOPSIS
nxsfromxml [-h] [-x XMLFILE] [-p PARENT] [-d DATA] [-j JSONFILE] [-t STIME] [-n NRECORDS] [-v] [-a] [xml_config]

DESCRIPTION
nxsfromxml is a command-line tool which uses the nxswriter package to create NeXus files from XML template. Optional data can be provided in a json file or a json string as a command-line parameter.

OPTIONS

xml_config
    nexus writer configuration string optional arguments:

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

-x XMLFILE, --xml-file XMLFILE
    optional file with nexus configuration string

-p PARENT, --parent PARENT
    nexus file name and optional parent nexus path

-d DATA, --data DATA
    json string with data

-j JSONFILE, --json-file JSONFILE
    json data file in a jsonrecord attribute format

-t STIME, --time STIME
    time between record steps in seconds, default: 1 s

-n NRECORDS, --nrecords NRECORDS
    number of performed record steps

-a, --append
    append mode

-r, --no-nexus-logs
    do not create the nexus_logs group

-v, --verbose
    verbose mode

--h5cpp
    use h5cpp module as a nexus reader

--h5py
    use h5py module as a nexus reader

--pni
    use pni module as a nexus reader

EXAMPLES:
  nxsfromxml -x config.xml -p newfile.nxs -j datastring.json
    - creates a newfile.nxs file with configuration from config.xml and data from datastring.json
  nxsfromxml -x config.xml -p outputfile.nxs -d '{"sample_name":"sn", "chemical_formula":"H2O", "beamtime_id":"1234", "title":"Sample"}'
    - creates an outputfile.nxs file with configuration from config.xml and data from given json dictionary
  nxsconfig get source mono slit1 mirror2 | nxsfromxml -p basicsetup.nxs
    - creates an basicsetup.nxs file with configuration of source mono slit1 mirror2 components created by nxsconfig get

SEE ALSO
https://github.com/jkotan/nexdatas/

COPYRIGHT
Copyrights (c) 2020, GNU GPL v2, DESY, Jan Kotanski

BUGS
Please report bugs on the project's mailing list: mailto://jankotan@gmail.com

AUTHORS
Jan Kotanski <jankotan@gmail.com>