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, TransientSpectrum will be
used as the signal_type, which is intended for streak camera images with
both wavelength and time axes. Note that alternatively, Hamamatsu streak images
saved in the Tagged image file format (TIFF) format can be read in.
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
.imgfile, e.g. for streak camera images. In case LumiSpy is installed, the signal type is automatically set toTransientSpectrum.- Parameters:
- filename
str,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, thescaleattribute 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. Alternatively, the non-uniformDataAxiscan be subsequently converted to aUniformDataAxisby interpolation using the functioninterpolate_on_axis('uniform', axis=1).- **kwds
dict, optional Extra keyword argument will be ignored.
- filename
- Returns:
listofdictList of dictionaries containing the following fields:
‘data’ – multidimensional
numpy.ndarrayordask.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.