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.ndarrayrepresenting 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.ndarrayrepresenting 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 onvoltageand/orcurrentwill be stripped if either are passed in as an AstropyQuantity.
- Returns:
voltage (
numpy.ndarray) β Input argumentvoltageafter it goes through all of its checks and conditioning.current (
numpy.ndarray) β Input argumentcurrentafter it goes through all of its checks and conditioning.
- Raises:
TypeError β If either the
voltageorcurrentarrays are not instances of anumpy.ndarray.ValueError β If either the
voltageorcurrentarrays are not 1D.ValueError β If the
voltagearray is not monotonically increasing.ValueError β If the
currentarray never crosses zero (i.e. has no floating potential).ValueError β If the
currentarray does not start form a negative ion-saturation current and increases to a positive electron-saturation current.ValueError β If either the
voltageorcurrentarray does not have anumpy.dtypeof eithernumpy.integerornumpy.floating.