Package: sardana-nxsrecorder
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-filerecorderWeb page:https://nexdatas.github.io/sardana-nxs-filerecorderNexDaTaS Web page:https://nexdatas.github.ioInstallationInstall the dependencies:sardana, sphinx, NXSDataWriter, NXSConfigServer, NXSRecSelectorFrom sourcesDownload the latest NeXuS Scan Recorder version fromhttps://github.com/nexdatas/sardana-nxs-filerecorderExtract sources and run$pythonsetup.pyinstalland add anRecorderPathproperty ofMacroServerwith its value
defining the package location, e.g./usr/lib/python2.7/dist-packages/sardananxsrecorderDebian packagesDebian 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$sudosu$wget-q-O-http://repos.pni-hdri.de/debian_repo.pub.gpg|apt-keyadd-and then download the corresponding source list$cd/etc/apt/sources.list.d$wgethttp://repos.pni-hdri.de/bookworm-pni-hdri.listFinally, for python2.7$apt-getupdate$apt-getinstallpython-sardana-nxsrecorderand set the RecoderPath property of MacroServer with$apt-getinstallsardana-nxsrecorderFor python3$apt-getupdate$apt-getinstallpython3-sardana-nxsrecorder$apt-getinstallsardana-nxsrecorder3To instal other NexDaTaS packages$apt-getinstallpython-nxswriternxsconfigserver-dbpython-nxsconfigservernxsconfigtoolpython-nxstoolsnxswriternxsconfigservernxsrecselectoror for python 3$apt-getinstallpython3-nxswriternxsconfigserver-dbpython3-nxsconfigservernxsconfigtool3python3-nxstoolsnxswriter3nxsconfigserver3and$apt-getinstallpython-nxsrecselectornxsrecselectornxselectoror for python3$apt-getinstallpython3-nxsrecselectornxsrecselector3nxselector3for Component Selector for Sardana related packages.Setting environmentSetting SaradnaIf sardana is not yet set up run$Poolenter a new instance namecreate the new instanceThen wait a while until Pool is started and in a new terminal run$MacroServerenter a new instance namecreate the new instanceconnect poolNext, 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$nxsetupstartPool-l2wait until Pool is started and run$nxsetupstartMacroServer-l3Additionally, one can create dummy devices by runningsar_demoin$spockSetting NeXus ServersTo set up  NeXus Servers run$nxsetupsetor$nxsetupsetNXSDataWriter$nxsetupsetNXSConfigServer$nxsetupsetNXSRecSelectorfor specific servers.If theRecoderPathproperty of MacroServer is not set one can do it by$nxsetupadd-recorder-path/usr/lib/python2.7/dist-packages/sardananxsrecorderwhere the path should point thesardananxsrecorderpackage.Sardana VariablesThe NeXus file recorder uses the following sardana environment variablesActiveMntGrp(str)- active measurement groupScanID(int)- the last scan identifier number, default:-1NeXusSelectorDevice(str)- NXSRecSelector tango device if more installed, otherwise first one foundNXSAppendSciCatDataset(bool)- append scan name to scicat dataset list file, default:FalseBeamtimeFilePath(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:FalseSciCatAutoGrouping(bool)- group all scans with the measurement name set to the base scan filename, default:FalseMetadataScript(str)- a python module file name containingmain()which provides a dictionary with user metadata stored in the INIT mode, default:""