sardana-nxsrecorder


Namesardana-nxsrecorder JSON
Version 3.29.0 PyPI version JSON
download
home_pagehttps://github.com/nexdatas/sardana-nxs-filerecorder/
SummaryNeXus Sardana Scan Recorder
upload_time2024-07-19 07:46:03
maintainerNone
docs_urlNone
authorJan Kotanski
requires_pythonNone
licenseGNU GENERAL PUBLIC LICENSE v3
keywords nexus sardana scan recorder data
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Welcome to sardananxsrecorder's documentation!
==============================================
|github workflow|
|docs|
|Pypi Version|
|Python Versions|

.. |github workflow| image:: https://github.com/nexdatas/sardana-nxs-filerecorder/actions/workflows/tests.yml/badge.svg
   :target: https://github.com/nexdatas/sardana-nxs-filerecorder/actions
   :alt:

.. |docs| image:: https://img.shields.io/badge/Documentation-webpages-ADD8E6.svg
   :target: https://nexdatas.github.io/sardana-nxs-filerecorder/index.html
   :alt:

.. |Pypi Version| image:: https://img.shields.io/pypi/v/sardana-nxsrecorder.svg
                  :target: https://pypi.python.org/pypi/sardana-nxsrecorder
                  :alt:

.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/sardana-nxsrecorder.svg
                     :target: https://pypi.python.org/pypi/sardana-nxsrecorder/
                     :alt:


NeXus scan recorder for Sardana which stores experimenal data in NeXus/HDF5 file with use of
NeXDatas Tango Server or packages, i.e. NXSDataWriter, NXSConfigServer, NXSRecSelector.

| Source code: https://github.com/nexdatas/sardana-nxs-filerecorder
| Web page: https://nexdatas.github.io/sardana-nxs-filerecorder
| NexDaTaS Web page: https://nexdatas.github.io


------------
Installation
------------

Install the dependencies:

|    sardana, sphinx, NXSDataWriter, NXSConfigServer, NXSRecSelector

From sources
""""""""""""

Download the latest NeXuS Scan Recorder version from

|    https://github.com/nexdatas/sardana-nxs-filerecorder

Extract sources and run

.. code-block:: console

	  $ python setup.py install

and add an *RecorderPath* property of *MacroServer* with its value
defining the package location, e.g.

|    /usr/lib/python2.7/dist-packages/sardananxsrecorder


Debian packages
"""""""""""""""

Debian Bookworm, Bullseye, Buster and Ubuntu Lunar, Jammy and Focal packages can be found in the HDRI repository.

To install the debian packages, add the PGP repository key

.. code-block:: console

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

and then download the corresponding source list

.. code-block:: console

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


Finally, for python2.7

.. code-block:: console

	  $ apt-get update
	  $ apt-get install python-sardana-nxsrecorder

and set the RecoderPath property of MacroServer with

.. code-block:: console

	  $ apt-get install sardana-nxsrecorder

For python3

.. code-block:: console

	  $ apt-get update
	  $ apt-get install python3-sardana-nxsrecorder
	  $ apt-get install sardana-nxsrecorder3

To instal other NexDaTaS packages

.. code-block:: console

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

or for python 3

.. code-block:: console

	  $ apt-get install python3-nxswriter nxsconfigserver-db python3-nxsconfigserver nxsconfigtool3 python3-nxstools nxswriter3 nxsconfigserver3

and

.. code-block:: console

	  $ apt-get install python-nxsrecselector nxsrecselector nxselector

or for python3

.. code-block:: console

	  $ apt-get install python3-nxsrecselector nxsrecselector3 nxselector3

for Component Selector for Sardana related packages.

-------------------
Setting environment
-------------------

Setting Saradna
"""""""""""""""

If sardana is not yet set up run


.. code-block:: console

	  $ Pool

- enter a new instance name
- create the new instance

Then wait a while until Pool is started and in a new terminal run

.. code-block:: console

	  $ MacroServer

- enter a new instance name
- create the new instance
- connect pool

Next, run Astor and change start-up levels: for Pool to 2,
for MacroServer to 3 and restart servers.

Alternatively, terminate Pool and MacroServer in the terminals and run

.. code-block:: console

          $ nxsetup start Pool -l2

wait until Pool is started and run

.. code-block:: console

          $ nxsetup start MacroServer -l3


Additionally, one can create dummy devices by running `sar_demo` in

.. code-block:: console

	  $ spock


