TriVista#
Reader for spectroscopy data saved using the VistaControl software
for TriVista spectrometers from Teledyne Princeton Instruments.
Currently, RosettaSciIO can only read the XML-based .tvf
format from TriVista
(the binary .tvb
format is not supported).
However, this format supports spectral maps and contains all relevant metadata.
If LumiSpy is installed, Luminescence
will be
used as the signal_type
.
API functions#
- rsciio.trivista.file_reader(filename, lazy=False, use_uniform_signal_axis=False, glued_data_as_stack=False, filter_original_metadata=True)#
Read TriVista’s
.tvf
file.- 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.
- use_uniform_signal_axisbool, default=False
Can be specified to choose between non-uniform or uniform signal axes. 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%.- glued_data_as_stackbool, default=False
Using the mode Step & Glue results in measurements performed at different wavelength ranges with some overlap between them. The file then contains the individual spectra as well as the “glued” spectrum. The latter is represented as one spectrum, which covers the complete wavelength range. Stitching the datasets together in the overlap region is already done by the setup. If this setting is set to True, then the individual datasets will be loaded as a stack. Otherwise, only the “glued” spectrum is loaded.
- filter_original_metadatabool, default=True
Decides whether to process the original_metadata. If True, then non-relevant metadata will be excluded. For example, the metadata usually contains information for multiple objectives, even though only one is used. In this case, only the metadata from the used objective will be added to original_metadata. This setting only affects the
original_metadata
attribute and not themetadata
attribute.
- filename
- Returns:
list
ofdict
List of dictionaries containing the following fields:
‘data’ – multidimensional
numpy.ndarray
ordask.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