matkraj / read_mib

Read MIB files to numpy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Read MIB files to numpy

Python library to read Quantum Detectors Merlin MIB files to numpy with predifined geometry.

  • The file is loaded as memmap.
  • Dataset properties are loaded directly from the MIB header (*.hdr files are not used).

Example usage 4D data:

import numpy as np
import mib

path = './example.mib'
data = mib.loadMib(path, scan_size=(2,1))

print("\nMerlin file shape:", data.shape)

Merlin file shape: (2, 1, 256, 256)

Example usage 3D data:

import numpy as np
import mib

path = './example.mib'
data = mib.loadMib(path, scan_size=(2))

print("\nMerlin file shape:", data.shape)

Merlin file shape: (2, 256, 256)

Note: RAW datasets are not supported.

About

Read MIB files to numpy

License:GNU General Public License v3.0


Languages

Language:Python 100.0%