microcalorimetry.math.rfpower

Analysis functions used in RF power and calorimetery.

Functions

dcbias_eta_correction(eta, R_lead, R_bolo)

Correct an effective efficiency measurment for DC biases.

openloop_thermoelectric_power(→ xarray.DataArray)

Calculate the openloop thermoelectric power from fit coefficients.

thermopile_sensitivity(→ xarray.DataArray)

Calculate the sensitivity of thermopile element using DC power.

zeta_general(→ xarray.DataArray)

Calculate uncorrected effective efficiency for any sensor.

zeta_dcsub(→ xarray.DataArray)

Calculate uncorrected effective efficiency for a DC substitution type sensor.

effective_efficiency(→ xarray.DataArray)

Calculate effective efficiency.

calorimetric_power_delta_general(→ xarray.DataArray)

Calculate power delta.

calorimetric_power_delta_dcsub(e_on, e_off, k, p_of_e)

Calculate Delta_x for a calorimeter run.

calorimetric_alpha_xs(→ xarray.DataArray)

Calculate the 'alpha' term, proportional to the power incident on sensor x.

dc_substituted_power(→ xarray.DataArray)

Calculate dc substituted power.

gc_device_row(→ xarray.DataArray)

Build a row in the correction factor regressor matrix.

gc_correction_factor(→ xarray.DataArray)

Calculate calorimetric correction factor.

Module Contents

microcalorimetry.math.rfpower.dcbias_eta_correction(eta: xarray.DataArray, R_lead: float, R_bolo: float)[source]

Correct an effective efficiency measurment for DC biases.

From CPEM 2010 paper.

Parameters:
etaxr.DataArray

Effective efficiency measurement.

R_leadfloat

Lead resistance of the Force and Sense leads of the sensor added together.

R_bolofloat

Resistance of the bolometer, typically 200 Ohms for thermistor sensors.

microcalorimetry.math.rfpower.openloop_thermoelectric_power(coeffs: xarray.DataArray, e: xarray.DataArray, p_of_e: bool) xarray.DataArray[source]

Calculate the openloop thermoelectric power from fit coefficients.

Parameters:
coeffsxr.DataArray

Quadratic fit coefficients. Fit coefficients are along last dimension called “deg”, coordinates are integer values corresponding to the polynomail power (i.e. deg = 2 corresponds to c_2 for y = c_2*x**^2 ). Fit coefficients can be power in terms of voltage (W/V^n) or voltage in terms of power (V/W^n). A

thermoelectric_voltagexr.DataArray

Array of thermoelectric voltages to evaluate power at.

p_of_ebool

If true, assumes fit is power in terms of the thermolectric voltage, by default True.

Returns:
xr.DataArray

Evaluated thermoelectric power.

microcalorimetry.math.rfpower.thermopile_sensitivity(p: xarray.DataArray, e: xarray.DataArray, constrain_zero: bool = False, p_of_e: bool = True, deg: int = 2, punc: numpy.array = None, eunc: numpy.array = None) xarray.DataArray[source]

Calculate the sensitivity of thermopile element using DC power.

v, i, and e are typically estimates of the steady state values of a step response. Function performs a polynomial of requested degree. v, i, and e are assuemd to be of shape (…, n) where all coordinates and dimensions are the same. The fitting is done across the n dimensions, and repeated across (…).

Parameters:
vxr.DataArray

DC voltage applied to a sensor.

ixr.DataArray

DC current applied to a sensor.

exr.DataArray

DC voltage measured across the thermopile.

constrain_zerobool, optional

Constrain the offset to cross zero.

p_of_e: bool, optional

If true, fits power in terms of thermopile voltage, if false fits thermopile voltage in terms of power.

deg: int, optional

Degree of polynomial fit. The default is 2.

punc: np.array, optional

Uncertainty on power values. The default is None. If provided, used as weights for the ordinary least squares fitting.

eunc: np.array, optional

Uncertainty on power values. The default is None. If provided, used as weights for the ordinary least squares fitting.

Returns:
sensexr.DataArray

Resulting coefficients of the fit.

microcalorimetry.math.rfpower.zeta_general(e_on: xarray.DataArray, e_off: xarray.DataArray, cal_k: xarray.DataArray, p_of_e: bool, P2: xarray.DataArray, P_dc_on_slow: xarray.DataArray = 0, P_dc_off_slow: xarray.DataArray = 0) xarray.DataArray[source]

Calculate uncorrected effective efficiency for any sensor.

Requires knowledge of calorimeter’s sensitivity, but doesn’t assume linearity as it can be corrected for using higher order fit coefficients. This formulation is sensor agnostic.

