[Nexus] NeXus update

V. Armando Sole sole at esrf.fr
Wed Jan 21 18:10:29 GMT 2015


Hi Mark,

Well, you were not totally off-topic because some of the cases for what 
the new indices attribute was introduced had to do more with "scales" 
than with axes.

If I had to deal with offset and pixel size for an image dataset, for 
instance, I would rather look into the the HDF5 Dimension Scales.

http://docs.h5py.org/en/latest/high/dims.html

I do not support it in my codes yet and I will have work to do, but I 
think we should not implement a mechanism when HDF5 is already providing 
one.

Best regards,

Armando

On 21.01.2015 19:05, Mark Rivers wrote:
> OK, thanks for the clarification, sorry for being off-topic.
> 
> Mark
> 
> 
> -----Original Message-----
> From: NeXus [mailto:nexus-bounces at nexusformat.org] On Behalf Of Osborn, 
> Raymond
> Sent: Wednesday, January 21, 2015 12:02 PM
> To: Discussion forum for the NeXus data format
> Subject: Re: [Nexus] NeXus update
> 
> Hi Mark,
> That is a slightly different issue, which was resolved in your favor,
> I believe, at the NIAC meeting, i.e., we have formally removed the
> requirement to create dummy axes when none exist. I have modified
> NeXpy so that it will plot data, whether there are axes or not (I'll
> need to check if that's been released yet). The issue that Armando and
> I have been discussing is a requirement that additional attributes be
> added to identify which axes to use when they do exist. The new
> requirement is to add two extra group attributes, when in nearly all
> cases, only one is necessary.
> 
> Ray
> 
> On Jan 21, 2015, at 11:49 AM, Mark Rivers <rivers at cars.uchicago.edu> 
> wrote:
> 
>> The case I ran into with Ray's program was simply visualizing a 2-D 
>> image from a camera stored in NeXus format.  As I recall I got an 
>> error because I did not have any axes specified in my NeXus file.
>> 
>> In many cases an image really does not need to have axis definitions 
>> to be useful.  And in most cases simply being able to specify an 
>> offset and pixel size is sufficient to describe the axis.  But NeXus 
>> wants a 1-D array, not an offset and size.
>> 
>> Mark
>> 
>> 
>> -----Original Message-----
>> From: NeXus [mailto:nexus-bounces at nexusformat.org] On Behalf Of V. 
>> Armando Sole
>> Sent: Wednesday, January 21, 2015 11:26 AM
>> To: Discussion forum for the NeXus data format
>> Subject: Re: [Nexus] NeXus update
>> 
>> On 21.01.2015 17:48, Osborn, Raymond wrote:
>>> On Jan 7, 2015, at 3:45 AM, V. Armando Solé <sole at esrf.fr> wrote:
>>> 
>>>> I think you should take into consideration the advice of people
>>>> actually writing data visualization software (Ray, myself and even
>>>> Eugen was thinking about whether the generic solution specifying
>>>> points would not be the best).
>>>> 
>>>> I doubt I will ever add support to the new indices stuff. I can
>>>> default to the current situation where the user can specify what he
>>>> actually want to visualize.
>>> 
>>> Armando,
>>> Sorry I didn't reply at the time you wrote, but I think that your
>>> comment about not supporting the new indices stuff is critically
>>> important to the reasons behind my own objections. Adding this 
>>> support
>>> to NeXpy will require me to divert my time from other things. I don't
>>> object to changes per se, but it's frustrating when the change is for
>>> something that is not needed 99% of the time. Currently, it is low on
>>> my priority list because I have many other things to do first.
>>> 
>> 
>> Yep. It's the same with me.
>> 
>> One thing is to specify a *simple* default plot and other one to ask
>> every code to be able to generate the actual axes because the actual
>> data are not there.
>> 
>> For multidimensional visualization software it is much simpler to get
>> the x and y (and eventually z) coordinates at which something was
>> measured and needs to be plotted than to get a reduced amount x, y 
>> (and
>> eventually z) values from which to generate all the coordinates. In 
>> one
>> case you need a visualization software. In the other you need a "NeXus
>> interpreter" plus a visualization software.
>> 
>> If one makes a n_points two dimensional scan, with a motor for the x
>> positions and a motor for the y positions, the simplest is to save
>> n_points values for the x positions and n_points values for the y
>> position with shape (npoints,). To store x and y as (n_rows, ncolumns)
>> with the product n_rows * n_columns equal to n_points is *not*
>> convenient. The same applies to storing x as (n_rows) and y as
>> (n_columns). Why? Because not only due to visualization issues. The 
>> data
>> will be taken sequentially, if the user interrupts the scan *because 
>> of
>> any reason*, one can end up with a non regular grid. The solution with
>> shapes (npoints,) for the motors and (n_points,
>> whatever_dimensions_needed_for_the_measured_data) will *always* be
>> possible to visualize.
>> 
>> So, either one specifies *simple* cases in NXdata (and for that the
>> interpretation attribute helps a lot) or one writes the data properly 
>> to
>> make the (very few) complex cases for which you would need the new
>> indices simple. Basically one wants coordinates at which something has
>> to be plotted. That something can be a set of scalars, of spectra, of
>> images, of whatever and for that we have the interpretation attribute. 
>> I
>> do not think that is difficult to understand or to interpret.
>> 
>> Armando
>> 
>> 
>> _______________________________________________
>> NeXus mailing list
>> NeXus at nexusformat.org
>> http://lists.nexusformat.org/mailman/listinfo/nexus
>> 
>> _______________________________________________
>> 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
> 
> 
> 
> _______________________________________________
> NeXus mailing list
> NeXus at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus
> 
> _______________________________________________
> NeXus mailing list
> NeXus at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus


More information about the NeXus mailing list