<div dir="auto">Also, this minor change, <div dir="auto"><br></div><div dir="auto">--- NXScan</div><div dir="auto">+++ NXentry</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 7, 2019, 8:19 AM Zbigniew Reszela <<a href="mailto:zreszela@cells.es">zreszela@cells.es</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p> </p>
    <div class="m_6282471001996712383moz-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="m_6282471001996712383moz-signature"><br>
      <div class="m_6282471001996712383moz-signature">
        <div class="m_6282471001996712383moz-signature"><br>
        </div>
      </div>
    </div>
  </div>

_______________________________________________<br>
NeXus mailing list<br>
<a href="mailto:NeXus@nexusformat.org" target="_blank" rel="noreferrer">NeXus@nexusformat.org</a><br>
<a href="http://lists.nexusformat.org/mailman/listinfo/nexus" rel="noreferrer noreferrer" target="_blank">http://lists.nexusformat.org/mailman/listinfo/nexus</a><br>
</blockquote></div>