Re: Get["file.mx"] doesn't work
- To: mathgroup at smc.vnet.net
- Subject: [mg119042] Re: Get["file.mx"] doesn't work
- From: Ulf-Dietrich Braumann <braumann at uni-leipzig.de>
- Date: Fri, 20 May 2011 06:39:01 -0400 (EDT)
- References: <iqtnbm$io4$1@smc.vnet.net> <ir09p4$20l$1@smc.vnet.net>
- Reply-to: braumann at uni-leipzig.de
Hi,
if no expressions need to be stored, just datasets, you also might
consider exporting to NASACDF (common data format specified by NASA). It
of course is portable, is binary, and one can specify some lossless
compression methods. Recently I have used it for storing some scalar 32bit
real valued autoradiographic images (approx. 9000x7000 pixels, approx.
150MB on disk):
Export["psl.cdf", {psl}, {"Datasets", {"Photo Stimulated Luminescence"}},
{"DataFormat" -> "Real32", "DataEncoding" -> "GZIP"}];
(NB: TIFF export/import in Mathematica still cannot deal with real-valued
images, whereas my images' value range was somewhat exotic: 0,...,2.5).
One can check what named data sets are included simply typing:
Import["psl.cdf"]
and gets:
{"Photo Stimulated Luminescence"}
Loading is done like this:
psl=Import["psl.cdf", {"Datasets", {"Photo Stimulated Luminescence"}}];
To store more data sets in one file, simply extend the list of variables
and data set names...
At the moment unfortunately I cannot do performance comparisons (WDX,
BinaryWrite, MX, NASACDF, ...).
Regards - Ulf-Dietrich