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.
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.
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')
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.
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.