Fitting and uncertainty analysis of data from thermoreflectance experiments.
Move #!/usr/bin/python to first line of thermref
Use thermref command


browse  log 



You can also use your local clone with git send-email.


Fitting and uncertainty analysis of data from Frequency Domain thermoreflectance (FDTR) experiments.

I created this program during a four week internship at the Center for Device Thermography and Reliability of the University of Bristol. Thanks to James Pomeroy, Zeina Abdallah, and Xiang Zheng for their help.

To ask a question or submit a patch you can use the thermref mailing list.




Clone the git repository and enter the created directory.

git clone https://git.sr.ht/~callum/thermref

No method is currently provided for installing the program.

Thermref has both a command line interface (CLI) and graphical user interface (GUI). To use the GUI run ./thermref --gui. To use the CLI the --data and --parameters options are required, see ./thermref --help for details.

#Parameters File

The parameters_file is a comma separated value (CSV) file which contains the values and standard deviations of the parameters required to evaluate the theoretical model. Each line in the CSV file defines a single parameter. The fields required, in order, are:

  • the name of the parameter
  • the value of the parameter
  • the standard deviation of the parameter.

If the standard deviation field is left blank, the parameter is treated as unknown, and will be fitted. In this case the value field should be a fairly good initial guess.

Blank lines and lines starting with # will be ignored.


To fit two parameters of a model that has four parameters, the parameters file might look like:

# name,value,stdev

# Known parameters

# Unknown parameters

#Data file

The data_file is a CSV file which contains measured values of the dependent variable and the corresponding standard deviations for a number of values of the independent variable. The fields required, in order, are:

  • the value of the independent variable
  • the corresponding value of the dependent variable
  • the standard deviation in the value of the dependent variable

Blank lines and lines starting with # will be ignored.

# x,y    ,y stdev
  1, 13.5,0.1
  2, 36.5,0.1


The theoretical model used for FDTR calculations is described in

In situ Thermoreflectance Characterization of Thermal Resistance in Multilayer Electronics Packaging
Nathawat Poopakdee, Zeina Abdallah, James W. Pomeroy, and Martin Kuball
ACS Applied Electronic Materials 2022 4 (4), 1558-1566

However, rather than considering the pump and probe 1/e² spot radii (w₀ and w₁) separately, an "effective" spot radius is used which assumes w₀ = w₁. This is done because w₀ and w₁ the same effect on the phase (they are perfectly correlated), and so can not be fitted separately.

The required parameters are:

  • w: effective 1/e² spot radius of lasers

And for each layer of material in the sample:

  • d_{i}: thickness of {i}th layer
  • c_v_{i}: volumetric heat capacity of {i}th layer
  • k_z_{i}: cross-plane thermal conductivity of {i}th layer
  • k_r_{i}: in-plane thermal conductivity of {i}th layer
  • R_{i}: thermal boundary resistance between {i-1}th and {i}th layers (R_0 should be 0).

The top layer has index zero (so thickness d_0, etc.) and lower layers have larger indices. Any units can be used so long as they are consistent.

The data file should give the frequency in Hertz and the phase in degrees.


The uncertainty in the unknown/fitted parameters is calculated using the formula described in

Uncertainty analysis of thermoreflectance measurements
Jia Yang, Elbara Ziade, and Aaron J. Schmidt
Review of Scientific Instruments 87, 014901 (2016)

#Program Structure

Thermref is based around an Analyser class, which can be found in analyser.py. This class has methods for fitting a curve to data and calculating the uncertainty in fitted parameters, however the model function is provided by a subclass, FDTRAnalyser, which can be found in fdtr_analyser.py. See the docstring of the Analyser class for the attributes and methods which must be provided by the subclass. This setup makes it easy to support different models in the future, for example for Time Domain Thermoreflectance (TDTR).

Both the CLI (cli.py) and GUI (gui.py) use the parameters file parsing function make_parameters in parameters.py, and the plot function in plot.py.

CLI program flow:

  • Parse command line arguments with argparse
  • Parse parameter and data files
  • Create an FDTRAnalyser
  • Use FDTRAnalyser.fit() to fit the model to the data
  • Use FDTRAnalyser.uncertainties() to calculate uncertainties in fitted parameters
  • Plot the experimental and fitted values

The GUI is made with tkinter, and the layout of widgets is done in the __init__ method of ThermrefGUI.


This file (Thermref README) © 2022 by Callum Jeffrey Brown is licensed under CC BY 4.0.

Program files are licensed under the GPLv3 or later (see COPYING).