Parameters:
e_onxr.DataArray

Thermopile voltage in the RF on state (of calorimeter).

e_offxr.DataArray

Thermopile voltage in the RF off state (of calorimeter).

cal_kxr.DataArray

Thermopile sensitivity coefficients of the calorimeter. Last dimension called ‘deg’ with integer coordinates corresponding to the polynomial order.

p_of_ebool

True means cal_k fits power in terms of thermopile voltage. False means cal_k fits thermopile voltage in terms of power. V/W or W/V.

P2xr.DataArray

Metered power of the sensor in the calorimeter

P_dc_on_slowxr.DataArray

DC power in the RF on state evalutated on the long term at the point P2 was taken.

P_dc_off_slowxr.DataArray

DC power in the RF off state evaluated on the long term at the time P2 was taken (usually via interpolation).

Returns:
xr.DataArray

Uncorrected effective efficiency.

microcalorimetry.math.rfpower.zeta_dcsub(e_on: xarray.DataArray, e_off: xarray.DataArray, V_on: xarray.DataArray, V_off: xarray.DataArray, V_off_slow: xarray.DataArray, I_on: xarray.DataArray = None, I_off: xarray.DataArray = None, I_off_slow: xarray.DataArray = None) xarray.DataArray[source]

Calculate uncorrected effective efficiency for a DC substitution type sensor.

All in inputs are assumed to be data arrays of the same shape, and share common coordinates.

Parameters:
e_onxr.DataArray

Thermopile voltage in the RF on state.

e_offxr.DataArray

Thermopile voltage in the RF off state.

V_onxr.DataArray

DC voltage in the RF on state.

V_offxr.DataArray

DC voltage in the RF off state.

V_off_slowxr.DataArray

DC voltage in the RF off state. (estimated from equilibrium)

I_onxr.DataArray, optional

DC current in the RF on state if power was measured with an SMU. If not provided only the voltage measurement will be used.

I_offxr.DataArray, optional

DC current in the RF off state if power was measured with an SMU. If not provided only the voltage measurement will be used. The default is None.

I_off_slowxr.DataArray, optional

DC current in the RF off state if power was measured with an SMU (in equilibrium). If not provided only the voltage measurement will be used. The default is None.

Returns
——-
xr.DataArray

Uncorrected effective efficiency.

microcalorimetry.math.rfpower.effective_efficiency(uncorrected_eta: xarray.DataArray, gamma_s: xarray.DataArray, gc: xarray.DataArray) xarray.DataArray[source]

Calculate effective efficiency.

Currently only supports a 1 term model.

Parameters:
uncorrected_etaxr.DataArray

Uncorrected effective efficiency of a calorimetric measurement.

gamma_sxr.DataArray

Reflection coefficient of the standard in s1p_c format.

gcxr.DataArray

Correction factor, either 1 term or 4 term model.

Returns:
xr.DataArray

Effective efficiency.

Raises:
Exception

If not a 1 term correction factor, until support added..

microcalorimetry.math.rfpower.calorimetric_power_delta_general(e_on: xarray.DataArray, e_off: xarray.DataArray, cal_k: xarray.DataArray, p_of_e: bool, P_dc_on_slow: xarray.DataArray = 0, P_dc_off_slow: xarray.DataArray = 0) xarray.DataArray[source]

Calculate power delta.

Requires knowledge of calorimeter’s sensitivity, but doesn’t assume linearity as it can be corrected for using higher order fit coefficients. This formulation is sensor agnostic.

Parameters:
e_onxr.DataArray

Thermopile voltage in the RF on state (of calorimeter).

e_offxr.DataArray

Thermopile voltage in the RF off state (of calorimeter).

cal_kxr.DataArray

Thermopile sensitivity coefficients of the calorimeter. Last dimension called ‘deg’ with integer coordinates corresponding to the polynomial order.

p_of_ebool

True means cal_k fits power in terms of thermopile voltage. False means cal_k fits thermopile voltage in terms of power. V/W or W/V.

P_dc_on_slowxr.DataArray

DC power in the RF on state evalutated on the long term at the point P2 was taken.

P_dc_off_slowxr.DataArray

DC power in the RF off state evaluated on the long term at the time P2 was taken (usually via interpolation).

Returns:
xr.DataArray

Uncorrected effective efficiency.

microcalorimetry.math.rfpower.calorimetric_power_delta_dcsub(e_on: xarray.DataArray, e_off: xarray.DataArray, k: xarray.DataArray, p_of_e: bool, dc_sub: xarray.DataArray = 0)[source]

