Bathtub and eye scans

The sections below outline the empbutler commands for running and plotting bathtub and eye scans. The first steps are in common with the Configuring the link firmware section.

Note

In these commands, you will need to replace the following arguments with appropriate values:

  • CONNECTIONS_FILE.xml : Relative/absolute path to your connections file

  • LINKS_YAML.yaml : Relative/absolute path to your links yaml file (described in detail below)

  • DEVICE_ID : ID string for your FPGA in that connections file

  • CHANNEL_LIST: Comma-separated list of input/output channels (e.g. 4-7,12 for links 4, 5, 6, 7 and 12)

Python dependencies

Although not necessary to run the eye scans, the optional plotting part has the following additional dependencies:

sudo pip install --upgrade pip
sudo pip install matplotlib scipy "iminuit<2.0.0" probfit

The latter three packages are required only for the bathtub fitting. For python 2, "iminuit<1.4" is instead required.

Standalone plotting

The plotting part can be (re)run independently of empbutler using the following script (which is included in the RPM):

plot_emp_scans plot -i indir -o outdir

Here, indir is the output folder from the mgts scan command (scans_YYYYMMDD_HHMMSS), and outdir is the desired location for the output plots (it defaults to indir if unspecified).

The resulting plots are identical to those automatically produced when running mgts scan with option --plot as described above.

The behaviour of the fit can be customised as follows:

  • The upper threshold for the BER data to be included in bathtub fit is set using -t, --threshold FLOAT

  • The rho density parameter used in the fit is set using -r, --rho FLOAT

  • The minimum required opening fraction for a bathtub to be considered ‘good’ is set using -a, --acceptance FLOAT

If desired, the links metadata can be (re)processed by specifying option -m, --processmetadata or, to set or override the saved links yaml file, -l or --linkmap LINKS_YAML.yaml.

Comparison plots for two scans_YYYYMMDD_HHMMSS directories can be generated as follows:

plot_emp_scans compare -i indir -c compdir -o outdir

Further options are described in the help: plot_emp_scans plot -h and plot_emp_scans compare -h.