[Nexus] NeXus URI schema

Pete R Jemian prjemian at gmail.com
Sat Nov 27 18:13:45 GMT 2010



For array indices, there is an example in NXcrystal that defines array 
dimensions:

     <field name="unit_cell" type="NX_FLOAT" units="NX_LENGTH">
         <doc>Unit cell parameters (lengths and angles)</doc>
         <dimensions rank="2"><!--[n_comp,6]-->
             <dim index="1" value="n_comp"/>
             <dim index="2" value="6"/>
         </dimensions>
     </field>

This definition implies there are "n_comp" different sets (first index) 
of unit cell parameters (3 lengths and 3 angles as the second index).

There is other complexity possible in the "dim" element using the "ref" 
and "refindex" attributes.  Also, the "value" attribute can be an 
algebraic expression such as "n + 2".  See the manual for the 
information that is available:
http://download.nexusformat.org/doc/html/bk02ch02s02.html#id1354248
(Note that the manual still needs some work here since the "rank" 
attribute belongs with the "dimensions" element while the other 
attributes shown go with the "dim" element.  I'll work on that soon.)

I propose (and will add a ticket later today) to add a bit more 
structure at the top of an NXDL specification that will define each of 
the algebraic variables used to describe the length of a dimension. 
This would be useful for validation of a data file against an NXDL and 
for a person to better understand the intent as it is used in an NXDL 
file.  An example for this NXcrystal instance would be:

     <NXDL_symbols>
         <symbol name="n_comp">
             <doc>number different unit cells to be described</doc>
         </symbol>
     </NXDL_symbols>

Pete


On 11/27/2010 10:52 AM, Vicente Sole wrote:
> Hello,
>
> Quoting Carlos Pascual Izarra <cpascual at cells.es>:
>
>> Hello,
>> I need to describe a certain dataset within a NeXus file as an URI.
>>
>> For example for a Nexus file called "/path/to/foo.h5" containing a 2D
>> array as
>> a dataset in "/entry/data/bar", one could describe it as:
>>
>> nexus:///patth/to/foo.h5#/entry/data/bar
>>
>> But I don't want to reinvent it if there is already an schema...
>>
>> So, is there one?
>>
>
> Perhaps I have misunderstood something.
>
> Is that not the case of a standard HDF5 external link?
>
>> If not, any comments about the one I propose?
>>
>> Any thoughts on how to describe indexes in the case of array data?
>>
>
> At the latest NIAC meeting it was decided to have an attribute
> "interpretation" with a set of defined values ("spectrum", "image",
> "vertex" and other one that I do not remember -probably "scalar"-). If
> you follow standard C order, that should take you quite far. If not,
> there were the "offsets" and "strides" (I do not remember if there was
> an s at the end or not) attributes to describe how the data were to be
> read. Is your question related to that?
>
> Best regards,
>
> Armando
>
>
>
> _______________________________________________
> NeXus mailing list
> NeXus at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus


More information about the NeXus mailing list