Exporting Data and Saving Plots

1. Do you need to save raw data into a text file, for instance, to perform custom analyses?

If so, you need to use the measurement class TimeTagStream, get the data using getData() and save them, for instance, using savetxt from numpy library (numpy.savetxt), similarly to what shown in Question 3. Alternatively, you can use the measurement class FileWriter to store the raw data into a ttbin file. To save time tags as text from these files, please see the attached Python code at the end of the document.

2. Do you need to save raw data into a ttbin file to perform offline analyses using our high-level API?

In this case, you need to use the FileWriter measurement class to store raw time tags into a compressed ttbin file. These data can be read back using the FileReader class. Additionally, ttbin files can be used as input to the TimeTaggerVirtual to replay the measurements offline, using the high-level API.

3. Do you need to export text-based results of your analysis?

Please have a look at this minimal Python example code.


#Perform a Correlation Measurement
corr = TimeTagger.Correlation(tagger, 1, 2, 1, 1000)
corr.startFor(1e12)
corr.waitUntilFinished()

#get the data
data = corr.getData()
index = corr.getIndex()

# Save index and data vectors into a text file
data_to_save = np.column_stack(index, data)
header = 'Time Difference [ps]\tData Counts'
np.savetxt('filename.txt', data_to_save, header=header, fmt='%0.4f', delimiter='\t')

4. How can I obtain plots from my analyses?

The TimeTagger library does not provide functions to plot or save plots. To generate and save plots, you can use dedicated Python libraries such as matplotlib.

5. How can I export data and plots on Time Tagger Lab ?

You can export your measurements’ data into a text file by clicking on the corresponding icon (please see the attachment). Clicking on the same icon, you can also export the plot as a png figure.

If you want to save the raw time tags from your channels, you need to use the FileWriter. The data will be stored in ttbin compressed files that can be read and analyzed using FileReader and TimeTaggerVirtual, respectively. These features are not available in Time Tagger Lab.

Cookie Policy

We use third party service providers, like Freshworks Inc ("Freshworks") to enable interaction with you on our website and/or our product. As a data processor acting on our behalf, Freshworks automatically receives and records certain information of yours like device model, IP address, the type of browser being used and usage pattern through cookies and browser settings. Freshworks performs analytics on such data on our behalf which helps us improve our service to you. You can read about the cookies Freshworks' sets in their cookie policy here.