Timepix3 calibration parameters

I would like to use the calibration parameters for my own post processing of the ToA and ToT data.
Could you indicate the way the coefficients are encoded in the calibration file (the xml file)?

The calibration values caliba,calibb,calibc and calibt are encoded with base64 encoding. They are 65536 double (8 bytes) values. They can be extracted with python like this:

import sys
import os
import glob
import base64
import struct

try:
    import xml.etree.cElementTree as ET
except ImportError:
    import xml.etree.ElementTree as ET

def writeMatrix(fileName, data):
    f = open(fileName, "w")
    for i, x in enumerate(data):
        f.write("%f " % x)
        if (i + 1) % 256 == 0:
            f.write("\n")
    f.close()

def extractCalibs(fileName):
    tree = ET.ElementTree(file=fileName)
    root = tree.getroot()

    # get chip ID:
    chipid = ""
    theitem = ""
    for item in root:
        if "-W" in item.tag:
            chipid = item.tag
            theitem = item
            break

    if not chipid:
        sys.exit("invalid xml file.")

    caliba = theitem.find("caliba").text
    calibb = theitem.find("calibb").text
    calibc = theitem.find("calibc").text
    calibt = theitem.find("calibt").text

    caliba = base64.b64decode(caliba)
    caliba = struct.unpack('d' * (len(caliba) / 8), caliba)
    calibb = base64.b64decode(calibb)
    calibb = struct.unpack('d' * (len(calibb) / 8), calibb)
    calibc = base64.b64decode(calibc)
    calibc = struct.unpack('d' * (len(calibc) / 8), calibc)
    calibt = base64.b64decode(calibt)
    calibt = struct.unpack('d' * (len(calibt) / 8), calibt)

    writeMatrix("caliba.txt", caliba)
    writeMatrix("calibb.txt", calibb)
    writeMatrix("calibc.txt", calibc)
    writeMatrix("calibt.txt", calibt)

if len(sys.argv) < 2:
    print "Usage script.py FITPix-J07-W0167.xml"
    sys.exit(0)
extractCalibs(sys.argv[1])