Alternative axis scheme
Ray Osborn
ROsborn at anl.gov
Mon Jan 17 16:27:12 GMT 2000
> On Mon, 17 Jan 2000, Mark Koennecke wrote:
>
>> I would like to propose a possible solution to this. I suggest that we
>> define an attribute of the multidimensional data to store an int32 array of
>> the reference numbers of the one-dimensional data sets it wants to use for
>> its axes. I suggest we call it "axis_ID" so that it's not mistaken for
>> anything physical.
>>
>
> Sorry to reply late to this, but I was away for a few days. Why not use
> SDS-names instead of ID numbers? Such as x-axis=time-of-flight, y-axis=
> detector_x etc. Together with a restriction that the SDS's have to be
> in the same vGroup we save one level of indirection when searching for
> the SDS to use for the axis. If multiple axis definitions are needed we
> may have a comma separated list: x-axis=time-of-flight,energy. Of course
> this must be attributes to the multidimensional dataset.
>
>
> Mark
>
You're right that there is a level of indirection in using axis ID's. I had
rejected using names, because there is no way of storing multidimensional
attributes, such as an array of strings, but you get around that by
concatenating the names as one long string. Your proposal is perhaps more
satisfactory to the user inspecting the file in a standard HDF browser,
although it could get unwieldy in the unlikely event that data with more
than a few dimensions (> 4?) are stored. The NeXus maximum is 32, although
I can't imagine us getting anywhere near that. In principle, we could have
a string that is NX_MAXRANK * NX_MAXNAMELEN (i.e. 32 * 64) long (longer with
all the commas).
I'll have to think about it for a longer time. I like the elegance and
robustness of the axis ID method. I've already written a simple addition to
the NXU utilities that returns an array of axis names by matching the ID's
to their respective SDS's, so I know that ID method is practical. However,
I don't suppose parsing a string for commas would be any harder, so we could
provide the same functionality with your method.
Any more thoughts from others?
Ray
--
Dr Ray Osborn Tel: +1 (630) 252-9011
Materials Science Division Fax: +1 (630) 252-7777
Argonne National Laboratory E-mail: ROsborn at anl.gov
Argonne, IL 60439-4845
More information about the NeXus
mailing list