compression

Ray Osborn ROsborn at anl.gov
Thu Nov 25 17:07:59 GMT 1999


> 
> On Thu, 25 Nov 1999 Mark Koennecke wrote:
> 
>   I agree that it is against the philosophy of NXUwritedata. But has
>   NXUwritedata ever made it into the NAPI standard?

It depends what you mean by being in the standard.  NXUwritedata is a part
of Fortran 90 API v 1.2.1 in NXUmodule.f90, and is described in detail on
the web pages at <http://www.neutron.anl.gov/NeXus/NeXus_API.html#Utils>.  I
use it extensively when writing my own NeXus files.  However, it is only
available in Fortran 90 because I hadn't managed to persuade anyone else to
spend time writing it.  If you compare the example programs in the three
languages at <http://www.neutron.anl.gov/NeXus/NeXus_API.html#Example>, you
will see that the F90 version is by far the shortest, which is why I use it.

> The second thing to ponder is that you usually do not compress all data items
> in a NeXus file. Just the large ones such as the 64*64*512 counts array at
> SXD. Most data items in a NeXus files are single numbers and for those
> compression would be nonsense. We end up with a little bit of extra code for
> the huge dataset.
>

I agree that this effectively rules out having a blanket default for every
SDS.  We could possibly have two parameters, one defining the minimum size
of SDS to be compressed (0 meaning no compression) and one to define the
method of compression.  However, these should be part of the NXU utility
routines (NXUsetcompress) rather than the core NX routines.  Mark's solution
fits into their philosophy perfectly.

Unless there are other objections, I propose that we adopt Mark's proposal
for NAPI.C, while I will make a separate proposal for NXUmodule.f90 using
what he's written as the basis.  We should then all test that these work
before releasing a new version.

By the way, it's Thanksgiving Holiday over here, so we probably can't expect
the US to participate much in this debate until Monday.

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-developers mailing list