[Nexus] NeXus - a solution to what is not the real problem ?

Mark Koennecke Mark.Koennecke at psi.ch
Wed Mar 10 09:50:17 GMT 2010


Joachim and all,

Wuttke, Joachim wrote:
> Concerning the API, Brian has described how a scientist works around
> to retrieve a binary block from a huge data file. Let me just consider the
> opposite case of retrieving a scalar from a small data file: to automatize
> looking up when a measurement was started, I need no more than
>
> #!/usr/bin/ruby
> require 'yaml'
> f = open("raw_data_file_name")
> d = YAML::load(f)
> puts d['Shortpar']['scan_since']
>
>   
Here is the equivalent for NeXus in python:
#! /usr/bin/python
import nxs

in = nxs.open('nexus_file_name', 'r')
in.openpath('/entry/start_time')
print in.getdata()


This is not so much more complicated.

Then I want to note that in science there is a fundamental limit to 
standardization. In science
you are supposed to do new things and you cannot standardize what you do 
not know. This
applies to NeXus too. SPHERES is in that respect a nice example as it 
appears to me as a novel
instrument design, as a one of a kind. So, the raw data format can be 
NeXus but is not so important
and SPHERES meeting point with users may actually be S(Q,omega)

But on the other hand there are established techniques like powder 
diffraction or SAS where not the instrument
is important but the properties of the sample. Here standardization can 
really make a lot of difference.


The other argument is that the benefits of NeXus come in several layers:
- Using a mature file format and API reduces software bugs and improves 
readability
- Given appropriate programming techniques a DR or DA application can 
read any NeXus file
  containing the necessary data, even if does not conform to an 
application definition, at the expense
  of editing a dictionary file.
- Using NeXus structures and dictionary names gives a documented meaning 
to the data for a user
  looking at it in 10 years time.
- The last layer is proper standardization with an application 
definition which makes the life of
 a DA developer so much more easier.


Concerning the uptake of NeXus: we see that new things are usually done 
with NeXus. The trouble is
that so few new things are done. There is no decent funding support for 
scientific software and so
people make do with whatever they have.  This is also the reason why 
there is no funding for NeXus.


Note for Gerd:  welcome in the club!  Having  a token and subsequently 
get an description how to store
something in a NeXus file and an API to do just this is the point of 
NXdict.





Best Regards,

   Mark


More information about the NeXus mailing list