Getting Started

The following section describes how to get started with your Time Tagger.

First, please install the most recent driver/software which includes a graphical user interface (Web Application) and libraries and examples for C++, Python, .NET, C#, LabVIEW, Matlab, and Mathematica.

You are highly encouraged to read the sections below to get started with the graphical user interface and/or the Time Tagger programming libraries.

In addition, information about the hardware, API, etc. can be found in the menu bar on the left and on our main website: https://www.swabianinstruments.com/time-tagger/.

How to get started with Linux can be found in the Linux section.

Web Application

The Web Application is the provided GUI to show the basic functionality and can be used to do quick measurements.

  1. Download and install the most recent Time Tagger software from our downloads site.

  2. Start the Time Tagger Application from the Windows start menu.

  3. The Web Application should show up in your browser.

Note: The Web Application has the port 50120 as default port. If this collides with another application you can change the port with passing the argument TimeTaggerServer.exe -p 50120.

The Web Application allows you to work with your Time Tagger interactively. We will now use the Time Tagger’s internal test signal to measure a cross correlation between two channels as an example.

  1. Click Add TimeTagger, click Create on any of the available Time Taggers

  2. Click Create measurement, look for Bidirectional Histogram (Class: Correlation) and click Create next to it.

  3. Select Rising edge 1 for Channel 1 and Rising edge 2 for Channel 2.

  4. Set Binwidth to 10 ps and leave Number of data points at 1000, click Initialize.

The Time Tagger is now acquiring data, but it does not yet have a signal. We will now enable its internal test signal.

  1. On the top left, click on the settings wheel next to Time Tagger.

  2. On the far right, check Test signal for channels 1 and 2, click Ok.

  3. A Gaussian peak should be displayed. You can zoom in using the controls on the plot.

  4. The detection jitter of a single channel is sqrt(2) times the standard deviation of this two-channel measurement (the FWHM of the Gaussian peak is 2.35 times its standard deviation).

You have just verified the time resolution (detection jitter) of your Time Tagger.

Where to go from here…

To learn more about the Time Tagger Web Application you are encouraged to consult the following resources.

  1. Check out the API documentation in the subsequent chapter.

  2. Check out the following sections to get started using the Time Tagger software library in the programming language of your choice.

  3. Study the code examples in the [INSTALLDIR]\examples\<language>\ folders of your Time Tagger installation.

Python

  1. Make sure that your Time Tagger device is connected to your computer and the Time Tagger Web Application (especially the server window) is closed.

  2. Make sure the Time Tagger software and a Python distribution (we recommend anaconda) are installed.

  3. Open a command shell and navigate to the .\examples\Python folder in your Time Tagger installation directory

  4. Start an ipython shell with plotting support by entering ipython --pylab

  5. Run the hello_world.py script by entering run hello_world

The hello_world executes a simple yet useful measurement that demonstrates many essential features of the Time Tagger programming interface: #. Connect your Time Tagger #. Start the built-in test signal (~0.8 MHz square wave) and apply it to channels 1 and 2 #. Control the trigger level of your inputs - although it is not necessary here #. Initialize a standard measurement (Correlation) in order to find the delay of the test signal between channel 1 and 2 #. How to control the delay of different inputs programmatically.

You are encouraged to open and read the hello_world.py file in an editor to understand what it is doing. With this basic knowledge, you can explore the other examples in the 1-Quickstart folder:

No.

Topic

Classes & Methods

Basic software control (folder 1-basic_software_control)

1-A

Create a measurement

createTimeTagger(), Counter.getData(), Counter.getIndex()

Count rate trace

Counter

1-B

Start & stop measurements

Countrate, start(), stop(), startFor()

1-C

Synchronize measurements

SynchronizedMeasurements

Use different histograms

Correlation, Histogram, StartStop, HistogramLogBins

1-D

Virtual Channels

DelayedChannel, Coincidence, GatedChannel

1-E

Logging errors

setLogger()

Controlling the hardware (folder 2-controlling-the-hardware)

2-A

Get hardware information

