This is a list of commonly asked questions concerning the NeXus data format.
D.1. | How many facilities use NeXus? |
This is not easy to say, not all facilities using NeXus actively
participate in the committee. Some facilities have reported their
adoption status on the
| |
D.2. | NeXus files are binary? This is crazy! How am I supposed to see my data? |
NeXus files are not per se binary. If you use the XML backend the
data are stored in a relatively human readable form (see
this example).
This backend however is only recommended for very small data sets. With
the multidimensional data that is routinely recorded on many modern
instruments it is very difficult anyway to retrieve useful
information on a VT100 terminal. If you want to try, for example
| |
D.3. | What on-disk file format should I choose for my data? |
HDF5 is the default file container to use for NeXus data. It is the recommended format for all applications. HDF4 is still supported as a on disk format for NeXus but for new installations preference should be given to HDF5. The XML backend is available for special use cases. Choose this option with care considering the space and speed implications. | |
D.4. | Why are the NeXus classes so complicated? I'll never store all that information |
The NeXus classes are essentially glossaries of terms. If you need to store a piece of information, consult the class definitions to see if it has been defined. If so, use it. It is not compulsory to include every item that has been defined in the base class if it is not relevant to your experiment. On the other hand, a NeXus application definition lists a smaller set of compulsory items that should allow other researchers or software to analyze your data. You should really follow the application definition that corresponds to your experiment to take full advantage of NeXus. | |
D.5. | I don't like NeXus. I seems much faster and simpler to develop my own file format. Why should I even consider NeXus? |
If you consider using an efficient on disk storage format, HDF5 is a better choice than most others. It is fast and efficient and well supported in all main stream programming languages and a fair share of popular analysis packages. The format is so widely used and backed by a big organisation that it will continue to be supported for the foreseeable future. So if you are going to use HDF5 anyway, why not use the NeXus definition to lay out the data in a standardised way? The NeXus community spent years trying to get the standard right and while you will not agree with every single choice they made in the past, you should be able to store the data you have in a quite reasonable way. If you do not comply with NeXus chances are most people will perceive your format as different but not necessarily better than NeXus by any large measure. So it may not be worth the effort. Seriously. If you encounter any problems because the classes are not sufficient to describe your configuration, please contact the NIAC Executive Secretary explaining the problem, and post a suggestion at the relevant class wiki page. Or raise the problem in one of the mailing lists. The NIAC is always willing to consider new proposals. | |
D.6. | I want to produce an application definition. How do I go about it? |
Read the NXDL Tutorial in Creating a NXDL Specification. The procedures for acceptance are defined in the NIAC constitution. [29] | |
D.7. |
What is the purpose of |
| |
D.8. | How do I identify the plottable data? |
See the section: the section called “Find the plottable data”. | |
D.9. | How can I specify reasonable axes for my data? |
See the section: the section called “Rules for Storing Data Items in NeXus Files”. | |
D.10. |
Why aren't
|
A NeXus file can contain a number of
| |
D.11. | Specifications are complicated and often provide too much information for what I need. Where can I find some good example data files? |
There are a few checked into the definitions repository. At the moment the selection is quite limited and not very representative. This repository will be edited as more example files become available. | |
D.12. | Can I use a NXDL specification to parse a NeXus data file? |
This should be possible as there is nothing in the NeXus
specifications to prevent this but it is not implemented in NAPI.
You would need to implement it for yourself. You would be wise to
consult the algorithms in the Java version of
| |
D.13. |
Why do I need to specify the
|
| |
D.14. |
Do I have to use the |
You are not required to use the NAPI to write valid NeXus data files. It is possible to avoid the NAPI to write and read valid NeXus data files. But, the programmer who chooses this path must have more understanding of how the NeXus HDF or XML data file is written. Validation of data files written without the NAPI is strongly encouraged. | |
D.15. | I'm using links to place data in two places. Which one should be the data and which one is the link? |
NeXus uses HDF5 hard links.
Both places have pointers to the actual data.
That is the way hard links work in HDF5.
There is no need for a preference to either location.
NeXus defines a In HDF, a hard link points to a data object. A soft link points to a directory entry. Since NeXus uses hard links, there is no need to distinguish between two (or more) directory entries that point to the same data. | |
D.16. | If I write my data according to the current specification for NXsas (substitute any other application definition), will other software be able to read my data? |
Yes. NXsas, like other Application Definitions, defines and names the minimum information required for analysis or data processing. As long as all the information required by the specification is present, analysis software should be able to process the data. If other information is also present, there is no guarantee that small-angle scattering analysis software will notice. |
[29]
Refer to the most recent version of the NIAC constitution on the
NIAC wiki:
http://www.nexusformat.org/NIAC