  We present PyOECP, a Python-based flexible open-source software for
estimating and modeling the complex permittivity obtained from the open-ended
coaxial probe (OECP) technique. The transformation of the measured reflection
coefficient to complex permittivity is performed based on two different models,
including the capacitance model and the antenna model. The software library
contains the dielectric spectra of common reference liquids, which can be used
to transform the reflection coefficient into the dielectric spectra. Several
Python routines that are commonly employed (e.g., SciPy and NumPy) in the field
of science and engineering are only required so that the users can alter the
software structure depending on their needs. The modeling algorithm exploits
the Markov Chain Monte Carlo method for the data regression. The discrete
relaxation models can be built by a proper combination of well-known relaxation
models. In addition to these models, the electrode polarization, which is a
common measurement artifact for interpreting the dielectric spectra, can be
incorporated in the modeling algorithm. A continuous relaxation model, which
solves the Fredholm integral equation of the first kind (a mathematically
ill-posed problem) is also included. This open-source software enables users to
freely adjust the physical parameters so that they can obtain physical insight
into their materials under test and will be consistently updated for more
accurate measurement and interpretation of dielectric spectra in an automated
manner. This work describes the theoretical and mathematical background of the
software, lays out the workflow, validates the software functionality based on
both synthetic and empirical data included in the software.
