check_sweep¶

plasmapy.analysis.swept_langmuir.helpers.
check_sweep
(voltage: numpy.ndarray, current: numpy.ndarray, strip_units: bool = True) > (<class 'numpy.ndarray'>, <class 'numpy.ndarray'>)¶ Function for checking that the voltage and current arrays are properly formatted for analysis by
plasmapy.analysis.swept_langmuir
. Parameters
voltage (
numpy.ndarray
) – 1Dnumpy.ndarray
representing the voltage of the swept Langmuir trace. Voltage should be monotonically increasing. No units are assumed or checked, but values should be in volts.current (
numpy.ndarray
) – 1Dnumpy.ndarray
representing the current of the swept Langmuir trace. Values should start from a negative ionsaturation current and increase to a positive electronsaturation current. No units are assumed or checked, but values should be in amperes.strip_units (
bool
) – (Default:True
) IfTrue`
, then the units onvoltage
and/orcurrent
will be stripped if either are passed in as an AstropyQuantity
.
 Returns
voltage (
numpy.ndarray
) – Input argumentvoltage
after it goes through all of its checks and conditioning.current (
numpy.ndarray
) – Input argumentcurrent
after it goes through all of its checks and conditioning.
 Raises
TypeError – If either the
voltage
orcurrent
arrays are not instances of anumpy.ndarray
.ValueError – If either the
voltage
orcurrent
arrays are not 1D.ValueError – If the
voltage
array is not monotonically increasing.ValueError – If the
current
array never crosses zero (i.e. has no floating potential).ValueError – If the
current
array does not start form a negative ionsaturation current and increases to a positive electronsaturation current.ValueError – If either the
voltage
orcurrent
array does not have anumpy.dtype
of eithernumpy.integer
ornumpy.floating
.