check_sweep
- plasmapy.analysis.swept_langmuir.helpers.check_sweep( ) tuple[ndarray, ndarray] [source]
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 ion-saturation current and increase to a positive electron-saturation 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 ion-saturation current and increases to a positive electron-saturation current.ValueError – If either the
voltage
orcurrent
array does not have anumpy.dtype
of eithernumpy.integer
ornumpy.floating
.