[Nexus] NXgeometry lacking documentation and others....

Ray Osborn ROsborn at anl.gov
Mon Nov 19 16:17:14 GMT 2012


I need to go through the old minutes of our meetings but in my recollection of the discussions, I thought that NXgeometry groups were only required if people needed to define a physical object, e.g., for a simulation. In fact, this is the 2004-vintage metaDTD file I still have a copy of:

<NXaperture name="{Name of aperture}">
   <distance type="NX_FLOAT" units="m">{Distance from sample}?</distance>
   <shape type="NX_CHAR">"Rectangular"|"Circular"|"Elliptical"?</shape>
   <horizontal_aperture type="NX_FLOAT" units="cm">{Horizontal aperture}?</horizontal_aperture>
   <vertical_aperture type="NX_FLOAT" units="cm">{Vertical aperture}?</vertical_aperture>
   <radius type="NX_FLOAT" units="cm">{Radius of aperture (if circular)}?</radius>
</NXaperture>

I must admit that I thought we had just added the NXgeometry to this as an option. For most cases, NXgeometry is overkill as Mark says.

There is another reason for keeping NXgeometry for physical coordinates and having alternative simpler parameters. Take a cylindrical detector. An engineer will want to define the distance to the detector as the distance to the center. However, a time-of-flight neutron scatterer would prefer the detector distance to be an effective distance that characterizes where in the cylinder the neutron is detected. This value is even wavelength-dependent. On instruments like IN5, the distance parameter was calibrated using vanadium runs.

This is now old history, but my vote would have been that we store certain parameters in common use, according to their common usage (with documentation), and keep NXgeometry only for cases where we are physically describing the object as it would appear in a CAD drawing. I am guessing that is not how it is used in a lot of the NXDL files.

Ray

On Nov 19, 2012, at 10:00 AM, Mark Koennecke <Mark.Koennecke at psi.ch> wrote:

> Hi,
> 
> my 2c worths on todays topics:
> 
> - NXaperture: IMHO this one of the least well done base classes. The general idea, as I recollect it, is that
>  you give the shape through NXgeometry/NXshape. The enum on NXshape determines the meaning of
>  the parameters. For example if the shape is nxbox then size means the height and width of the slit, if it
>  is a nxcylinder it means the diameter and length of the cylinder.  Now for the position of the thing you are
>  hit by the undocumented fact that you can have the normal distance polar_angle etc fields in almost all
>  beamline components. This is the first way to position the thing. On our reflectometer, I personally use
>  the distance as this is the only thing which matters. The other way is to use NXtranslation in NXgeometry.
>  And, as Pete Jemian correctly mentioned, use the CIF stuff. What I personally do not like about NXaperture
>  is that  90% of people seem to have rectangular apertures and the NXgeometry description is a kind of
>  overkill. But I got outvoted....
> - CIF coordinates: I updated the coordinate section in the manual a while ago. Is that description lacking? If so,
>  in what way?
> - Coplanar/non coplanar. I had to look this up on the WWW. It really means what I call scattering in plane and
>  out of plane. The beauty of the polar coordinate system as choosen by NeXus is that polar_angle is *always*
>  the scattering angle two theta even when working non coplanar. If you are coplanar, azimuthal_angle is 0 and
>  polar_angle is trivially the setting angle (two theta )of the detector. If you work non coplanar, i.e. move the
>  detector out of the scattering plane you have the disadvantage that you have to calculate polar_angle and
>  azimuthal angle from the setting angles.  In my place we call them gamma and nu.
> 
> Best Regards,
> 
>             Mark
> 
> 
> _______________________________________________
> NeXus mailing list
> NeXus at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus

-- 
Ray Osborn, Senior Scientist
Materials Science Division
Argonne National Laboratory
Argonne, IL 60439, USA
Phone: +1 (630) 252-9011
Email: ROsborn at anl.gov







More information about the NeXus mailing list