text
stringlengths 0
828
|
|---|
If :data:`resistor_index` is not specified, the resistor-index from
|
the current context _(i.e., the result of
|
:attr:`series_resistor_index`)_ is used.
|
Otherwise, the series-resistor is temporarily set to the value of
|
:data:`resistor_index` to read the capacitance before restoring
|
back to the original value.
|
See definition of :meth:`safe_series_resistor_index_read`
|
decorator.
|
Returns
|
-------
|
float
|
Return the current series capacitance value for the specified
|
channel.
|
'''
|
if resistor_index is None:
|
resistor_index = self.series_resistor_index(channel)
|
value = self._series_capacitance(channel)
|
try:
|
if channel == 0:
|
self.calibration.C_hv[resistor_index] = value
|
else:
|
self.calibration.C_fb[resistor_index] = value
|
except:
|
pass
|
return value"
|
960,"def series_resistance(self, channel, resistor_index=None):
|
'''
|
Parameters
|
----------
|
channel : int
|
Analog channel index.
|
resistor_index : int, optional
|
Series resistor channel index.
|
If :data:`resistor_index` is not specified, the resistor-index from
|
the current context _(i.e., the result of
|
:attr:`series_resistor_index`)_ is used.
|
Otherwise, the series-resistor is temporarily set to the value of
|
:data:`resistor_index` to set the capacitance before restoring back
|
to the original value.
|
See definition of :meth:`safe_series_resistor_index_read`
|
decorator.
|
Returns
|
-------
|
float
|
Return the current series resistance value for the specified
|
channel.
|
'''
|
if resistor_index is None:
|
resistor_index = self.series_resistor_index(channel)
|
value = self._series_resistance(channel)
|
try:
|
if channel == 0:
|
self.calibration.R_hv[resistor_index] = value
|
else:
|
self.calibration.R_fb[resistor_index] = value
|
except:
|
pass
|
return value"
|
961,"def set_series_capacitance(self, channel, value, resistor_index=None):
|
'''
|
Set the current series capacitance value for the specified channel.
|
Parameters
|
----------
|
channel : int
|
Analog channel index.
|
value : float
|
Series capacitance value.
|
resistor_index : int, optional
|
Series resistor channel index.
|
If :data:`resistor_index` is not specified, the resistor-index from
|
the current context _(i.e., the result of
|
:attr:`series_resistor_index`)_ is used.
|
Otherwise, the series-resistor is temporarily set to the value of
|
:data:`resistor_index` to read the resistance before restoring
|
back to the original value.
|
Returns
|
-------
|
int
|
Return code from embedded call.
|
'''
|
if resistor_index is None:
|
resistor_index = self.series_resistor_index(channel)
|
try:
|
if channel == 0:
|
self.calibration.C_hv[resistor_index] = value
|
else:
|
self.calibration.C_fb[resistor_index] = value
|
except:
|
pass
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.