scanTimeTagger(), TimeTagger.getSerial(),

TimeTagger.getModel(), TimeTagger.getSensorData(),

TimeTagger.getConfiguration()

2-B

The input trigger level

TimeTagger.setTriggerLevel(), TimeTagger.getDACRange()

2-C

Filter tags on hardware

TimeTagger.setConditionalFilter(), TimeTagger.setEventDivider()

2-D

Control input delays

TimeTagger.setInputDelay(), Histogram2D

2-E

Overflows

TimeTagger.getOverflows(), TimeTagger.setTestSignalDivider()

2-F

HighRes mode

createTimeTagger(), TimeDifferences

Dump and re-analyze time-tags (folder 3-dump-and-reanalyze-time-tags)

3-A

Dump tags by FileWriter

FileWriter

3-B

The Time Tagger Virtual

createTimeTaggerVirtual(), TimeTaggerVirtual

Working with raw time-tags (folder 4-working-with-raw-time-tags)

4-A

The FileReader

FileReader, TimeTagStreamBuffer

4-B

Streaming raw time-tags

TimeTagStream

4-C

Custom Measurements

CustomMeasurement

More details about the software interface are covered by the API documentation in the subsequent section

LabVIEW (via .NET)

A set of examples is provided in .\examples\LabVIEW\ for LabVIEW 2014 and higher (32 and 64 bit).

Matlab (wrapper for .NET)

Wrapper classes are provided for Matlab so that native Matlab variables can be used.

The Time Tagger toolbox is automatically installed during the setup. If Time Tagger is not available in your Matlab environment try to reinstall the toolbox from .\driver\Matlab\TimeTaggerMatlab.mltbx.

The following changes in respect to the .NET library have been made:

  • static functions are available through the TimeTagger class

  • all classes except for the TimeTagger class itself have a TT prefix (e.g. TTCountrate) to not conflict with any variables/classes in your Matlab environment

An example of how to use the Time Tagger with Matlab can be found in .\examples\Matlab\.

Wolfram Mathematica (via .NET)

Time Tagger functionality is provided to Mathematica via .NET interoperability interface. Please take a look at the examples in .\examples\Mathematica\.

.NET

We provide a .NET class library (32, 64 bit and CIL) for the TimeTagger which can be used to access the TimeTagger from many high-level languages.

The following are important to note:

  • Namespace: SwabianInstruments.TimeTagger

  • the corresponding library .\driver\xxx\SwabianInstruments.TimeTagger.dll is registered in the Global Assembly Cache (GAC)

  • static functions (e.g. to create an instance of a TimeTagger) are accessible via SwabianInstruments.TimeTagger.TT

C#

A sample Visual Studio C# project provided in the .\examples\csharp\Quickstart directory covers the basics of how to use the Time Tagger .NET API. An example of creating ‘custom measurements’ is also included.

Please copy the project folder to a directory within the user environment such that files can be written within the directory.

An ‘Example Suite’ is provided in the .\examples\csharp\ExampleSuite directory. ‘Example Suite’ is an interactive application that demonstrates various measurements that can be performed with the TimeTagger. Reference source code to setup and plot (with OxyPlot) each measurement is also provided within the application. Additionally, the application contains examples for creating and using ‘Virtual channels’, ‘Filtering’ and ‘Accessing the raw time tags’.

Note

  • To run the Example Suite ‘.NET Core 3.1 Desktop Runtime (v3.1.10)’ is required.

C++

The provided Visual Studio C++ project can be found in .\examples\cpp\. Using the C++ interface is the most performant way to interact with the Time Tagger as it supports writing custom measurement classes with no overhead. But it is more elaborate compared to the other high-level languages. Please visit .\documentation\Time Tagger C++ API Manual.pdf for more details on the C++ API.

Note

  • the C++ headers are stored in the .\driver\include\ folder

  • the final assembly must link .\driver\xxx\TimeTagger.lib

  • the library .\driver\xxx\TimeTagger.dll is linked with the shared v142 or newer Visual Studio runtime (/MD)