Calculate Delta_x for a calorimeter run.

Delta_x is the difference in power measured by the calorimeters thermopile element and the power metered by the sensor. It is a term used in calcualting the correction factor of the calorimeter.

k is assumed to be formatted from the thermopile_sensitivity method.

If DC current is provided, then the DC power is calculated using V*I, if a set point resistance is provided then DC power is calculated using V**2/R. One of ether the setpoint OR the DC current must be provided.

Parameters:
e_onxr.DataArray

Thermopile voltage in the RF on state.

e_offxr.DataArray

Thermopile voltage in the RF off state.

kxr.DataArray

Sensitivity cofficients that describe the power at the sensitivity of the thermopile element. Assumed to be in the mck data format.

p_of_ebool

Whether or not he coefficients (k) are power in terms of e (True) or e in terms of power (False).

dc_subxr.DataArray

DC substituted power.

Returns:
deltaxr.DataArray

Power delta.

microcalorimetry.math.rfpower.calorimetric_alpha_xs(dcsub_s: xarray.DataArray, dcsub_3x: xarray.DataArray, dcsub_3s: xarray.DataArray, gamma_s: xarray.DataArray, gamma_x: xarray.DataArray, gamma_g: xarray.DataArray) xarray.DataArray[source]

Calculate the ‘alpha’ term, proportional to the power incident on sensor x.

Used in the correction factor algorithm.

Parameters:
dcsub_sxr.DataArray

DC substituted power measured by the normal standard in the calorimeter.

dcsub_3xxr.DataArray

DC subtituted power measured by the side arm with sesnsor x in the calorimeter.

dcsub_3sxr.DataArray

DC substituted power measured by the sid-arm with the normal standard in the calorimeter.

gamma_sxr.DataArray

Reflection coefficient of standard s in s1p_c format.

gamma_xxr.DataArray

Reflection coefficient of sensor x in s1p_c format.

gamma_gxr.DataArray

Port-2-port mismatch of the spliter being used.

Returns:
xr.DataArray

alpha_xs.

microcalorimetry.math.rfpower.dc_substituted_power(V_on: xarray.DataArray, V_off: xarray.DataArray, R: xarray.DataArray = None, I_on: xarray.DataArray = None, I_off: xarray.DataArray = None) xarray.DataArray[source]

Calculate dc substituted power.

R OR (I_on and I_off) must be provided to calculate the dc substituted power.

Parameters:
V_onxr.DataArray

DC voltage in the RF on state.

V_offxr.DataArray

DC voltage in the RF off state.

Rxr.DataArray, optional

Set-point resistance of the standard. The default is None.

I_onxr.DataArray, optional

DC current in the RF on state. The default is None.

I_offxr.DataArray, optional

DC current in the RF off state. The default is None.

Returns:
xr.DataArray

dc substituted power.

Raises:
Exception

If neither R nor Current measurements are provided, or if both are.

microcalorimetry.math.rfpower.gc_device_row(alpha_xs: xarray.DataArray, delta_x: xarray.DataArray, zeta_s: xarray.DataArray, gamma_s: xarray.DataArray, gamma_x: xarray.DataArray, n_correction_terms: int = 1) xarray.DataArray[source]

Build a row in the correction factor regressor matrix.

Returns (….,r,c) shaped data

Parameters:
alpha_xsxr.DataArray

alpha_xs term in the correction factor model for standard x.

delta_xxr.DataArray

power delta term in the correctionf factor model for sensor x.

zeta_sxr.DataArray

uncorrected effective efficiency of standard s.

gamma_sxr.DataArray

reflection coefficient of standard s in the s1p_c format.

gamma_xxr.DataArray

reflection coefficient of standard x in the s1p_c format.

n_correction_termsint, optional

Number of correction terms being calculated. The default is 1.

Returns:
xr.DataArray

Row in the correction factor regressor matrix with shape (…,1, n_correction_terms)

xr.DataArray

Solution to the equation for the resulting row with shape (…, 1, n_correction_terms)

microcalorimetry.math.rfpower.gc_correction_factor(regressor: xarray.DataArray, solution: xarray.DataArray, n_correction_terms: int = 1) xarray.DataArray[source]

Calculate calorimetric correction factor.

Parameters:
regressorxr.DataArray

Rows in the correction factor regressor matrix.

solutionxr.DataArray

Solutions to the regressor matrix

n_correction_term: int,optional

Number of correction factor terms to calculate.

Returns:
xr.DataArray

Correction factor model.