[NeXus-tech] NXgeometry
Akeroyd, FA (Freddie)
freddie.akeroyd at stfc.ac.uk
Wed Nov 19 18:42:19 GMT 2008
I see no problem with NXgeometry occurring more than once in a group -
you may want to refer to the geometry of something else rather than the
object itself (can't think of an example just now though). The instance
of NXgeometry that refers to the class itself should be called
"geometry" though as that makes it easy to identify, inherit and also
allows the linking mentioned below.
NXtranslation referring to NXgeometry seems to be OK - the Oxygen schema
parser hasn't thrown it out anyway, but I haven't yet tried to validate
anything against it.
Freddie
-----Original Message-----
From: Peterson, Peter F. (pf9) [mailto:petersonpf at ornl.gov]
Sent: 13 November 2008 15:22
To: Pete Jemian
Cc: Akeroyd, FA (Freddie); Nick Hauser; Mark Koennecke
Subject: Re: NXgeometry
That isn't a bug, it is a feature. The idea was that if a translation
contained a geometry, then it was relative to that geometry. I'm not
sure if
there is a way to fix this in base classes. Recursion is always a pain
in
the neck.
There must be some way to do it in xsd since we have that case with the
xsd
for nxdl itself (a group can contain groups).
P^2
On 11/13/08 2:55 AM, "Pete Jemian" <prjemian at gmail.com> wrote:
>
> Another problem exists with NXgeometry and NXtranslation
> that they each refer to the other. That will cause problems.
>
> Pete
>
>
> Peterson, Peter F. (pf9) wrote:
>> Another way to ask this question is whether NXgeometry should only
occur one
>> time within a group. I don't think we should restrict it that way,
and not
>> sure how we would even if we wanted to.
>>
>> P^2
>>
>>
>> On 11/11/08 4:28 PM, "Pete Jemian" <prjemian at gmail.com> wrote:
>>
>>
>>> NXgeometry (http://www.nexusformat.org/NXgeometry) says that:
>>> 'every instance of an NXgeometry should be named "geometry"
>>> so that it can be linked to (linked items must share the same
name
>>> in HDF)'
>>>
>>> Some of the base classes do not conform to this rule (see below):
>>> NXaperture, NXbeam_stop, NXbending_magnet, ...
>>> Some have been made to conform:
>>> NXsample, NXsensor, NXsource, ...
>>>
>>> Is this a rule or should the documentation be modified to express
this
>>> as a suggestion?
>>> If a rule, can it be validated through the schema?
>>>
>>>
>>> [Pete at regitte,3110,base_classes]$ grep NXgeometry *.nxdl.xml | more
>>> NXaperture.nxdl.xml: <group type="NXgeometry">
>>> NXbeam_stop.nxdl.xml: <group type="NXgeometry">
>>> NXbending_magnet.nxdl.xml: <group
>>> type="NXgeometry"><doc>Engineering" position of bending
magnet</doc></group>
>>> NXcollimator.nxdl.xml: <group type="NXgeometry">
>>> NXcrystal.nxdl.xml: <group type="NXgeometry">
>>> NXdetector.nxdl.xml: <group type="NXgeometry">
>>> NXdisk_chopper.nxdl.xml: <group type="NXgeometry" />
>>> NXenvironment.nxdl.xml: <group name="position" type="NXgeometry">
>>> NXfermi_chopper.nxdl.xml: <group type="NXgeometry">
>>> NXfilter.nxdl.xml: <group type="NXgeometry">
>>> NXgeometry.nxdl.xml:# $HeadURL:
>>>
https://svn.nexusformat.org/definitions/trunk/base_classes/NXgeometry.nx
dl.x
>>> ml
>>> $
>>> NXgeometry.nxdl.xml:# $Id: NXgeometry.nxdl.xml 125 2008-11-05
23:13:28Z
>>> Peter Peterson $
>>> NXgeometry.nxdl.xml: name="NXgeometry"
>>> NXgeometry.nxdl.xml: an NXgeometry should be named "geometry"
so
>>> that it can be linked to (linked items must
>>> NXguide.nxdl.xml: <group type="NXgeometry"/>
>>> NXinsertion_device.nxdl.xml: <group type="NXgeometry">
>>> NXmirror.nxdl.xml: <group type="NXgeometry"/>
>>> NXmoderator.nxdl.xml: <group type="NXgeometry">
>>> NXmonitor.nxdl.xml: <group type="NXgeometry">
>>> NXorientation.nxdl.xml: NXgeometry class</doc>
>>> NXorientation.nxdl.xml: <group type="NXgeometry">
>>> NXorientation.nxdl.xml: relative NXgeometry). Calling the
>>> local unit vectors (x',y',z') and the reference unit
>>> NXsample.nxdl.xml: <group name="geometry" type="NXgeometry">
>>> NXsensor.nxdl.xml: <group name="geometry" type="NXgeometry">
>>> NXshape.nxdl.xml: elements - it is used by the
NXgeometry
>>> class
>>> NXsource.nxdl.xml: <group name="geometry" type="NXgeometry">
>>> NXtranslation.nxdl.xml: of a component - it is used by the
>>> NXgeometry class
>>> NXtranslation.nxdl.xml: <group name="geometry" type="NXgeometry">
>>> testing.nxdl.xml: <group type="NXgeometry">
>>> [Pete at regitte,3111,base_classes]$
>>>
>>>
>>>
>>> Peterson, Peter F. (pf9) wrote:
>>>
>>>> I just put in the enumeration for the field types. I'm adding the
>>>> restriction to the type attribute for the groups now too.
>>>>
>>>> We need to chat (I'll schedule a VC soon) on units.
>>>>
>>>> I see you discovered the way to do the other attributes.
>>>>
>>>> P^2
>>>>
>>>>
>>>> On 11/11/08 1:59 PM, "Pete Jemian" <prjemian at gmail.com> wrote:
>>>>
>>>>
>>>>
>>>>> P^2:
>>>>>
>>>>> I will go ahead and convert all those non-conforming attributes to
>>>>> elements per your message.
>>>>> Should I add the rules (removed in
>>>>> http://trac.nexusformat.org/definitions/changeset/142) to
>>>>> nxdl.xsd to permit/validate these as subelements of <field />?
>>>>>
>>>>> There are a variety of ways in which "units" are defined: mm,
>>>>> milli.metre, milli*metre, millimetre
>>>>> Will we be doing a consistency check at this time?
>>>>>
>>>>> Pete
>>>>>
>>>>> Peterson, Peter F. (pf9) wrote:
>>>>>
>>>>>
>>>>>> Pete,
>>>>>>
>>>>>> Thank you for your continued work on this. A quick criticism
about svn
>>>>>> usage: if you are going to change the whitespace then make it a
separate
>>>>>> commit. This makes locating meaningful changes (whitespace really
doesn't
>>>>>> matter) easier.
>>>>>>
>>>>>> On the topic of signal, axes, rank, etc attributes on the various
fields.
>>>>>> The idea was that other than type and units all attributes would
appear
>>>>>> as
>>>>>> separate tags inside the field. See the Nxdetector for an example
of
>>>>>> this.
>>>>>>
>>>>>> I'm going to be sending out a couple of various messages on this
topic
>>>>>> today
>>>>>> as I want to get the "first draft" done.
>>>>>>
>>>>>> P^2
>>>>>>
>>>>>>
>>>>>> On 11/7/08 12:06 AM, "Pete Jemian" <prjemian at gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> see changeset
http://trac.nexusformat.org/definitions/changeset/135
>>>>>>>
>>>>>>> I revised nxdl.xsd to make this. Pete has some specific ideas
but I
>>>>>>> wanted to get some files to validate.
>>>>>>> I don't think this will break anything we have already done.
>>>>>>> Also added attributes for "signal" "axes" and "rank" to "field"
>>>>>>>
>>>>>>> Defined a generic "unit" attribute but it does not require any
>>>>>>> particular
>>>>>>> content. Set a few examples.
>>>>>>>
>>>>>>> Update from the SVN to work with this.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
--
Scanned by iCritical.
More information about the NeXus-tech
mailing list