This guide provides detailed instructions on how to use CaTx (Cambridge Terahertz Converter). The input required is the raw data generated by the terahertz spectrometer software. You can find sample data files here.
This tool allows you to collate raw sample and reference waveforms into a single standardised .thz file. Additional metadata captured from various sources, such as sample thickness, temperature, and other contextual information, can also be included in this file format. The output '.thz' file will be essential for the dotTHz project compatible tools.
When the user launches the CaTx tool, the following UI will appear:
CaTSper reads the '.thz' file created by CaTx. The first step is to convert the data structure generated by the terahertz instrument into the '.thz' file format. In this example, a Terapulse 4000 (Teraview) spectrometer recorded the data in a '.tprj' file.
Step 1: Select a suitable 'Deployment Recipe' that can recognise the dataset. For the Terapulse 4000 (Teraview) spectrometer, select 'TeraView TeraPulse4000 *.tprj file'. You can review and modify the details of the recipe in the 'Deployment Recipe' tab. Click the 'Import Data File(s)' button to browse your folders and select the raw data file for conversion.
Note: If there is no '.\DeploymentRecipes.json' file in the same directory as the converter app, the dropdown box will display the message: No recipes available. Please check DeploymentRecipes.json file. Don't panic. Go to the 'Deployment Recipe' tab and create a new recipe for your dataset.
Step 2: Click the 'Deploy Data' button. The app will begin reading the raw data, and a message saying 'Loading…' followed by '…%' will appear in the bottom left corner, indicating the progress of the conversion.
Step 3: Once the conversion is complete, the message 'Conversion Complete' will appear, and the data will be displayed in the table in the center panel. You can verify if the data has been correctly converted in this panel. Below is an example of what you should see at this stage:
If the dataset '1_VariableTemperature_original.tprj' generated by the Terapulse 4000 spectrometer is successfully loaded, the following UI will appear:
This is an example of loading a single document.
If the data files '20221025_163815_averageOver_1200_Air_Purged.dat', '20221025_160842_averageOver_1200_Silicon_Purged.dat', and '20221025_170045_averageOver_1200_MetasurfaceAR_3-4_Purged.dat' generated by the MenloSystems spectrometer are successfully loaded, the following UI will appear:
This is an example of loading multiple data files into CaTx. CaTx can read multiple data files.
If the data file 'Gua_5percent_105K.csv' generated by the Toptica spectrometer is successfully loaded, the following UI will appear:

To save the data, simply press the 'Export .thz File' button at the bottom right corner and choose the folder where the '.thz' file will be stored.
To convert another dataset, press the 'Clear Memory' button and confirm the action in the prompt. Then follow the procedure in the 'Loading the Raw Dataset' section above to load another raw data file into the converter.
Instrument and user profiles are stored and managed in the 'Instruments and Users' tab. The ./Profiles.json file contains all profile data.

For both the 'Instruments' and 'Users' sections, you can click 'Add Profile' to insert a new profile. Then, double-click each cell in the new profile to customise it. To assign profiles to the measurement dataset, enter the measurement column ranges and click 'Link' to update the measurement metadata.
The terahertz instrument might not record certain metadata, such as sample thickness (mm), sample weight (mg), and temperature (K) at which the measurements were taken. CaTx allows you to input any additional relevant information.
The '*.thz File' option in the 'Deploayment Recipe' allows you to load an already converted file into CaTx. This is useful if you want to add extra data.
