skued.mibheader

skued.mibheader(filepath, hoffset=0)

Get an image header from a Merlin Image Binary file.

Parameters:
  • filepath (str) – Path to the Merlin Image Binary file.

  • hoffset (int, optional) – Bytes-offset of the header. For use in multi-image files only.

Returns:

header – Header information. The following keys are available:

  • 'ID' : Detector identification

  • 'seq_num' : Image sequence number

  • 'offset' : Length of the header in bytes

  • 'nchips' : Number of readout circuits used to build the sensor.

  • 'shape' : image shape tuple (width, height)

  • 'dtype' : resulting data-type.

  • 'timestamp' : epoch representation of the time-stamp, down to the micro-second

Return type:

dict

Notes

Merlin Image Binary files can be composed of multiple images; in this case, the file is composed of alternating image headers and binary data.