Setting NeXus Servers
"""""""""""""""""""""

To set up  NeXus Servers run

.. code-block:: console

	  $ nxsetup set

or

.. code-block:: console

          $ nxsetup set NXSDataWriter
          $ nxsetup set NXSConfigServer
	  $ nxsetup set NXSRecSelector

for specific servers.

If the `RecoderPath` property of MacroServer is not set one can do it by

.. code-block:: console

	  $ nxsetup add-recorder-path /usr/lib/python2.7/dist-packages/sardananxsrecorder

where the path should point the `sardananxsrecorder` package.

-----------------
Sardana Variables
-----------------

The NeXus file recorder uses the following sardana environment variables

* **ActiveMntGrp** *(str)* - active measurement group
* **ScanID** *(int)* - the last scan identifier number, default: ``-1``
* **ScanDir** *(str)* - the scan directory
* **ScanFile** *(list)* - a list of scan files
* **NeXusSelectorDevice** *(str)* - NXSRecSelector tango device if more installed, otherwise first one found

* **NXSAppendSciCatDataset** *(bool)* - append scan name to scicat dataset list file, default: ``False``
* **BeamtimeFilePath** *(str)* - beamtime file path to search beamtime metadata file, default: ``"/gpfs/current"``
* **BeamtimeFilePrefix** *(str)* - beamtime metadata file prefix, default: ``"beamtime-metadata-"``
* **BeamtimeFileExt** *(str)* - beamtime metadata file extension, default: ``".json"``
* **SciCatDatasetListFilePrefix** *(str)* - scicat dataset list file prefix, default: ``"scicat-datasets-"``
* **SciCatDatasetListFileExt** *(str)* - scicat dataset list file extension, default: ``".lst"``
* **SciCatDatasetListFileLocal** *(bool)* - add the hostname to the scicat dataset list file extension, default: ``False``
* **SciCatAutoGrouping** *(bool)* - group all scans with the measurement name set to the base scan filename, default: ``False``
* **MetadataScript** *(str)* - a python module file name containing ``main()``  which provides a dictionary with user metadata stored in the INIT mode, default: ``""``
* **ScicatMeasurements** *(dict)* - a dictionary of  measurement names indexed by ``ScanDir`` and  used by ``scingestor``, default: ``{}``
* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``
* **NeXusWriterProperties** *(dict)* - a dictionary of TangoDataWriter (NXSDataWriter) properties (starting with a small letter)
* **NeXusMeshScanID** *(int)* - ScanID used for composed scans e.g. mesh scan combined from many linear scans
* **NeXusWriterModes** *(list)* - a list of strategy modes e.g. ``NOINIT``, ``NOSTEP``, ``NOFINAL``, ``MESH``, ``VDS``  separated by commas
* **ScanNames** *(bool)* - special mode of using ScanName directories i.e.

  * ``True``: the master file in the ScanName directory,

  * ``False``: the master file in the grouping ScanName directory (e.g. without ScanID),

  * ``None`` (or undefined):  standard mode where the master files are outside the ScanName directory

* **ScanNamesNoGrouping** *(bool)* - do not perform grouping when ``ScanNames`` is ``False``
* **ScanNamesNoMetadata** *(bool)* - do not perform master file metadata ingestion when ``ScanNames`` is ``False``
 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nexdatas/sardana-nxs-filerecorder/",
    "name": "sardana-nxsrecorder",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "NeXus sardana scan recorder data",
    "author": "Jan Kotanski",
    "author_email": "jankotan@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7b/c1/dd66210a01510290a519cd0d9c92d130979da14e52fefc149f7601a538c3/sardana-nxsrecorder-3.29.0.tar.gz",
    "platform": null,
    "description": "Welcome to sardananxsrecorder's documentation!\n==============================================\n|github workflow|\n|docs|\n|Pypi Version|\n|Python Versions|\n\n.. |github workflow| image:: https://github.com/nexdatas/sardana-nxs-filerecorder/actions/workflows/tests.yml/badge.svg\n   :target: https://github.com/nexdatas/sardana-nxs-filerecorder/actions\n   :alt:\n\n.. |docs| image:: https://img.shields.io/badge/Documentation-webpages-ADD8E6.svg\n   :target: https://nexdatas.github.io/sardana-nxs-filerecorder/index.html\n   :alt:\n\n.. |Pypi Version| image:: https://img.shields.io/pypi/v/sardana-nxsrecorder.svg\n                  :target: https://pypi.python.org/pypi/sardana-nxsrecorder\n                  :alt:\n\n.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/sardana-nxsrecorder.svg\n                     :target: https://pypi.python.org/pypi/sardana-nxsrecorder/\n                     :alt:\n\n\nNeXus scan recorder for Sardana which stores experimenal data in NeXus/HDF5 file with use of\nNeXDatas Tango Server or packages, i.e. NXSDataWriter, NXSConfigServer, NXSRecSelector.\n\n| Source code: https://github.com/nexdatas/sardana-nxs-filerecorder\n| Web page: https://nexdatas.github.io/sardana-nxs-filerecorder\n| NexDaTaS Web page: https://nexdatas.github.io\n\n\n------------\nInstallation\n------------\n\nInstall the dependencies:\n\n|    sardana, sphinx, NXSDataWriter, NXSConfigServer, NXSRecSelector\n\nFrom sources\n\"\"\"\"\"\"\"\"\"\"\"\"\n\nDownload the latest NeXuS Scan Recorder version from\n\n|    https://github.com/nexdatas/sardana-nxs-filerecorder\n\nExtract sources and run\n\n.. code-block:: console\n\n\t  $ python setup.py install\n\nand add an *RecorderPath* property of *MacroServer* with its value\ndefining the package location, e.g.\n\n|    /usr/lib/python2.7/dist-packages/sardananxsrecorder\n\n\nDebian packages\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nDebian Bookworm, Bullseye, Buster and Ubuntu Lunar, Jammy and Focal packages can be found in the HDRI repository.\n\nTo install the debian packages, add the PGP repository key\n\n.. code-block:: console\n\n\t  $ sudo su\n\t  $ wget -q -O - http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -\n\nand then download the corresponding source list\n\n.. code-block:: console\n\n\t  $ cd /etc/apt/sources.list.d\n\t  $ wget http://repos.pni-hdri.de/bookworm-pni-hdri.list\n\n\nFinally, for python2.7\n\n.. code-block:: console\n\n\t  $ apt-get update\n\t  $ apt-get install python-sardana-nxsrecorder\n\nand set the RecoderPath property of MacroServer with\n\n.. code-block:: console\n\n\t  $ apt-get install sardana-nxsrecorder\n\nFor python3\n\n.. code-block:: console\n\n\t  $ apt-get update\n\t  $ apt-get install python3-sardana-nxsrecorder\n\t  $ apt-get install sardana-nxsrecorder3\n\nTo instal other NexDaTaS packages\n\n.. code-block:: console\n\n\t  $ apt-get install python-nxswriter nxsconfigserver-db python-nxsconfigserver nxsconfigtool python-nxstools nxswriter nxsconfigserver nxsrecselector\n\nor for python 3\n\n.. code-block:: console\n\n\t  $ apt-get install python3-nxswriter nxsconfigserver-db python3-nxsconfigserver nxsconfigtool3 python3-nxstools nxswriter3 nxsconfigserver3\n\nand\n\n.. code-block:: console\n\n\t  $ apt-get install python-nxsrecselector nxsrecselector nxselector\n\nor for python3\n\n.. code-block:: console\n\n\t  $ apt-get install python3-nxsrecselector nxsrecselector3 nxselector3\n\nfor Component Selector for Sardana related packages.\n\n-------------------\nSetting environment\n-------------------\n\nSetting Saradna\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nIf sardana is not yet set up run\n\n\n.. code-block:: console\n\n\t  $ Pool\n\n- enter a new instance name\n- create the new instance\n\nThen wait a while until Pool is started and in a new terminal run\n\n.. code-block:: console\n\n\t  $ MacroServer\n\n- enter a new instance name\n- create the new instance\n- connect pool\n\nNext, run Astor and change start-up levels: for Pool to 2,\nfor MacroServer to 3 and restart servers.\n\nAlternatively, terminate Pool and MacroServer in the terminals and run\n\n.. code-block:: console\n\n          $ nxsetup start Pool -l2\n\nwait until Pool is started and run\n\n.. code-block:: console\n\n          $ nxsetup start MacroServer -l3\n\n\nAdditionally, one can create dummy devices by running `sar_demo` in\n\n.. code-block:: console\n\n\t  $ spock\n\n\nSetting NeXus Servers\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nTo set up  NeXus Servers run\n\n.. code-block:: console\n\n\t  $ nxsetup set\n\nor\n\n.. code-block:: console\n\n          $ nxsetup set NXSDataWriter\n          $ nxsetup set NXSConfigServer\n\t  $ nxsetup set NXSRecSelector\n\nfor specific servers.\n\nIf the `RecoderPath` property of MacroServer is not set one can do it by\n\n.. code-block:: console\n\n\t  $ nxsetup add-recorder-path /usr/lib/python2.7/dist-packages/sardananxsrecorder\n\nwhere the path should point the `sardananxsrecorder` package.\n\n-----------------\nSardana Variables\n-----------------\n\nThe NeXus file recorder uses the following sardana environment variables\n\n* **ActiveMntGrp** *(str)* - active measurement group\n* **ScanID** *(int)* - the last scan identifier number, default: ``-1``\n* **ScanDir** *(str)* - the scan directory\n* **ScanFile** *(list)* - a list of scan files\n* **NeXusSelectorDevice** *(str)* - NXSRecSelector tango device if more installed, otherwise first one found\n\n* **NXSAppendSciCatDataset** *(bool)* - append scan name to scicat dataset list file, default: ``False``\n* **BeamtimeFilePath** *(str)* - beamtime file path to search beamtime metadata file, default: ``\"/gpfs/current\"``\n* **BeamtimeFilePrefix** *(str)* - beamtime metadata file prefix, default: ``\"beamtime-metadata-\"``\n* **BeamtimeFileExt** *(str)* - beamtime metadata file extension, default: ``\".json\"``\n* **SciCatDatasetListFilePrefix** *(str)* - scicat dataset list file prefix, default: ``\"scicat-datasets-\"``\n* **SciCatDatasetListFileExt** *(str)* - scicat dataset list file extension, default: ``\".lst\"``\n* **SciCatDatasetListFileLocal** *(bool)* - add the hostname to the scicat dataset list file extension, default: ``False``\n* **SciCatAutoGrouping** *(bool)* - group all scans with the measurement name set to the base scan filename, default: ``False``\n* **MetadataScript** *(str)* - a python module file name containing ``main()``  which provides a dictionary with user metadata stored in the INIT mode, default: ``\"\"``\n* **ScicatMeasurements** *(dict)* - a dictionary of  measurement names indexed by ``ScanDir`` and  used by ``scingestor``, default: ``{}``\n* **CreateMeasurementFile** *(bool)* - create a measurement file with its filename releated to ``ScicatMeasurements`` or ``ScanFile``, default: ``False``\n* **NeXusWriterProperties** *(dict)* - a dictionary of TangoDataWriter (NXSDataWriter) properties (starting with a small letter)\n* **NeXusMeshScanID** *(int)* - ScanID used for composed scans e.g. mesh scan combined from many linear scans\n* **NeXusWriterModes** *(list)* - a list of strategy modes e.g. ``NOINIT``, ``NOSTEP``, ``NOFINAL``, ``MESH``, ``VDS``  separated by commas\n* **ScanNames** *(bool)* - special mode of using ScanName directories i.e.\n\n  * ``True``: the master file in the ScanName directory,\n\n  * ``False``: the master file in the grouping ScanName directory (e.g. without ScanID),\n\n  * ``None`` (or undefined):  standard mode where the master files are outside the ScanName directory\n\n* **ScanNamesNoGrouping** *(bool)* - do not perform grouping when ``ScanNames`` is ``False``\n* **ScanNamesNoMetadata** *(bool)* - do not perform master file metadata ingestion when ``ScanNames`` is ``False``\n \n",
    "bugtrack_url": null,
    "license": "GNU GENERAL PUBLIC LICENSE v3",
    "summary": "NeXus Sardana Scan Recorder",
    "version": "3.29.0",
    "project_urls": {
        "Homepage": "https://github.com/nexdatas/sardana-nxs-filerecorder/"
    },
    "split_keywords": [
        "nexus",
        "sardana",
        "scan",
        "recorder",
        "data"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ffb916a3837c2ec64848ce3712925e323166a5b6553941f483863cfdf4ab88c6",
                "md5": "69b8d0c98b67d0c4af84798aa4be193d",
                "sha256": "ae13e22cc87c45699a39111520a58e4d64c2cf4fcbeaaf713789ee11dd54ced8"
            },
            "downloads": -1,
            "filename": "sardana_nxsrecorder-3.29.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "69b8d0c98b67d0c4af84798aa4be193d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16570,
            "upload_time": "2024-07-19T07:46:01",
            "upload_time_iso_8601": "2024-07-19T07:46:01.356939Z",
            "url": "https://files.pythonhosted.org/packages/ff/b9/16a3837c2ec64848ce3712925e323166a5b6553941f483863cfdf4ab88c6/sardana_nxsrecorder-3.29.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7bc1dd66210a01510290a519cd0d9c92d130979da14e52fefc149f7601a538c3",
                "md5": "d7f12323505a00b88484f995b1e06a8e",
                "sha256": "2b9186929a53ef98f32b90d557ac4c33b3788e6a4226850fc3f206f8014bd5fa"
            },
            "downloads": -1,
            "filename": "sardana-nxsrecorder-3.29.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d7f12323505a00b88484f995b1e06a8e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 51679,
            "upload_time": "2024-07-19T07:46:03",
            "upload_time_iso_8601": "2024-07-19T07:46:03.174742Z",
            "url": "https://files.pythonhosted.org/packages/7b/c1/dd66210a01510290a519cd0d9c92d130979da14e52fefc149f7601a538c3/sardana-nxsrecorder-3.29.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-19 07:46:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nexdatas",
    "github_project": "sardana-nxs-filerecorder",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sardana-nxsrecorder"
}
        
Elapsed time: 0.31285s