sardana-nxsrecorder


Namesardana-nxsrecorder JSON
Version 3.26.0 PyPI version JSON
download
home_pagehttps://github.com/nexdatas/sardana-nxs-filerecorder/
SummaryNeXus Sardana Scan Recorder
upload_time2024-06-11 08:35:14
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
  

            

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/d2/fd/643f3908ccb925a17a7be592e42ea12864db71b5318908350b93d52ffd88/sardana-nxsrecorder-3.26.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  \n",
    "bugtrack_url": null,
    "license": "GNU GENERAL PUBLIC LICENSE v3",
    "summary": "NeXus Sardana Scan Recorder",
    "version": "3.26.0",
    "project_urls": {
        "Homepage": "https://github.com/nexdatas/sardana-nxs-filerecorder/"
    },
    "split_keywords": [
        "nexus",
        "sardana",
        "scan",
        "recorder",
        "data"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a538143070e73d0e1790e87b04916df0e185bbef39b81286e31bc54853469178",
                "md5": "25407b9a2532f8b15cd4ae7a23ad6cae",
                "sha256": "ab779cc2a7105dbf7e8e8f0974f556acd4ae4e16b29e7e21807551225fa04e3a"
            },
            "downloads": -1,
            "filename": "sardana_nxsrecorder-3.26.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "25407b9a2532f8b15cd4ae7a23ad6cae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16181,
            "upload_time": "2024-06-11T08:35:12",
            "upload_time_iso_8601": "2024-06-11T08:35:12.232037Z",
            "url": "https://files.pythonhosted.org/packages/a5/38/143070e73d0e1790e87b04916df0e185bbef39b81286e31bc54853469178/sardana_nxsrecorder-3.26.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2fd643f3908ccb925a17a7be592e42ea12864db71b5318908350b93d52ffd88",
                "md5": "454ae8611828003524a16565cc71bc3d",
                "sha256": "3adaf3369d5a4959b8565d55fcb6d7e638d9c84f46cb6a750aa7f34184e14943"
            },
            "downloads": -1,
            "filename": "sardana-nxsrecorder-3.26.0.tar.gz",
            "has_sig": false,
            "md5_digest": "454ae8611828003524a16565cc71bc3d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 50915,
            "upload_time": "2024-06-11T08:35:14",
            "upload_time_iso_8601": "2024-06-11T08:35:14.160663Z",
            "url": "https://files.pythonhosted.org/packages/d2/fd/643f3908ccb925a17a7be592e42ea12864db71b5318908350b93d52ffd88/sardana-nxsrecorder-3.26.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-11 08:35:14",
    "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.26346s