{"id":26576709,"url":"https://github.com/nexdatas/nxsdatawriter","last_synced_at":"2026-04-10T08:09:04.183Z","repository":{"id":29260626,"uuid":"32793239","full_name":"nexdatas/nxsdatawriter","owner":"nexdatas","description":"NXSDataWriter Tango server dedicated to store data in NeXuS/HDF5 files","archived":false,"fork":false,"pushed_at":"2026-02-11T13:38:01.000Z","size":7984,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2026-02-21T02:27:39.183Z","etag":null,"topics":["hdf5","nexusformat","python","tango"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nexdatas.png","metadata":{"files":{"readme":"README.rst","changelog":"ChangeLog","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2015-03-24T11:00:26.000Z","updated_at":"2026-02-11T13:34:51.000Z","dependencies_parsed_at":"2023-11-17T01:09:42.205Z","dependency_job_id":"34a261e5-33fc-4971-91dc-66f41b815cfc","html_url":"https://github.com/nexdatas/nxsdatawriter","commit_stats":{"total_commits":1612,"total_committers":10,"mean_commits":161.2,"dds":0.07071960297766744,"last_synced_commit":"27c905f1cf35bbb84ef7ba5ea5b5b5f0c8c70d3b"},"previous_names":["jkotan/nexdatas","nexdatas/writer"],"tags_count":144,"template":false,"template_full_name":null,"purl":"pkg:github/nexdatas/nxsdatawriter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexdatas%2Fnxsdatawriter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexdatas%2Fnxsdatawriter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexdatas%2Fnxsdatawriter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexdatas%2Fnxsdatawriter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nexdatas","download_url":"https://codeload.github.com/nexdatas/nxsdatawriter/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexdatas%2Fnxsdatawriter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31634125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hdf5","nexusformat","python","tango"],"created_at":"2025-03-23T03:26:48.660Z","updated_at":"2026-04-10T08:09:04.161Z","avatar_url":"https://github.com/nexdatas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Welcome to NXSDataWriter's documentation!\n=========================================\n\n|github workflow|\n|docs|\n|Pypi Version|\n|Python Versions|\n\n.. |github workflow| image:: https://github.com/nexdatas/nxsdatawriter/actions/workflows/tests.yml/badge.svg\n   :target: https://github.com/nexdatas/nxsdatawriter/actions\n   :alt:\n\n.. |docs| image:: https://img.shields.io/badge/Documentation-webpages-ADD8E6.svg\n   :target: https://nexdatas.github.io/nxsdatawriter/index.html\n   :alt:\n\n.. |Pypi Version| image:: https://img.shields.io/pypi/v/nxswriter.svg\n                  :target: https://pypi.python.org/pypi/nxswriter\n                  :alt:\n\n.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/nxswriter.svg\n                     :target: https://pypi.python.org/pypi/nxswriter/\n                     :alt:\n\n\nAuthors: Jan Kotanski, Eugen Wintersberger, Halil Pasic\n\n------------\nIntroduction\n------------\n\nNXSDataWriter is a Tango server which allows to store NeXuS Data in H5 files.\n\nThe server provides storing data from other Tango devices,\nvarious databases as well as passed by a user client via JSON strings.\n\nTango Server API: https://nexdatas.github.io/nxsdatawriter/doc_html\n\n| Source code: https://github.com/nexdatas/nxsdatawriter\n| Project Web page: https://nexdatas.github.io/nxsdatawriter\n| NexDaTaS Web page: https://nexdatas.github.io\n\n------------\nInstallation\n------------\n\nInstall the dependencies:\n\n|    pninexus or h5py, tango, numpy, nxstools, sphinx\n\nFrom sources\n\"\"\"\"\"\"\"\"\"\"\"\"\n\nDownload the latest NexDaTaS version from\n\n|    https://github.com/nexdatas/nxsdatawriter\n\nExtract sources and run\n\n.. code-block:: console\n\n\t  $ python3 setup.py install\n\nDebian packages\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nDebian `trixie`, `bookworm`, `bullseye`  or Ubuntu `questing`,  `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  $ 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\n\t  $ chmod 644 /etc/apt/trusted.gpg.d/debian-hdri-repo.gpg\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/trixie-pni-hdri.sources\n\nTo install tango server\n\n.. code-block:: console\n\n\t  $ apt-get update\n\t  $ apt-get install nxswriter\n\nor\n\n.. code-block:: console\n\n\t  $ apt-get update\n\t  $ apt-get install nxswriter3\n\nfor older python3 releases.\n\nTo install only the python3 package\n\n.. code-block:: console\n\n\t  $ apt-get update\n\t  $ apt-get install python3-nxswriter\n\nand for python2\n\n.. code-block:: console\n\n\t  $ apt-get update\n\t  $ apt-get install python-nxswriter\n\nif exists.\n\n\n\nFrom pip\n\"\"\"\"\"\"\"\"\n\nTo install it from pip you can\n\n.. code-block:: console\n\n   $ python3 -m venv myvenv\n   $ . myvenv/bin/activate\n\n   $ pip install nxswriter\n\nMoreover it is also good to install\n\n.. code-block:: console\n\n   $ pip install pytango\n   $ pip install pymysqldb\n   $ pip install psycopg2-binary\n   $ pip install cx-oracle\n\nSetting NeXus Writer Server\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nTo set up  NeXus Writer Server run\n\n.. code-block:: console\n\n          $ nxsetup -x NXSDataWriter\n\nThe *nxsetup* command comes from the **python3-nxstools** package.\n\n-----------\nClient code\n-----------\n\nIn order to use Nexus Data Server one has to write a client code. Some simple client codes\nare in the  nexdatas repository. In this section we add some\ncomments related to the client code.\n\n.. code-block:: python\n\n   # To use the Tango Server we must import the tango module and\n   # create DeviceProxy for the server.\n\n   import tango\n\n   device = \"p09/tdw/r228\"\n   dpx = tango.DeviceProxy(device)\n   dpx.set_timeout_millis(10000)\n\n   dpx.Init()\n\n   # Here device corresponds to a name of our Nexus Data Server.\n   # The Init() method resets the state of the server.\n\n   dpx.FileName = \"test.h5\"\n   dpx.OpenFile()\n\n   # We set the name of the output HDF5 file and open it.\n\n   # Now we are ready to pass the XML settings describing a structure of\n   # the output file as well as defining a way of data storing.\n   # Examples of the XMLSettings can be found in the XMLExamples directory.\n\n   with open(\"test.xml\", 'r') as fl:\n       xml = fl.read()\n   dpx.XMLSettings = xml\n\n   dpx.JSONRecord = '{\"data\": {\"parameterA\":0.2},\n\t\t\t \"decoders\":{\"DESY2D\":\"desydecoders.desy2Ddec.desy2d\"},\n\t\t\t \"datasources\":{\n\t\t              \"MCLIENT\":\"sources.DataSources.LocalClientSource\"}\n   }'\n\n   dpx.OpenEntry()\n\n   # We read our XML settings settings from a file and pass them to the server via\n   # the XMLSettings attribute. Then we open an entry group related to the XML\n   # configuration. Optionally, we can also set JSONRecord, i.e. an attribute\n   # which contains a global JSON string with data needed to store during opening\n   # the entry and also other stages of recording. If external decoder for\n   # DevEncoded data is need one can registred it passing its packages and\n   # class names in JSONRecord,\n   # e.g. \"desy2d\" class of \"DESY2D\" label in \"desydecoders.desy2Ddec\" package.\n   # Similarly making use of \"datasources\" records of the JSON string one can\n   # registred additional datasources. The OpenEntry method stores data defined\n   # in the XML string with strategy=INIT.\n   # The JSONRecord attribute can be changed during recording our data.\n\n   # After finalization of the configuration process we can start recording\n   # the main experiment data in a STEP mode.\n\n   dpx.Record('{\"data\": {\"p09/counter/exp.01\":0.1, \"p09/counter/exp.02\":1.1}}')\n\n   # Every time we call the Record method all nexus fields defined with\n   # strategy=STEP are extended by one record unit and the assigned to them data\n   # is stored. As the method argument we pass a local JSON string with the client\n   # data. To record the client data one can also use the global JSONRecord string.\n   # Contrary to the global JSON string the local one is only\n   # valid during one record step.\n\n   dpx.Record('{\"data\": {\"emittance_x\": 0.1},  \"triggers\":[\"trigger1\", \"trigger2\"]  }')\n\n   # If you denote in your XML configuration string some fields by additional\n   # trigger attributes you may ask the server to store your data only in specific\n   # record steps. This can be helpful if you want to store your data in\n   # asynchronous mode. To this end you define in the local JSON string a list of\n   # triggers which are used in the current record step.\n\n   dpx.JSONRecord = '{\"data\": {\"parameterB\":0.3}}'\n   dpx.CloseEntry()\n\n   # After scanning experiment data in 'STEP' mode we close the entry.\n   # To this end we call the CloseEntry method which also stores data defined\n   # with strategy=FINAL. Since our HDF5 file can contain many entries we can again\n   # open the entry and repeat our record procedure. If we define more than one entry\n   # in one XML setting string the defined entries are recorded parallel\n   # with the same steps.\n\n   # Finally, we can close our output file by\n\n   dpx.CloseFile()\n\nAdditionally, one can use asynchronous versions of **OpenEntry**, **Record**, **CloseEntry**, i.e.\n**OpenEntryAsynch**, **RecordAsynch**, **CloseEntryAsynch**. In this case data is stored\nin a background thread and during this writing Tango Data Server has a state *RUNNING*.\n\nIn order to build the XML configurations in the easy way the authors of the server provide\nfor this purpose a specialized GUI tool, Component Designer.\nThe attached to the server XML examples\nwas created by XMLFile class defined in XMLCreator/simpleXML.py.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexdatas%2Fnxsdatawriter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexdatas%2Fnxsdatawriter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexdatas%2Fnxsdatawriter/lists"}