[NeXus-tech] [Fwd: Re: dimensions]
Pete Jemian
prjemian at gmail.com
Thu Feb 19 19:53:10 GMT 2009
perhaps:
---------------------------------% clip here
%---------------------------------
<field name="final_wavelength" type="NX_FLOAT" units="NX_LENGTH">
<doc>Wavelength on leaving beamline component</doc>
<dimensions size="1">
<dim index="1">:</dim>
</dimensions>
</field>
<field name="final_beam_divergence" type="NX_FLOAT" units="NX_ANGLE">
<doc>Divergence FWHM of beam leaving this component</doc>
<dimensions size="2"><!-- [2,:] -->
<dim index="1">2</dim>
<dim index="2">:</dim>
</dimensions>
</field>
<field name="flux" type="NX_FLOAT" units="NX_FLUX">
<doc>flux incident on beam plane area</doc>
<dimensions size="1">
<dim index="1">i</dim>
</dimensions>
</field>
---------------------------------% clip here
%---------------------------------
Pete Jemian wrote:
> Regarding the definition of dimensions, so far, so good.
> Now, here is part of (revised) NXbeam.nxdl.xml:
>
> ---------------------------------% clip here %---------------------------------
> <field name="final_wavelength_spread" type="NX_FLOAT" units="NX_LENGTH">
> <doc>Wavelength spread FWHM of beam leaving this component</doc>
> <dimensions size="[:]" />
> </field>
> <field name="final_beam_divergence" type="NX_FLOAT" units="NX_ANGLE">
> <doc>Divergence FWHM of beam leaving this component</doc>
> <dimensions size="2"><!-- [2,:] --></dimensions>
> </field>
> <field name="flux" type="NX_FLOAT" units="NX_FLUX">
> <doc>flux incident on beam plane area</doc>
> <dimensions size="i" />
> </field>
> ---------------------------------% clip here %---------------------------------
>
> How do we handle this? (So far, it is valid by the changes in NXDL rules.)
> Also, we need better documentation strings than given below.
>
>
> (Here is just the revised part of nxdl.xsd):
> ---------------------------------% clip here %---------------------------------
> <xs:complexType name="dimsType">
> <!--
> Here is a model:
> <field name="data">
> <dimensions size="3"/>
> ...
> </field><field name="time-of-flight">
> <dimensions size="1">
> <dim index="1" ref="data" refindex="3" incr="1"/>
> </dimensions>
> ...
> </field>
>
> In old terms this would make data[i,j,k] and time-of-flight[k+1].
> We need to get to the stage where people
> don't need to read a manual to understand an existing NXDL.
> -->
> <xs:annotation>
> <xs:documentation>dimensions of a data element in a NeXus
> file</xs:documentation>
> </xs:annotation>
> <xs:sequence>
> <xs:element name="dim" minOccurs="0" maxOccurs="unbounded">
> <xs:complexType>
> <xs:attribute name="index" type="nx:NX_CHAR">
> <xs:annotation>
> <xs:documentation>Number indicating which subscript is being referenced,
> ranging from 1 up to RANK (rank of the data structure). For example,
> given an array A[i,j,k], index="1" would refer to the "i" subscript.</xs:documentation>
> </xs:annotation>
> </xs:attribute>
> <xs:attribute name="ref" type="nx:NX_CHAR">
> <xs:annotation>
> <xs:documentation>Name of the data structure being referenced
> indirectly.</xs:documentation>
> </xs:annotation>
> </xs:attribute>
> <xs:attribute name="refindex" type="nx:NX_CHAR">
> <xs:annotation>
> <xs:documentation>Index within the data structure being
> referenced indirectly.</xs:documentation>
> </xs:annotation>
> </xs:attribute>
> <xs:attribute name="incr" type="nx:NX_CHAR">
> <xs:annotation>
> <xs:documentation>What is this?</xs:documentation>
> </xs:annotation>
> </xs:attribute>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> <xs:attribute name="size" type="nx:NX_CHAR">
> <xs:annotation>
> <xs:documentation>Rank (number of dimensions) of the data structure.
> For example: a[5] has size="1" while b[8,5,6,4] has size="4".
> See http://en.wikipedia.org/wiki/Rank_(computer_programming)
> for more details.</xs:documentation>
> </xs:annotation>
> </xs:attribute>
> </xs:complexType>
> ---------------------------------% clip here %---------------------------------
>
> Pete
>
>
>
>
>
--
----------------------------------------------------------
Pete R. Jemian, Ph.D. <jemian at anl.gov>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source, Argonne National Laboratory
Argonne, IL 60439 630 - 252 - 3189
-----------------------------------------------------------
Education is the one thing for which people
are willing to pay yet not receive.
-----------------------------------------------------------
More information about the NeXus-tech
mailing list