Skip to content

Uniform Grid Files

Tobias Weber (Institut Laue-Langevin) edited this page Oct 6, 2023 · 2 revisions

Back to Contents.

The format consists of a grid in the Q = (h, k, l) coordinates, which enumerates the energies and dynamical structure factors per Q point. This format is used by the "Uniform Grid" model source in the resolution convolution module.

The format of these binary files consists of a header, followed by a data block and an index block, which have the following layout:

  • Header format:

    • 8 bytes (std::size_t): offset of index block
    • 3*8 bytes (double): data dimensions: hmin, hmax, hstep
    • 3*8 bytes (double): data dimensions: kmin, kmax, kstep
    • 3*8 bytes (double): data dimensions: lmin, lmax, lstep
    • x bytes: metadata header
  • Data block format:

    • repeat for each wave vector Q:
      • 4 bytes (unsigned int): number of dispersion branches
        • repeat (number of branches times):
          • 8 bytes (double): energy
          • 8 bytes (double): dynamical structure factor
  • Index block format:

    • repeat for each Q = (h, k, l) coordinate:
      • 8 bytes (std::size_t): offset into data block