Package: tvipsconverter
TVIPS converterCite TVIPS converterWhat does it do?This tool with a Qt user interface serves to convert .tvips movie files from TVIPS CCD/CMOS cameras collected with EM-Konos or EM-Scan into more convenient formats. These kinds of cameras may be found in transmission electron microscopes (TEM) and are used for recording precession electron diffraction (PED) and 4D-STEM data, as well as in-situ experiment recordings. To analyze the data with 3rd party tools, the tvips data format is highly inconvenient; this tool aims to alleviate this issue.Currently supported export formats:Export file formatTypes of experimentsAnalysis toolsRemarks.bloPED/4D-STEMASTAR (NanoMegas),pyxem,hyperspy,LiberTEMresults are exported as 8-bit images, which can result in a significant loss of information if the orignal images were 16 bit.hspyPED/4D-STEMpyxem,hyperspy,LiberTEMimages are exported at full depth. ASTAR does not open this file format. A .hspy file is a specially structured HDF5 file..tiffanyAny image processing softwareFor exporting a subset of the images individually.converter hdf5allTVIPSconverterAn intermediate hdf5 file that contains all the TVIPS metadata and pre-processed 16-bit images. Serves to easily explore the data withHDFView. In a future version, this intermediate file may disappear or change in favor of directly making a hyperspy compatible fileIn the future we aim to support:USID HDF5 formatHow do I install it? (recommended method)InstallAnaconda.Create a new virtual environment on your system to install tvipsconverter in$ conda create --name tvipsconverter pipActivate the virtual environment anywhere in your system with$ conda activate tvipsconverterPip installtvipsconverter$ pip install tvipsconverterNote:On Windows you will have to type these commands in theAnaconda promptHow do I use it?Activate thetvipsconvertervirtual environment.Run the command$ tvipsconverterwhich should bring up the GUI after some time.The GUI should be self-explanatory with tool tips. However, I have also made a video briefly demonstrating the GUI. You can find ithere.How does it work?When recording data on a TVIPS camera, it is stored as a long collection of images (a movie),
separated into multiple large .tvips files. TVIPS is a small German company and their tools
are still in active development. As of version 2 of the TVIPS recording software,
very limited information on microscopy settings is stored in this file.In fact,
the image pixel size and scan pixel dimensions are not properly recorded inside the file.
You must record these settings and correct this manually!If the aim is to
record a 4D-STEM or PED dataset, this format is difficult to work with. Converting
the format to formats that can be read by other software is the main aim of this tool.
The tool first converts the multiple .tvips files to a single easy to manage and browse .hdf5 file.
In the second step, this hdf5 file can be converted to other types of files (see table above).
The conversion process may depend on which acquisition tool that was used to collect the
tvips data.EM-KonosIf the recorder software was EM-Konos, there is no direct information stored related to a scan.
The only information available to correlate the images to the electron beam scan is
the so calledrotatorindex, which is stored in the header of each image.
It corresponds to the index of the scan point to which the image should be mapped.
The problem is that the electron beam dwell time and the frame acquisition time
may not be perfectly aligned, with the result that somerotatorimages are repeated
while some scan points have no corresponding image. In addition, the scanning control
follows a snake-like meander pattern instead of a line-by-line fly-back.
This causes a hysteresis artefact (offset) on the even scan lines.
TVIPSconverter provides options to correct for these artefacts and as best as possible
align the images to the scan. With EM-Konos data, an automatic guess is offered, but
the user can also manually specify start and stop frames.EM-ScanEM-Scan is the second iteration of acquisition software and does store scan info in the
image headers. There is no more rotator index and scanning follows a regular fly-back pattern.
At present, TVIPSconverter does not make use of this metadata. The software can be a bit
buggy and the scan positions can be absent anyway. With EM-Scan data, the user will have to
supply the scan information manually.Credits and notesThis tool is not an official product of the TVIPS company. Use at your own risk.
We are not responsbile for loss or corruption of data.The tool derives from python scripts
originally developed by the company. We have significantly modified these
scripts mainly to make the conversion process possible on a computer with regular sized RAM and
support loss-less export to hdf5. The GUI is also our addition.Changelog0.1.2calculate and store direct beam positions in the HDF5 filecalculate mean and maximum imagesadded choice in how to bin the datamore options on export image depthbugfixes0.1.1Added an option to crop the file along the scan directionsAdded an option to limit the conversion between a set number of frames0.1.0It is now possible to export to Pyxem (Hyperspy) hdf5. The depth of the images is conserved.The user can now set the scan and diffraction pattern resolution in the GUI.The GUI was slightly simplified and some tooltips were updated.The user can now select which frame to visualize when performing the pre-processing.0.0.8fixed image rebin problem0.0.7added support for EM-Scan data where scanning doesn't follow snake patternfixed some bugs