[mcstas-users] NeXuS format
Emmanuel FARHI
farhi at ill.eu
Mon Feb 28 13:56:24 CET 2011
Hello Vasily,
the 'NeXus' format generated by McStas is not a 'pure' NeXus, because
there is no 'pure' NeXus. The naming of fields is not 'official', as
indicated in the error report you sent. It does not mean that the file
is corrupted...
However you can open the files with e.g. hdfview and notice that they
look like a normal NeXus files. If you whant to generate XML files, you
may use the --format=XML option to mcrun, which will write a NeXus-like
XML file (but not 100% nexus).
Emmanuel.
On 02/28/2011 12:56 PM, Vasily wrote:
> Dear all,
> We try to use the NeXuS format for output and we have some troubles with
> validating in NeXus.
>
> What we do:
> #1 Translate into C code
> mcstas -o ./SANS.c -I ./ -t --verbose /usr/lib/mcstas/examples/SANS.instr
> #2 Compiling with NeXuS:
> icc -o ./SANS.out ./SANS.c -lmpi -DUSE_NEXUS -lNeXus
> #3 Run:
> mcrun ./SANS.out --mpi=4 --ncount=1000000 --file=out1.nxs --format=NEXUS
> Lambda=6 D_lambda=0.05 r=100 PHI=0.001 Delta_Rho=0.6 Sigma_a=0.5 Qmax=0.3
>
> mcrun ./SANS.out --mpi=4 --ncount=1000000 --file=out1.xml --format=XML
> Lambda=6 D_lambda=0.05 r=100 PHI=0.001 Delta_Rho=0.6 Sigma_a=0.5 Qmax=0.3
>
> #4 Try to convert with the NeXuS tool
> (http://download.nexusformat.org/doc/html/Utilities.html )
>
> nxconvert -x out1.nxs out2.xml
>
> Error: "Converting out1.nxs to XML NeXus file out2.xml
> No dataset open"
>
> # Try to validate
> nxvalidate out1.xml
>
> Error:
> * Validating out1.xml using definition BASE.xsd
> Corrupted file, userData for X_position__cm_ not found
> * Error converting file out1.xml to definiton XML format
>
> If somebody knows about this let me know, please.
>
> Best wishes,
> Vasily
>
--
Emmanuel FARHI,www.ill.eu/computing/people/emmanuel-farhi \|/ ____ \|/
CS-Group ILL4/221, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~
6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/
More information about the mcstas-users
mailing list