CaTSper Full Documentation

cambridgeTHzconverter Tutorial

Introduction

This page gives detailed guidance to use the “cambridgeTHzconverter”. The input will be the raw data generated by the terahertz spectrometer software. As an example to this documentation, the author uses “.tprj” file generated by the Terapulse 4000 as an example. The output “.thz” file will be an essential input to the “Catsper”.

This tool provides an platform to collate the raw sample and reference waveform(s) into a single standardised .thz file. Additional metadata is captured in this file, including, for example, sample thickness, temperature or other contextual information.

When the user lunches the cambridgeTHzconverter, the following UI will display:

catsperMATconverter main GUI

Load the raw dataset

Catsper will read the .thz file created by the App “Catsper MAT Converter” who read the h5d format data generated by the terahertz instrument. In this example, the Terapulse 4000 (Teraview) spectrometer record the data in the .tprj document. The user needs to convert the raw datasets into this .thz file in the first place.

Click the “IMPORT MEASUREMENTS” button to browse the folder and select the raw data file for conversion. The selected document’s name will appear in the textbox with the suffix (.tprj here). Then choose the “THz CONVERTER ENGINE” that records the dataset. The current version only supports “TeraPulse 4000_UCAM” whilst the rest will be updated in subsequent releases.

NOTICE: A message will display in the dropdown box “No engines available. Please check m files in .\engine folder.” if there is no relevant “.m” engine document in the .\engine folder under the same directory as the converter app.

Click the “DEPLOY DATA” button and the App will read the raw data. A message “Loading…” followed by the “…%” will appear at the upper right corner showing the extent of conversion.

When the conversion finishes, the message “Conversion Complete” will appear and the data will be recorded in the table shown at the centre panel. User can check if the data have been correctly converted in this panel. The following screenshot presents what the user should expect at this stage:

catsperMATconverter successful deploy

Save the .thz file

If the user wants to keep the data, simply press the “EXPORT THz FILE” button to the bottom right corner and choose the folder path where the .mat file will be stored. The .mat file contains a 20*[number of waveforms recorded] array of data named “Tcell”.

Convert another dataset

Press the “CLEAR MEMORY” button in the first instance and confirm this action in the message shown. Then follow the procedure in the Load the raw dataset section to load another raw data file into the converter.

Edit thickness and temperature information

catsperMATconverter edit data The terahertz instrument might not record, e.g., the thickness of the sample (mm), sample weight (mg), and temperature (K) at which the measurements were undertaken. The converter allows user to input these data by editing the relevant fields in the tablet (rows #14, #15, and #16). Double-click the cell to edit the information and the value-change function will update the TCell then.

Load the converted dataset (.thz file)

Occasionally, the user might export the converted dataset without the thickness and temperature data. The “IMPORT THz FILE” button enables the user to load back the converted .mat file into the converter and add extra data following the procedure outlined in the Load extra datasets for CSV file section. This functionality can also be used to check the .thz file.