Hamamatsu#

Reader for spectroscopy data saved in .img (ITEX) files from the HPD-TA (High Performance Digital Temporal Analyzer) or HiPic (High Performance image control) softwares from Hamamatsu, e.g. for images from streak cameras or high performance CCD cameras.

If LumiSpy is installed, LumiTransientSpectrum will be used as the signal_type, which is intended for streak camera images with both wavelength and time axes.

Note

Currently, reading files containing multiple channels or multiple images per channel is not implemented.

API functions#

rsciio.hamamatsu.file_reader(filename, lazy=False, use_uniform_signal_axes=False, **kwds)#

Read Hamamatsu’s .img file, e.g. for streak camera images. In case LumiSpy is installed, the signal type is automatically set to LumiTransientSpectrum.

Parameters:
filenamestr, pathlib.Path

Filename of the file to read or corresponding pathlib.Path.

lazybool, default=False

Whether to open the file lazily or not. The file will stay open until closed in compute() or closed manually. get_file_handle() can be used to access the file handler and close it manually.

use_uniform_signal_axesbool, default=False

Can be specified to choose between non-uniform or uniform signal axis. If True, the scale attribute is calculated from the average delta along the signal axis and a warning is raised in case the delta varies by more than 1 percent.

**kwdsdict, optional

Extra keyword argument will be ignored.

Returns:
list of dict

List of dictionaries containing the following fields:

  • ‘data’ – multidimensional numpy.ndarray or dask.array.Array

  • ‘axes’ – list of dictionaries describing the axes containing the fields ‘name’, ‘units’, ‘index_in_array’, and either ‘size’, ‘offset’, and ‘scale’ or a numpy array ‘axis’ containing the full axes vector

  • ‘metadata’ – dictionary containing the parsed metadata

  • ‘original_metadata’ – dictionary containing the full metadata tree from the input file

When the file contains several datasets, each dataset will be loaded as separate dictionary.