[Nexus] NXnote

Watts Benjamin (PSI) benjamin.watts at psi.ch
Wed Sep 30 11:03:04 BST 2020


Hi Gerrit,

   The idea of NXnote is that the 'data' field contains an entire file as it would be written to disk. Perhaps it is easier to understand if you think about using NXnote to store a JPEG image as a binary blob and then treat your text file in the same manner. The specification about the line terminator is there because different OS's use different sets of characters to show a new line and NeXus follows the Windows version. See here for further detail: https://en.wikipedia.org/wiki/Newline#Representation


Are you perhaps thinking about writing each line of the log to NXnote during the experiment (rather than lumping it all in at the end)? Such usage might indeed be a bit cumbersome and I'll bring it up in our teleconference this afternoon.


Cheers,

Ben

________________________________
From: NeXus <nexus-bounces at shadow.nd.rl.ac.uk> on behalf of Günther, Gerrit via NeXus <nexus at shadow.nd.rl.ac.uk>
Sent: Wednesday, 30 September 2020 9:46:45 AM
To: nexus at nexusformat.org
Cc: Günther, Gerrit
Subject: [Nexus] NXnote

Dear all,

I would like to store an ASCII log file on the '/entry/notes' level according to the NXnote class.

I guess 'type' is defined as 'text/plain' but what about the 'data' field? Does 'Binary note data - if text, line terminator is [CR][LF]' mean that the line terminator has to be [CR][LF] and then the ASCII text file is converted to binary?

That seems a little bit cumbersome to save a string... I would very appreciate it if someone could clarify the procedure.

Best regards
Gerrit Günther

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Dr. Volkmar Dietz, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Bernd Rech (Sprecher), Prof. Dr. Jan Lüning, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nexusformat.org/pipermail/nexus/attachments/20200930/a4e1d53f/attachment-0001.htm>


More information about the NeXus mailing list