<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p> </p>
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-unicode">Hi NeXus experts,<br>
<br>
I'm not sure if your list is for this kind of questions. If not,
could you please advice where to look for help and forgive me this
message.<br>
<br>
We would like to write a HDF5 file, let's call it the master file,
with multiple NXScan entries. The scan can be configured so the
detector's data are directly stored in the master file or the
detector's data are stored in a separate file(s), let's call it
the slave file(s). In the later case, in the master file, we would
like to use the HDF5 external links to the slave file(s). The idea
is to provide as transparent as possible (between these two saving
modalities) access to the data.<br>
<br>
Let me illustrate it with an example. A scan involves just one
detector and provides 4 frames each of 1024x1024 shape.<br>
If the scan is configured to store the data in the master file,
this can be accessed in the following way:<br>
<br>
In [6]: f["entry1"]["measurement"]["twod01"]<br>
Out[6]: <HDF5 dataset "twod01": shape (4, 1024, 1024), type
"<f8"><br>
<br>
If the scan is configured to store the detector's data in the
slave file (all 4 frames in one dataset) and we use the following
code to insert the external link:<br>
<br>
f = h5py.File("master.h5")<br>
f["entry1"]["measurement"]["twod01"] =
h5py.ExternalLink("slave.h5", "/data")<br>
<br>
then we can access the data from the master file:<br>
<br>
In [24]: f["entry1"]["measurement"]["twod01"]<br>
Out[24]: <HDF5 dataset "data": shape (4, 1024, 1024), type
"<u4"><br>
<br>
My question is how to create the external links (or use some
alternative solution) if the detector's data are stored in
multiple files, for example 1 frame per file (4 slave files in
total), or 2 frame per file (2 slave files in total). Here we
would like to maintain the way of accessing all the scan frames
with the f["entry1"]["measurement"]["twod01"] syntax.<br>
<br>
Thanks in advance for sharing your experience,<br>
<br>
Zbigniew Reszela<br>
(Alba Synchrotron) <br>
</div>
<div class="moz-signature"><br>
<div class="moz-signature">
<div class="moz-signature"><br>
</div>
</div>
</div>
</body>
</html>