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
Define classes for method configuration.
Classes:
-
CurrentRange–Set the autoranging current.
-
PotentialRange–Set the autoranging potential.
-
Pretreatment–Set the measurement pretreatment settings.
-
VersusOCP–Define which potentials to measure versus Open Circuit Potential (OCP).
-
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–Adjust the current limits.
-
PotentialLimits–Adjust the potential limits.
-
ChargeLimits–Adjust the charge limits.
-
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.
-
Material–Stores material settings for corrosion measurements.
CurrentRange
Set the autoranging current.
Examples:
As a CurrentRange instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import CurrentRange
>>> method = ps.CyclicVoltammetry(
... current_range=CurrentRange(
... min='1uA',
... max='10mA',
... start='100uA',
... ),
... )
From a dict (coerced to a CurrentRange by Pydantic):
>>> method = ps.CyclicVoltammetry(
... current_range={
... 'min': '1uA',
... 'max': '10mA',
... 'start': '100uA',
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.current_range.min = '1uA'
>>> method.current_range.max = '10mA'
>>> method.current_range.start = '100uA'
Attributes:
-
min(AllowedCurrentRanges) –Minimum current range.
-
max(AllowedCurrentRanges) –Maximum current range.
-
start(AllowedCurrentRanges) –Start current range.
min
class-attribute
instance-attribute
min: AllowedCurrentRanges = '1uA'
Minimum current range.
See pypalmsens.types.AllowedCurrentRanges for options.
max
class-attribute
instance-attribute
max: AllowedCurrentRanges = '10mA'
Maximum current range.
See pypalmsens.types.AllowedCurrentRanges for options.
start
class-attribute
instance-attribute
start: AllowedCurrentRanges = '100uA'
Start current range.
See pypalmsens.types.AllowedCurrentRanges for options.
PotentialRange
Set the autoranging potential.
Examples:
As a PotentialRange instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import PotentialRange
>>> method = ps.ChronoPotentiometry(
... potential_range=PotentialRange(
... min='1mV',
... max='1V',
... start='1V',
... ),
... )
From a dict (coerced to a PotentialRange by Pydantic):
>>> method = ps.ChronoPotentiometry(
... potential_range={
... 'min': '1mV',
... 'max': '1V',
... 'start': '1V',
... },
... )
By setting attributes directly:
>>> method = ps.ChronoPotentiometry()
>>> method.potential_range.min = '1mV'
>>> method.potential_range.max = '1V'
>>> method.potential_range.start = '1V'
Attributes:
-
min(AllowedPotentialRanges) –Minimum potential range.
-
max(AllowedPotentialRanges) –Maximum potential range.
-
start(AllowedPotentialRanges) –Start potential range.
min
class-attribute
instance-attribute
min: AllowedPotentialRanges = '1mV'
Minimum potential range.
See pypalmsens.settings.AllowedPotentialRanges for options.
max
class-attribute
instance-attribute
max: AllowedPotentialRanges = '1V'
Maximum 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.
Examples:
As a Pretreatment instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import Pretreatment
>>> method = ps.CyclicVoltammetry(
... pretreatment=Pretreatment(
... deposition_potential=1.0,
... deposition_time=5.0,
... conditioning_potential=1.0,
... conditioning_time=5.0,
... ),
... )
From a dict (coerced to a Pretreatment by Pydantic):
>>> method = ps.CyclicVoltammetry(
... pretreatment={
... 'deposition_potential': 1.0,
... 'deposition_time': 5.0,
... 'conditioning_potential': 1.0,
... 'conditioning_time': 5.0,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.pretreatment.deposition_potential = 1.0
>>> method.pretreatment.deposition_time = 5.0
>>> method.pretreatment.conditioning_potential = 1.0
>>> method.pretreatment.conditioning_time = 5.0
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
Define which potentials to measure versus Open Circuit Potential (OCP).
Usually, potentials refer to the Working Electrode (WE) relative
to the Reference Electrode (RE).
Use this class to define which potentials (potentials) are relative
to the OCP.
To do so, the technique determines the stable OCP value first.
This requires measuring the OCP drift until it settles (stability_criterion)
or times out (timeout) before starting with the measurement.
The following potentials can be defined relative to OCP:
'vertex1','vertex2': Potential at which the scan direction is reversed'begin': Potential applied at the beginning of a measurement'end': Potential applied at the end of a measurement'potential': Potential applied during measurement
Examples:
As a VersusOCP instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import VersusOCP
>>> method = ps.CyclicVoltammetry(
... versus_ocp=VersusOCP(
... potentials=['begin', 'end'],
... timeout=20.0,
... stability_criterion=0.0,
... ),
... )
From a dict (coerced to a VersusOCP by Pydantic):
>>> method = ps.CyclicVoltammetry(
... versus_ocp={
... 'potentials': ['begin', 'end'],
... 'timeout': 20.0,
... 'stability_criterion': 0.0,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.versus_ocp.potentials = ['begin', 'end']
>>> method.versus_ocp.timeout = 20.0
>>> method.versus_ocp.stability_criterion = 0.0
Attributes:
-
potentials(list[OCPFlag]) –Define these potentials vs OCP.
-
timeout(float) –Maximum time in s to determine OCP value.
-
stability_criterion(float) –Stability criterion (potential/time) in mV/s.
potentials
class-attribute
instance-attribute
Define these potentials vs OCP.
Different methods use different values:
- CV, FCV, CP:
'vertex1','vertex2','begin' - EIS, FIS:
'begin','end' - EIS (potential scan):
'potential' - AD, PS, FAM:
'potential' - LSV, ACV, LP, SWV, DPV, NPV:
'begin','end'
Leave blank to disable versus OCP measurements.
timeout
class-attribute
instance-attribute
timeout: float = 20.0
Maximum time in s to determine OCP value.
Set the OCP value when the timeout has elapsed.
stability_criterion
class-attribute
instance-attribute
stability_criterion: float = 0.0
Stability criterion (potential/time) in mV/s.
Set the OCP value when the drift is lower than the specified value.
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.
Examples:
As a BiPot instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import BiPot
>>> method = ps.CyclicVoltammetry(
... bipot=BiPot(
... mode='constant',
... potential=1.0,
... ),
... )
From a dict (coerced to a BiPot by Pydantic):
>>> method = ps.CyclicVoltammetry(
... bipot={
... 'mode': 'constant',
... 'potential': 1.0,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.bipot.mode = 'constant'
>>> method.bipot.potential = 1.0
Attributes:
-
mode(Literal['constant', 'offset']) –Set the bipotential mode.
-
potential(float) –Set the bipotential in V.
-
current_range(CurrentRange) –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: CurrentRange = Field(default_factory=CurrentRange)
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.types.AllowedCurrentRanges for options.
ELevel
Create a multi-step amperometry level method 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.
ILevel
Create a multi-step potentiometry level method 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.
PostMeasurement
Set the post measurement settings.
Examples:
As a PostMeasurement instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import PostMeasurement
>>> method = ps.CyclicVoltammetry(
... post_measurement=PostMeasurement(
... cell_on_after_measurement=True,
... standby_potential=1.0,
... standby_time=5.0,
... ),
... )
From a dict (coerced to a PostMeasurement by Pydantic):
>>> method = ps.CyclicVoltammetry(
... post_measurement={
... 'cell_on_after_measurement': True,
... 'standby_potential': 1.0,
... 'standby_time': 5.0,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.post_measurement.cell_on_after_measurement = True
>>> method.post_measurement.standby_potential = 1.0
>>> method.post_measurement.standby_time = 5.0
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
Adjust the current limits.
Depending on the method, this will:
- Abort the measurement
- Reverse the scan instead (CV)
- Proceed to the next stage (Mixed Mode)
Examples:
As a CurrentLimits instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import CurrentLimits
>>> method = ps.CyclicVoltammetry(
... current_limits=CurrentLimits(
... max=0.10,
... min=0.01,
... ),
... )
From a dict (coerced to a CurrentLimits by Pydantic):
>>> method = ps.CyclicVoltammetry(
... current_limits={
... 'max': 0.10,
... 'min': 0.01,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.current_limits.max = 0.10
>>> method.current_limits.min = 0.01
Attributes:
PotentialLimits
Adjust the potential limits.
Depending on the method, this will:
- Abort the measurement
- Proceed to the next stage (Mixed Mode)
Examples:
As a PotentialLimits instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import PotentialLimits
>>> method = ps.ChronoPotentiometry(
... potential_limits=PotentialLimits(
... min=-0.5,
... max=0.5,
... ),
... )
From a dict (coerced to a PotentialLimits by Pydantic):
>>> method = ps.ChronoPotentiometry(
... potential_limits={
... 'min': -0.5,
... 'max': 0.5,
... },
... )
By setting attributes directly:
>>> method = ps.ChronoPotentiometry()
>>> method.potential_limits.min = -0.5
>>> method.potential_limits.max = 0.5
Attributes:
ChargeLimits
Adjust the charge limits.
Examples:
As a ChargeLimits instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import ChargeLimits
>>> method = ps.ChronoAmperometry(
... charge_limits=ChargeLimits(
... min=5,
... max=200,
... ),
... )
From a dict (coerced to a ChargeLimits by Pydantic):
>>> method = ps.ChronoAmperometry(
... charge_limits={
... 'min': 5,
... 'max': 200,
... },
... )
By setting attributes directly:
>>> method = ps.ChronoAmperometry()
>>> method.charge_limits.min = 5
>>> method.charge_limits.max = 200
Attributes:
IrDropCompensation
Set the iR drop compensation settings.
Examples:
As a IrDropCompensation instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import IrDropCompensation
>>> method = ps.CyclicVoltammetry(
... ir_drop_compensation=IrDropCompensation(
... resistance=50,
... ),
... )
From a dict (coerced to a IrDropCompensation by Pydantic):
>>> method = ps.CyclicVoltammetry(
... ir_drop_compensation={
... 'resistance': 50,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.ir_drop_compensation.resistance = 50
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.
Examples:
As a EquilibrationTriggers instance, trigger on d0 and d1:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import EquilibrationTriggers
>>> method = ps.CyclicVoltammetry(
... equilibrion_triggers=EquilibrationTriggers(
... d0=True,
... d1=True,
... d2=False,
... d3=False,
... ),
... )
From a dict (coerced to a EquilibrationTriggers by Pydantic):
>>> method = ps.CyclicVoltammetry(
... equilibrion_triggers={
... 'd0': True,
... 'd1': True,
... 'd2': False,
... 'd3': False,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.equilibrion_triggers.d0 = True
>>> method.equilibrion_triggers.d1 = True
>>> method.equilibrion_triggers.d2 = False
>>> method.equilibrion_triggers.d3 = False
Methods:
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.
to_list
Return trigger values as list.
Source code in src/pypalmsens/_methods/settings.py
804 805 806 | |
clear
clear()
Clear triggers.
Source code in src/pypalmsens/_methods/settings.py
825 826 827 828 829 830 | |
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.
Examples:
As a MeasurementTriggers instance, trigger on d0 and d1:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import MeasurementTriggers
>>> method = ps.CyclicVoltammetry(
... measurement_triggers=MeasurementTriggers(
... d0=True,
... d1=True,
... d2=False,
... d3=False,
... ),
... )
From a dict (coerced to a MeasurementTriggers by Pydantic):
>>> method = ps.CyclicVoltammetry(
... measurement_triggers={
... 'd0': True,
... 'd1': True,
... 'd2': False,
... 'd3': False,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.measurement_triggers.d0 = True
>>> method.measurement_triggers.d1 = True
>>> method.measurement_triggers.d2 = False
>>> method.measurement_triggers.d3 = False
Methods:
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.
to_list
Return trigger values as list.
Source code in src/pypalmsens/_methods/settings.py
892 893 894 | |
clear
clear()
Clear triggers.
Source code in src/pypalmsens/_methods/settings.py
913 914 915 916 917 918 | |
Multiplexer
Set the multiplexer settings.
Examples:
As a Multiplexer instance, consecutive on the first 3 channels:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import Multiplexer
>>> method = ps.LinearSweepPotentiometry(
... multiplexer=Multiplexer(
... mode='consecutive',
... channels=[0,1,2],
... connect_se_we=False,
... combine_re_ce=False,
... common_re_ce=False,
... unused_we='float',
... ),
... )
From a dict (coerced to a Multiplexer by Pydantic):
>>> method = ps.LinearSweepPotentiometry(
... multiplexer={
... 'mode': 'consecutive',
... 'channels': [0,1,2],
... 'connect_se_we': False,
... 'combine_re_ce': False,
... 'common_re_ce': False,
... 'unused_we': 'float',
... },
... )
By setting attributes directly:
>>> method = ps.LinearSweepPotentiometry()
>>> method.multiplexer.mode = 'consecutive'
>>> method.multiplexer.channels = [0,1,2]
>>> method.multiplexer.connect_se_we = False
>>> method.multiplexer.combine_re_ce = False
>>> method.multiplexer.common_re_ce = False
>>> method.multiplexer.unused_we = 'float'
Attributes:
-
mode(Literal['none', 'consecutive', 'alternate']) –Set multiplexer mode.
-
channels(list[int]) –Set multiplexer channels.
-
connect_se_we(bool) –Connect the sense electrode to the working electrode. Default is False.
-
combine_re_ce(bool) –Combine the reference and counter electrodes. Default is False.
-
common_re_ce(bool) –Use channel 1 reference and counter electrodes for all working electrodes. Default is False.
-
unused_we(Literal['float', 'ground', 'standby']) –State of the unused channel working electrodes:
mode
class-attribute
instance-attribute
mode: Literal['none', 'consecutive', 'alternate'] = 'none'
Set multiplexer mode.
none: No multiplexer (disabled).consecutive: Channels are measured one at a time, in sequence. Any subset of channels may be selected.alternate: All selected channels are measured simultaneously by rapidly switching between them within each measurement interval. Channels must be consecutive starting from 0 (e.g. [0,1,2,3]). Only supported by CA, CP, OCP, and (G)EIS.
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 (e.g [0,1,2,3]).
connect_se_we
class-attribute
instance-attribute
connect_se_we: bool = False
Connect the sense electrode to the working electrode. Default is False.
combine_re_ce
class-attribute
instance-attribute
combine_re_ce: bool = False
Combine the reference and counter electrodes. Default is False.
common_re_ce
class-attribute
instance-attribute
common_re_ce: bool = False
Use channel 1 reference and counter electrodes for all working electrodes. Default is False.
unused_we
class-attribute
instance-attribute
unused_we: Literal['float', 'ground', 'standby'] = 'float'
State of the unused channel working electrodes:
float: Disconnected / floatingground: Groundstandby: Standby potential
Default is 'float'.
DataProcessing
Set the data processing settings.
Examples:
As a DataProcessing instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import DataProcessing
>>> method = ps.CyclicVoltammetry(
... data_processing=DataProcessing(
... smooth_level=0,
... min_height=0.0,
... min_width=0.1,
... ),
... )
From a dict (coerced to a DataProcessing by Pydantic):
>>> method = ps.CyclicVoltammetry(
... data_processing={
... 'smooth_level': 0,
... 'min_height': 0.0,
... 'min_width': 0.1,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.data_processing.smooth_level = 0
>>> method.data_processing.min_height = 0.0
>>> method.data_processing.min_width = 0.1
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.
Examples:
As a General instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import General
>>> method = ps.CyclicVoltammetry(
... general=General(
... save_on_internal_storage=False,
... use_hardware_sync=False,
... notes='They asked me if I had a degree in theoretical physics.',
... power_frequency=50,
... ),
... )
From a dict (coerced to a General by Pydantic):
>>> method = ps.CyclicVoltammetry(
... general={
... 'save_on_internal_storage': False,
... 'use_hardware_sync': False,
... 'notes': 'I told them I had a theoretical degree in physics.',
... 'power_frequency': 50,
... },
... )
By setting attributes directly:
>>> method = ps.CyclicVoltammetry()
>>> method.general.save_on_internal_storage = False
>>> method.general.use_hardware_sync = False
>>> method.general.notes = 'They said welcome aboard.'
>>> method.general.power_frequency = 50
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).
Material
Stores material settings for corrosion measurements.
Examples:
As a Material instance:
>>> import pypalmsens as ps
>>> from pypalmsens.settings import Material
>>> method = ps.corrosion.CyclicPolarization(
... material=Material(
... surface_area=0.0,
... weight=0.0,
... density=0.0,
... b_anodic=0.0,
... b_cathodic=0.0,
... ),
... )
From a dict (coerced to a Material by Pydantic):
>>> method = ps.corrosion.CyclicPolarization(
... material={
... 'surface_area': 0.0,
... 'weight': 0.0,
... 'density': 0.0,
... 'b_anodic': 0.0,
... 'b_cathodic': 0.0,
... },
... )
By setting attributes directly:
>>> method = ps.corrosion.CyclicPolarization()
>>> method.material.surface_area = 0.0
>>> method.material.weight = 0.0
>>> method.material.density = 0.0
>>> method.material.b_anodic = 0.0
>>> method.material.b_cathodic = 0.0
Attributes:
-
surface_area(float) –Surface area of the sample in cm2.
-
weight(float) –Equivalent mass of one mole of the sample material in g/mol.
-
density(float) –Density of the sample in g/cm3.
-
b_anodic(float) –B anodic in V/dec.
-
b_cathodic(float) –B cathodic in V/dec.