Settings
This page lists the shared settings for the techniques.
There are two ways to adjust these settings, either via the method constructor.
For example, adjusting the post measurement settings:
import pypalmsens as ps
cv = ps.LinearSweepVoltammetry(
...,
post_measurement = {
'cell_on_after_measurement': True,
'standby_potential': 0.5,
'standby_time': 30,
} # (1)!
)
- Note that you can either pass a dictionary or the associated
ps.settings.PostMeasurementclass.
Or by setting the values on the attribute:
lsv = ps.LinearSweepVoltammetry()
lsv.post_measurement.cell_on_after_measurement = True
lsv.post_measurement.standby_potential = 0.5
lsv.post_measurement.standby_time = 30
See the technique reference pages to see which settings are supported.
pypalmsens.settings
This module contains the public api for classes for method configuration.
Classes:
-
CurrentRange–Set the autoranging current.
-
PotentialRange–Set the autoranging potential.
-
Pretreatment–Set the measurement pretreatment settings.
-
VersusOCP–Set the versus OCP settings.
-
BiPot–Set the bipot settings.
-
ELevel–Create a multi-step amperometry level method object.
-
ILevel–Create a multi-step potentiometry level method object.
-
PostMeasurement–Set the post measurement settings.
-
CurrentLimits–Set the limit settings.
-
PotentialLimits–Set the limit settings.
-
ChargeLimits–Set the charge limit settings.
-
IrDropCompensation–Set the iR drop compensation settings.
-
EquilibrationTriggers–Set the equilibration triggers.
-
MeasurementTriggers–Set the measurement triggers.
-
Multiplexer–Set the multiplexer settings.
-
DataProcessing–Set the data processing settings.
-
General–Sets general/other settings.
CurrentRange
Set the autoranging current.
Attributes:
-
max(AllowedCurrentRanges) –Maximum current range.
-
min(AllowedCurrentRanges) –Minimum current range.
-
start(AllowedCurrentRanges) –Start current range.
max
class-attribute
instance-attribute
max: AllowedCurrentRanges = '10mA'
Maximum current range.
See pypalmsens.settings.AllowedCurrentRanges for options.
min
class-attribute
instance-attribute
min: AllowedCurrentRanges = '1uA'
Minimum current range.
See pypalmsens.settings.AllowedCurrentRanges for options.
start
class-attribute
instance-attribute
start: AllowedCurrentRanges = '100uA'
Start current range.
See pypalmsens.settings.AllowedCurrentRanges for options.
PotentialRange
Set the autoranging potential.
Attributes:
-
max(AllowedPotentialRanges) –Maximum potential range.
-
min(AllowedPotentialRanges) –Minimum potential range.
-
start(AllowedPotentialRanges) –Start potential range.
max
class-attribute
instance-attribute
max: AllowedPotentialRanges = '1V'
Maximum potential range.
See pypalmsens.settings.AllowedPotentialRanges for options.
min
class-attribute
instance-attribute
min: AllowedPotentialRanges = '1mV'
Minimum potential range.
See pypalmsens.settings.AllowedPotentialRanges for options.
start
class-attribute
instance-attribute
start: AllowedPotentialRanges = '1V'
Start potential range.
See pypalmsens.settings.AllowedPotentialRanges for options.
Pretreatment
Set the measurement pretreatment settings.
Attributes:
-
deposition_potential(float) –Deposition potential in V.
-
deposition_time(float) –Deposition time in s.
-
conditioning_potential(float) –Conditioning potential in V.
-
conditioning_time(float) –Conditioning time in s.
deposition_potential
class-attribute
instance-attribute
deposition_potential: float = 0.0
Deposition potential in V.
deposition_time
class-attribute
instance-attribute
deposition_time: float = 0.0
Deposition time in s.
conditioning_potential
class-attribute
instance-attribute
conditioning_potential: float = 0.0
Conditioning potential in V.
conditioning_time
class-attribute
instance-attribute
conditioning_time: float = 0.0
Conditioning time in s.
VersusOCP
Set the versus OCP settings.
Attributes:
-
mode(int) –Set versus OCP mode.
-
max_ocp_time(float) –Maximum OCP time in s.
-
stability_criterion(float) –Stability criterion (potential/time) in mV/s.
mode
class-attribute
instance-attribute
mode: int = 0
Set versus OCP mode.
Possible values:
- 0 = disable versus OCP
- 1 = vertex 1 potential
- 2 = vertex 2 potential
- 3 = vertex 1 & 2 potential
- 4 = begin potential
- 5 = begin & vertex 1 potential
- 6 = begin & vertex 2 potential
- 7 = begin & vertex 1 & 2 potential
stability_criterion
class-attribute
instance-attribute
stability_criterion: float = 0.0
Stability criterion (potential/time) in mV/s.
If equal to 0 means no stability criterion. If larger than 0, then the value is taken as the stability threshold.
BiPot
Set the bipot settings.
Attributes:
-
mode(Literal['constant', 'offset']) –Set the bipotential mode.
-
potential(float) –Set the bipotential in V.
-
current_range(AllowedCurrentRanges | BiPotCurrentRange) –Set the bipotential current range.
mode
class-attribute
instance-attribute
mode: Literal['constant', 'offset'] = 'constant'
Set the bipotential mode.
Possible values: constant or offset
current_range
class-attribute
instance-attribute
current_range: AllowedCurrentRanges | BiPotCurrentRange = '1uA'
Set the bipotential current range.
Can be a fixed current range or a ranging current. See the specifications for your instrument. Internally, a fixed current range is represented by an autoranging current with equal min/max ranges.
See pypalmsens.settings.AllowedCurrentRanges for options.
ELevel
Create a multi-step amperometry level method object.
Methods:
-
from_psobj–Construct ELevel dataclass from PalmSens.Techniques.ELevel object.
Attributes:
-
level(float) –Level in V.
-
duration(float) –Duration in s.
-
record(bool) –Record the current.
-
limit_current_max(float | None) –Limit current max in µA. Set to None to disable.
-
limit_current_min(float | None) –Limit current min in µA. Set to None to disable.
-
trigger_lines(Sequence[Literal[0, 1, 2, 3]]) –Trigger at level lines.
-
use_limits(bool) –Return True if instance sets current limits.
limit_current_max
class-attribute
instance-attribute
limit_current_max: float | None = None
Limit current max in µA. Set to None to disable.
limit_current_min
class-attribute
instance-attribute
limit_current_min: float | None = None
Limit current min in µA. Set to None to disable.
trigger_lines
class-attribute
instance-attribute
Trigger at level lines.
Set digital output lines at start of measurement, end of equilibration. Accepted values: 0 for d0, 1 for d1, 2 for d2, 3 for d3.
from_psobj
classmethod
from_psobj(psobj: ELevel)
Construct ELevel dataclass from PalmSens.Techniques.ELevel object.
Source code in src/pypalmsens/_methods/shared.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |
ILevel
Create a multi-step potentiometry level method object.
Methods:
-
from_psobj–Construct ILevel dataclass from PalmSens.Techniques.ELevel object.
Attributes:
-
level(float) –Level in I.
-
duration(float) –Duration in s.
-
record(bool) –Record the potential.
-
limit_potential_max(float | None) –Limit potential max in V. Set to None to disable.
-
limit_potential_min(float | None) –Limit potential min in V. Set to None to disable.
-
trigger_lines(Sequence[Literal[0, 1, 2, 3]]) –Trigger at level lines.
-
use_limits(bool) –Return True if instance sets current limits.
level
class-attribute
instance-attribute
level: float = 0.0
Level in I.
This value is multiplied by the applied current range.
limit_potential_max
class-attribute
instance-attribute
limit_potential_max: float | None = None
Limit potential max in V. Set to None to disable.
limit_potential_min
class-attribute
instance-attribute
limit_potential_min: float | None = None
Limit potential min in V. Set to None to disable.
trigger_lines
class-attribute
instance-attribute
Trigger at level lines.
Set digital output lines at start of measurement, end of equilibration. Accepted values: 0 for d0, 1 for d1, 2 for d2, 3 for d3.
from_psobj
classmethod
from_psobj(psobj: ELevel)
Construct ILevel dataclass from PalmSens.Techniques.ELevel object.
Source code in src/pypalmsens/_methods/shared.py
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | |
PostMeasurement
Set the post measurement settings.
Attributes:
-
cell_on_after_measurement(bool) –Enable/disable cell after measurement.
-
standby_potential(float) –Standby potential (V) for use with cell on after measurement.
-
standby_time(float) –Standby time (s) for use with cell on after measurement.
cell_on_after_measurement
class-attribute
instance-attribute
cell_on_after_measurement: bool = False
Enable/disable cell after measurement.
standby_potential
class-attribute
instance-attribute
standby_potential: float = 0.0
Standby potential (V) for use with cell on after measurement.
standby_time
class-attribute
instance-attribute
standby_time: float = 0.0
Standby time (s) for use with cell on after measurement.
CurrentLimits
Set the limit settings.
Depending on the method, this will: - Abort the measurement - Reverse the scan instead (CV) - Proceed to the next stage (Mixed Mode)
Attributes:
PotentialLimits
Set the limit settings.
Depending on the method, this will: - Abort the measurement - Proceed to the next stage (Mixed Mode)
Attributes:
ChargeLimits
Set the charge limit settings.
Attributes:
IrDropCompensation
Set the iR drop compensation settings.
Attributes:
-
resistance(None | float) –Set the iR compensation resistance in Ω
resistance
class-attribute
instance-attribute
resistance: None | float = None
Set the iR compensation resistance in Ω
EquilibrationTriggers
Set the equilibration triggers.
Set one or more digital outputs on the AUX port at the start of equilibration.
The selected digital line(s) will be set to high when triggered and remain high until the end of the equilibration.
See the instrument-specific documentation for more information about the position of the digital pins on your instrument’s auxiliary port.
Methods:
-
clear–Clear triggers.
Attributes:
-
d0(bool) –If True, enable trigger at d0 high.
-
d1(bool) –If True, enable trigger at d1 high.
-
d2(bool) –If True, enable trigger at d2 high.
-
d3(bool) –If True, enable trigger at d3 high.
clear
clear()
Clear triggers.
Source code in src/pypalmsens/_methods/settings.py
444 445 446 447 448 449 | |
MeasurementTriggers
Set the measurement triggers.
Set one or more digital outputs on the AUX port at the start measurement (end of equilibration).
The selected digital line(s) will be set to high when triggered and remain high until the end of the measurement.
See the instrument-specific documentation for more information about the position of the digital pins on your instrument’s auxiliary port.
Methods:
-
clear–Clear triggers.
Attributes:
-
d0(bool) –If True, enable trigger at d0 high.
-
d1(bool) –If True, enable trigger at d1 high.
-
d2(bool) –If True, enable trigger at d2 high.
-
d3(bool) –If True, enable trigger at d3 high.
clear
clear()
Clear triggers.
Source code in src/pypalmsens/_methods/settings.py
497 498 499 500 501 502 | |
Multiplexer
Set the multiplexer settings.
Attributes:
-
mode(Literal['none', 'consecutive', 'alternate']) –Set multiplexer mode.
-
channels(list[int]) –Set multiplexer channels
-
connect_sense_to_working_electrode(bool) –Connect the sense electrode to the working electrode. Default is False.
-
combine_reference_and_counter_electrodes(bool) –Combine the reference and counter electrodes. Default is False.
-
use_channel_1_reference_and_counter_electrodes(bool) –Use channel 1 reference and counter electrodes for all working electrodes. Default is False.
-
set_unselected_channel_working_electrode(int) –Set the unselected channel working electrode to 0 = Disconnected / floating, 1 = Ground, 2 = Standby potential. Default is 0.
mode
class-attribute
instance-attribute
mode: Literal['none', 'consecutive', 'alternate'] = 'none'
Set multiplexer mode.
Possible values:
none: No multiplexer (disable)consecutivealternate
channels
class-attribute
instance-attribute
Set multiplexer channels
This is defined as a list of indexes for which channels to enable (max 128). For example, [0,3,7]. In consecutive mode all selections are valid.
In alternating mode the first channel must be selected and all other channels should be consecutive i.e. (channel 1, channel 2, channel 3 and so on).
connect_sense_to_working_electrode
class-attribute
instance-attribute
connect_sense_to_working_electrode: bool = False
Connect the sense electrode to the working electrode. Default is False.
combine_reference_and_counter_electrodes
class-attribute
instance-attribute
combine_reference_and_counter_electrodes: bool = False
Combine the reference and counter electrodes. Default is False.
use_channel_1_reference_and_counter_electrodes
class-attribute
instance-attribute
use_channel_1_reference_and_counter_electrodes: bool = False
Use channel 1 reference and counter electrodes for all working electrodes. Default is False.
set_unselected_channel_working_electrode
class-attribute
instance-attribute
set_unselected_channel_working_electrode: int = 0
Set the unselected channel working electrode to 0 = Disconnected / floating, 1 = Ground, 2 = Standby potential. Default is 0.
DataProcessing
Set the data processing settings.
Attributes:
-
smooth_level(int) –Set the default curve post processing filter.
-
min_height(float) –Determines the minimum peak height in µA for peak finding.
-
min_width(float) –The minimum peak width for peak finding.
smooth_level
class-attribute
instance-attribute
smooth_level: int = 0
Set the default curve post processing filter.
Possible values:
- -1: no filter
- 0: spike rejection
- 1: spike rejection + Savitsky-golay window 5
- 2: spike rejection + Savitsky-golay window 9
- 3: spike rejection + Savitsky-golay window 15
- 4: spike rejection + Savitsky-golay window 25
min_height
class-attribute
instance-attribute
min_height: float = 0.0
Determines the minimum peak height in µA for peak finding.
Peaks lower than this value are rejected.
min_width
class-attribute
instance-attribute
min_width: float = 0.1
The minimum peak width for peak finding.
The value is in the unit of the curves X axis (V). Peaks narrower than this value are rejected (default: 0.1 V).
General
Sets general/other settings.
Attributes:
-
save_on_internal_storage(bool) –Save on internal storage.
-
use_hardware_sync(bool) –Use hardware synchronization with other channels/instruments.
-
notes(str) –Add some user notes for use with this technique.
-
power_frequency(Literal[50, 60]) –Set the DC mains filter in Hz.
save_on_internal_storage
class-attribute
instance-attribute
save_on_internal_storage: bool = False
Save on internal storage.
use_hardware_sync
class-attribute
instance-attribute
use_hardware_sync: bool = False
Use hardware synchronization with other channels/instruments.
notes
class-attribute
instance-attribute
notes: str = ''
Add some user notes for use with this technique.
power_frequency
class-attribute
instance-attribute
power_frequency: Literal[50, 60] = 50
Set the DC mains filter in Hz.
Adjusts sampling on instrument to account for mains frequency. Set to 50 Hz or 60 Hz depending on your region (default: 50).