grapa.datatypes.curveEQE.CurveEQE

class grapa.datatypes.curveEQE.CurveEQE(data, attributes, silent=False)

Bases: Curve

CurveEQE offer basic treatment of (external) quantum efficiency curves of solar cells. Input units should be in [nm] and values within [0-1]. If needed, CurveSpectrum can convert [eV] in [nm].

__init__(data, attributes, silent=False)

Methods

CurveEQE_absorptionEdge(thickness, intensity0)

CdS estimate: returns a Curve for quick-and-dirty estimate layer thickness, e.g. CdS.

CurveEQE_bandgapLog([ylim, silent])

Performs fit of the low-energy side of EQE with modified Tauc formula (linear relation in (eV * ln(1 - EQE))^2 vs eV.

CurveEQE_bandgapTauc([ylim, silent])

Performs fit of the low-energy side of EQE with Tauc formula (linear relation

CurveEQE_derivativeanalysis([sgwidth, ...])

Bandgap derivative: Computes the bandgap and other derived data based on the Savitzky-Golay derivative dEQE/dE.

CurveUrbachEnergy(roi_ev)

Exponential decay: to obtain a measure of the sub-bandgap disorder tails.

ERE(voc, T[, Emin, EminUnit, fg, bandgap, ...])

ERE: Computes the External Radiative Efficiency from the EQE curve and the cell Voc.

ERE_GUI(voc, T[, Emin, EminUnit, fg, bandgap])

Computes the External Radiative Efficiency from the EQE curve and the cell Voc.

__init__(data, attributes[, silent])

alterListGUI()

Determines the possible curve visualisations.

currentCalc([roi, interpolatekind, ...])

Computes the current EQE current using AM1.5 spectrum (or another if selected).

deltavocrad_sigma(sigma[, T])

derivative_bandgapmax([sgwidth, sgdegree, ...])

Computes the bandgap based on the Savitzky-Golay derivative peak of derivative.

derivative_bandgappvrau([sgwidth, sgdegree, ...])

PV bandgap based on Rau et al. PRA 2017 (weighted energy over peak FWHM) https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.7.044016 Assumes input energy data actually given in nm Returns: bandgap value (float), x, y (base for calculation).

derivative_savgol([sgwidth, sgdegree, roi])

Returns a reduced x,y range and the Savitzky-Golay derivative sgwidth, sgdegree: width and degree of Savitzky-Golay roi: range of interest [nmmin, nmmax]

derivative_sigmabestguess([sgwidth, ...])

fit_resamplex(deltax)

funcListGUI(**kwargs)

Fills in the Curve actions specific to the Curve type. Retuns a list, which elements are instances of FuncGUI, or (old style): ::.

func_absorptionedge(nm, thickness, intensity0)

func_bandgapTaucCurve(nm, *bandgap)

func_bandgapTaucCurveLog(nm, *bandgap)

func_gaussian_a(x, a, x0, sigma, *_args)

A simple gaussian formula to fit the derivative peak The amplitude parameter is peak value i.e. not the function integral _args will be ignored.

func_gaussian_a_ev(xnm, a, x0ev, sigmaev, *_args)

A simple gaussian formula to fit the derivative peak.

print_popt_func_gaussian_a_ev(popt[, text])

formatted printout of bandgap, sigma, Vocrad loss based on _popt

reference_curve(file)

Returns a reference spectrum (spectral photon irradiance) based on the provided file name.

updateFitParam(*args, **kwargs)

Override.

updateFitParamFormatPopt(f, param)

override, for func_absorptionedge

vocloss_shortcircuit([bandgap, jsc, T, silent])

Calculation of DeltaV_{OC}^{JSc}, short-circuit loss term to Voc, as Jsc < JscSQ According to equation inline, slightly after Eq 11 in paper Rau PRA 2017 https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.7.044016 - bandgap: unit eV.

Attributes

AXISLABELS_X

AXISLABELS_Y

BB_FG

CURVE

FORMAT_AUTOLABEL

REF_AM0

REF_AM0_FILE

REF_AM15

REF_AM15_FILE

REF_SPECTRA

REF_SPECTRA_FILE

SG_DEGREE

SG_WIDTH

SHOCKLEYQUEISSER

SHOCKLEYQUEISSER_FILE

UNIT_LOOKUP_Y

CurveEQE_absorptionEdge(thickness: float, intensity0: float, material: str = 'CdS')

CdS estimate: returns a Curve for quick-and-dirty estimate layer thickness, e.g. CdS. The Curve represents the light transmitted through the layer and is computed from Beer-Lambert law as intensity0 * exp(-alpha * thickness), with alpha computed from k imaginary refractive index of material.

Parameters:
  • thickness – layer thickness, in nm

  • intensity0 – amount of light entering the layer. Default: 1

  • material – data is provided for ‘CdS’. A file path might be provided instead, with a file containing k data in a 2-column file (nm, k)

Returns:

a Curve for crude estimation of the absorption in an optical layer.

CurveEQE_bandgapLog(ylim=None, silent=True)

Performs fit of the low-energy side of EQE with modified Tauc formula (linear relation in (eV * ln(1 - EQE))^2 vs eV. In principle more exact, however highly sensitive to reflective and collection losses, therefore less robust than (eV * EQE)^2.

Parameters:
  • ylim – Relative fractions of EQE values to consider for the fit. By default, [0.25, 0.70].

  • silent – if False, prints additional information.

Returns:

a Curve with fit parameters and fitted datapoints

CurveEQE_bandgapTauc(ylim=None, silent=True)
Performs fit of the low-energy side of EQE with Tauc formula (linear relation

(eV * EQE)**2 vs eV)

Parameters:
  • ylim – Relative fractions of EQE values to consider for the fit. By default, [0.25, 0.70].

  • silent – if False, prints additional information.

Returns:

a Curve with fit parameters and fitted datapoints

CurveEQE_derivativeanalysis(sgwidth: int = None, sgdegree: int = None, roi=None, silent: bool = True) list

Bandgap derivative: Computes the bandgap and other derived data based on the Savitzky-Golay derivative dEQE/dE. Are implemented:

Parameters:
  • sgwidth – width of Savitzky-Golay filter. Default 5.

  • sgdegree – degree of Savitzky-Golay filter. Default 3. Parameter values (w,d) = (3,1) fall back onto the symmetrical discrete difference.

  • roi – range of interest. [nm_min, nm_max]

  • silent – if False, prints additional information.

Returns:

a list of Curves: the derivative, as well as auxiliary Curves showing the data on which the bandgap is computed. The computed bandgap values can be retrieved in the last Curve attributes.

CurveUrbachEnergy(roi_ev: list)

Exponential decay: to obtain a measure of the sub-bandgap disorder tails. The values are typically fitted at too high energies to be the Urbach tail as can be characterized from high-sensitivity PL spectroscopy. Instead, one obtains slightly higher values, with a contribution from bandgap distributions.

Parameters:

roi_ev – limits to the fitted data, in eV. [ev_min, eV_max]

Returns:

the fit as a Curve, giving exponential decay (proxy to Urbach energy).

ERE(voc: float, T: float, Emin='auto', EminUnit='nm', fg=2, bandgap=None, silent=True)

ERE: Computes the External Radiative Efficiency from the EQE curve and the cell Voc. Ref: Green M. A., Prog. Photovolt: Res. Appl. 2012; 20:472-476 The more complete calculation is also provided from Rau et al., Phys. Rev. Applied 7, 044016 (2017) https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.7.044016 Returns ERE, and a Curve showing the integrant.

Parameters:
  • voc – cell Voc voltage in [V]

  • T – temperature in [K]

  • Emin – min energy on which the integral is computed. Unit: nm or eV.

  • EminUnit – ‘eV’ if Emin is given in eV, ‘nm’ otherwise. Default ‘nm’

  • fg – Ruhle’s geometrical factor. 2 for initial Shockley-Queisser derivation, 1 for hemispherical emission (i.e. back reflector)

  • bandgap – in eV. if not provided, determines bandgap by derivative method

  • silent – if False, prints additional information

Returns:

ERE, qe_led, and a list of Curves - the last one contains all values

ERE_GUI(voc, T, Emin='auto', EminUnit='nm', fg=2, bandgap=None)

Computes the External Radiative Efficiency from the EQE curve and the cell Voc. Ref: Green M. A., Prog. Photovolt: Res. Appl. 2012; 20:472-476 The more complete calculation is also provided from Rau et al., Phys. Rev. Applied 7, 044016 (2017) https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.7.044016

Parameters:
  • voc – cell Voc voltage in [V]

  • T – temperature in [K]

  • Emin – min energy on which the integral is computed. Unit: nm or eV.

  • EminUnit – ‘eV’ if Emin is given in eV, ‘nm’ otherwise. Default ‘nm’

  • fg – Ruhle’s geometrical factor. 2 for initial Shockley-Queisser derivation, 1 for hemispherical emission (i.e. back reflector)

  • bandgap – in eV. if not provided, determines PV bandgap by derivative.

Returns:

a list of Curves - the last one contains all values

alterListGUI()

Determines the possible curve visualisations. One element has the form: AlterListItem(‘Label GUI’, [‘alter_x’, ‘alter_y’], ‘semilogx’, “print help doc”) By default only neutral (i.e. raw data) is provided

currentCalc(roi=None, interpolatekind='linear', spectralPhotonIrrad=None, showintegratedcurrent=False, silent=False, if_gui=False)

Computes the current EQE current using AM1.5 spectrum (or another if selected). Assumes the EQE values are in range [0,1] and NOT [0,100].

Parameters:
  • roi – [nm_min, nm_max]

  • interpolatekind – order for interpolation of EQE data. default ‘linear’.

  • spectralPhotonIrrad – filename in folder datatypes. If None, uses AM1.5G.

  • showintegratedcurrent – returns the integrated current versus wavelength.

  • silent – If False, prints additional information.

  • if_gui – True will print the value, False will return the value.

derivative_bandgapmax(sgwidth=None, sgdegree=None, x_y_savgol=None, roi=None, silent=True)

Computes the bandgap based on the Savitzky-Golay derivative peak of derivative. The peak is located based on a gaussian fit to few points near peak values.

Parameters:
  • sgwidth

    1. Parameters of Savitzky-Golay filtering

  • sgdegree – 3

  • x_y_savgol – (optional) to avoid calculating twice if already computed somewhere else

  • roi – [nmmin, nmmax]

  • silent – if False, prints additional information

Returns:

fit results popt, x in fit range

derivative_bandgappvrau(sgwidth=None, sgdegree=None, x_y_savgol=None, roi=None, silent=True)

PV bandgap based on Rau et al. PRA 2017 (weighted energy over peak FWHM) https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.7.044016 Assumes input energy data actually given in nm Returns: bandgap value (float), x, y (base for calculation)

derivative_savgol(sgwidth=None, sgdegree=None, roi=None)

Returns a reduced x,y range and the Savitzky-Golay derivative sgwidth, sgdegree: width and degree of Savitzky-Golay roi: range of interest [nmmin, nmmax]

funcListGUI(**kwargs)

Fills in the Curve actions specific to the Curve type. Retuns a list, which elements are instances of FuncGUI, or (old style):

[func,
 'Button text',
 ['label 1', 'label 2', ...],
 ['value 1', 'value 2', ...],
 {'hiddenvar1': 'value1', ...}, (optional)
 [dictFieldAttributes, {}, ...]] (optional)

By default, returns quick modifs for offset and muloffset (if already set), and a help for some plot types (errorbar, scatter).

Parameters:

kwargs – this function should be called specifying kwargs[‘graph’] the graph self is embedded in, and kwargs[‘graph_i’] as position of self in graph.

static func_gaussian_a(x, a, x0, sigma, *_args)

A simple gaussian formula to fit the derivative peak The amplitude parameter is peak value i.e. not the function integral _args will be ignored. Because GUI may send more than required parameters

static func_gaussian_a_ev(xnm, a, x0ev, sigmaev, *_args)

A simple gaussian formula to fit the derivative peak. Amplitude parameter is peak value i.e. not the function integral args: will be ignored. Because GUI may send more than required parameters.

classmethod print_popt_func_gaussian_a_ev(popt, text='Bandgap')

formatted printout of bandgap, sigma, Vocrad loss based on _popt

classmethod reference_curve(file: str)

Returns a reference spectrum (spectral photon irradiance) based on the provided file name.

Parameters:

file – (str) The name of the file containing the reference spectrum data. The file should be located in the same directory as the script.

Returns:

A Curve object containing the reference spectrum data, or None if file not found or an error occurs while loading the file

updateFitParam(*args, **kwargs)

Override. Additional behavior when changing gaussian fit to derivative

updateFitParamFormatPopt(f, param)

override, for func_absorptionedge

vocloss_shortcircuit(bandgap=None, jsc=None, T=298.15, silent=False)

Calculation of DeltaV_{OC}^{JSc}, short-circuit loss term to Voc, as Jsc < JscSQ According to equation inline, slightly after Eq 11 in paper Rau PRA 2017 https://journals.aps.org/prapplied/abstract/10.1103/PhysRevApplied.7.044016 - bandgap: unit eV. If not provided, computed from derivative method. - jsc: unit mA/cm2. If not provided, computed with default parameters. - T: unit K. if not provided, STC value (298.15 K)