[Nexus] NXdetector questions (repost)

Mark Koennecke Mark.Koennecke at psi.ch
Tue Nov 23 13:51:23 GMT 2004


Dear Timothy Kelly,

On Mon, 22 Nov 2004, Timothy Kelley wrote:

> Hello,
> 
> I'd like to repost some earlier questions about NX classes. If anyone 
> can offer any insight, I would appreciate it. If these questions are 
> meaningless or groundless, or if there is a better place to raise these 
> questions, please let me know.
> 
> We are attempting to create a data file template for the ARCS 
> spectrometer, and encountered some ambiguities in storing metadata. We 
> want to have no duplication and no implicit definitions of metadata. You 
> can see a draft version of our data file at:
> 
> http://wiki.cacr.caltech.edu/danse/index.php/XML_template_for_ARCS_data_files
> 
> While I had questions about a number of classes, I wanted to start with 
> just one class: NXdetector.
> 
> My principle question is, how do we describe a composite detector like a
> linear PSD. Many of the fields in NXdetector, such as <id>, are
> presented as arrays of length i.
> 1) Is <id> meant to be an array of the id's of the composite's children?
> 1.a.1) If so, where do I put the id for the detector itself?
> 1.a.2) Does this mean all the other property arrays like gas_pressure
> are meant to implicitly define the children? Wasn't nexus supposed to
> get us out of implicitly defining things and into explicitly defining them?
> 1.b) If no, where do I put the children's id's, and why do I need arrays?
> 
> Or are NXdetectors meant to be nested? This would make
> the hierarchy clear and lovely, but then why have arrays for everything?
> 
  I looked at your description and one of the things which struck me is
  that the definition you are working from appears to be outdated. The
  NIAC decided upon base classes which live on the NeXus Swiki. In this
  for instance user information lives in a NXuser group. I recommend to
  check your definitions against the base classes on the Swiki.  

  I'am confused by your ID's. What do you need them for? Lacking further
  information on the instrument I assume that you have some linear PSD 
  with time resolution. This could look like this:
  <NXdetector name="bank_name>
	<data
	    type="NX_INT32[n_elem,tof]" signal="1" axis="polar_angle,tof"/> 
        <polar_angle type="NX_FLOAT32[n_elem]" axis="1"/>
        <time_of_flight type="NX_FLOAT32[tof]" axis="2" units="usec"/>
	<distance/>
        .....
  </NXdetector>
  n_elem stands for the number of elements, tof for the number of time
  channels. NeXus is meant to be array based for easier handling. The
  object NeXus worries about is the dataset and not the detector element.
  The detector "ID" is implicit in the array subscripts. Having a
  NXdetector for each detector element within a PSD would be a lot of
  overhead both in reading and writing.

  Is there a problem with this array based model? Is there something you
  cannot store in this model?  

  On the other hand if you have another detector bank, for instance a
  second PSD of a different type or in another position in the instrument, 
  a second NXdetector would be called for.  

		I hope this helps a little,

			Mark Koennecke






More information about the NeXus mailing list