sardana-nxsrecorder


Namesardana-nxsrecorder JSON
Version 3.29.1 PyPI version JSON
download
home_pagehttps://github.com/nexdatas/sardana-nxs-filerecorder/
SummaryNeXus Sardana Scan Recorder
upload_time2024-12-11 10:07:19
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

	  $ python3 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 Oracular, Noble Jammy 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 python3-sardana-nxsrecorder

and set the RecoderPath property of MacroServer with

.. code-block:: console

	  $ apt-get install sardana-nxsrecorder


To instal other NexDaTaS packages

.. code-block:: console

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

and

.. 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/ca/ce/15695a60d517e5c409f95d2455f970869128f503cd7bbb3754b0678c04d1/sardana-nxsrecorder-3.29.1.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  $ python3 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 Oracular, Noble Jammy 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 python3-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\n\nTo instal other NexDaTaS packages\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 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.1",
    "project_urls": {
        "Homepage": "https://github.com/nexdatas/sardana-nxs-filerecorder/"
    },
    "split_keywords": [
        "nexus",
        "sardana",
        "scan",
        "recorder",
        "data"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2775ecc7b3b1a3630d5caf200a4713e2204f3ad934ab4c150caeb7c58c72a75",
                "md5": "f9395b9290bdd73a0b8f1b85622aeaab",
                "sha256": "d779acbf6ac84cefb8392f500d0938e3b9c850f03dcfaed28fd79a0deefe09b7"
            },
            "downloads": -1,
            "filename": "sardana_nxsrecorder-3.29.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f9395b9290bdd73a0b8f1b85622aeaab",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16540,
            "upload_time": "2024-12-11T10:07:17",
            "upload_time_iso_8601": "2024-12-11T10:07:17.222045Z",
            "url": "https://files.pythonhosted.org/packages/d2/77/5ecc7b3b1a3630d5caf200a4713e2204f3ad934ab4c150caeb7c58c72a75/sardana_nxsrecorder-3.29.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cace15695a60d517e5c409f95d2455f970869128f503cd7bbb3754b0678c04d1",
                "md5": "7a5293400bc780fdc3cafaaa2c51ccbd",
                "sha256": "b4b2d894362aaff6469a8065118c30f236f34dd6db95155d92eb36cc708ad249"
            },
            "downloads": -1,
            "filename": "sardana-nxsrecorder-3.29.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7a5293400bc780fdc3cafaaa2c51ccbd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 51614,
            "upload_time": "2024-12-11T10:07:19",
            "upload_time_iso_8601": "2024-12-11T10:07:19.762139Z",
            "url": "https://files.pythonhosted.org/packages/ca/ce/15695a60d517e5c409f95d2455f970869128f503cd7bbb3754b0678c04d1/sardana-nxsrecorder-3.29.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-11 10:07:19",
    "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.50293s