Method settings

pypalmsens.settings

This module contains the public api for classes for method configuration.

Classes:

  • CurrentRange – Set the autoranging current for a given method.

  • PotentialRange – Set the autoranging potential for a given method.

  • Pretreatment – Set the pretreatment settings for a given method.

  • VersusOCP – Set the versus OCP settings for a given method.

  • BiPot – Set the bipot settings for a given method.

  • ELevel – Create a multi-step amperometry level method object.

  • PostMeasurement – Set the post measurement settings for a given method.

  • CurrentLimits – Set the limit settings for a given method.

  • PotentialLimits – Set the limit settings for a given method.

  • ChargeLimits – Set the charge limit settings for a given method.

  • IrDropCompensation – Set the iR drop compensation settings for a given method.

  • EquilibrationTriggers – Set the trigger at equilibration settings for a given method.

  • MeasurementTriggers – Set the trigger at measurement settings for a given method.

  • Multiplexer – Set the multiplexer settings for a given method.

  • DataProcessing – Set the data processing settings for a given method.

  • General – Sets general/other settings for a given method.

CurrentRange

Set the autoranging current for a given method.

Attributes:

max

max: CURRENT_RANGE = CURRENT_RANGE.cr_10_mA

Maximum current range.

Use CURRENT_RANGE to define the range.

min

min: CURRENT_RANGE = CURRENT_RANGE.cr_1_uA

Minimum current range.

Use CURRENT_RANGE to define the range.

start

start: CURRENT_RANGE = CURRENT_RANGE.cr_100_uA

Start current range.

Use CURRENT_RANGE to define the range.

PotentialRange

Set the autoranging potential for a given method.

Attributes:

max

max: POTENTIAL_RANGE = POTENTIAL_RANGE.pr_1_V

Maximum potential range.

Use POTENTIAL_RANGE to define the range.

min

min: POTENTIAL_RANGE = POTENTIAL_RANGE.pr_1_mV

Minimum potential range.

Use POTENTIAL_RANGE to define the range.

start

start: POTENTIAL_RANGE = POTENTIAL_RANGE.pr_1_V

Start potential range.

Use POTENTIAL_RANGE to define the range.

Pretreatment

Set the pretreatment settings for a given method.

Attributes:

deposition_potential

deposition_potential: float = 0.0

Deposition potential in V

deposition_time

deposition_time: float = 0.0

Deposition time in s

conditioning_potential

conditioning_potential: float = 0.0

Conditioning potential in V

conditioning_time

conditioning_time: float = 0.0

Conditioning time in s

VersusOCP

Set the versus OCP settings for a given method.

Attributes:

mode

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

max_ocp_time

max_ocp_time: float = 20.0

Maximum OCP time in s

stability_criterion

stability_criterion: int = 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 for a given method.

Attributes:

mode

mode: Literal['constant', 'offset'] = 'constant'

Set the bipotential mode.

Possible values: constant or offset

potential

potential: float = 0.0

Set the bipotential in V

current_range_max

current_range_max: CURRENT_RANGE = CURRENT_RANGE.cr_10_mA

Maximum bipotential current range in mA.

Use CURRENT_RANGE to define the range.

current_range_min

current_range_min: CURRENT_RANGE = CURRENT_RANGE.cr_1_uA

Minimum bipotential current range.

Use CURRENT_RANGE to define the range.

current_range_start

current_range_start: CURRENT_RANGE = CURRENT_RANGE.cr_100_uA

Start bipotential current range.

Use CURRENT_RANGE to define the range.

ELevel

ELevel(level=0.0, duration=1.0, record=True, use_limit_current_max=False, limit_current_max=0.0, use_limit_current_min=False, limit_current_min=0.0, trigger_at_level=False, trigger_at_level_lines=(False, False, False, False))

Create a multi-step amperometry level method object.

Functions:

  • to_psobj

  • from_psobj – Construct ELevel dataclass from PalmSens.Techniques.ELevel object.

Attributes:

level

level: float = 0.0

Level in V.

duration

duration: float = 1.0

Duration in s.

record

record: bool = True

Record the current.

use_limit_current_max

use_limit_current_max: bool = False

Use limit current max.

limit_current_max

limit_current_max: float = 0.0

Limit current max in µA.

use_limit_current_min

use_limit_current_min: bool = False

Use limit current min.

limit_current_min

limit_current_min: float = 0.0

Limit current min in µA.

trigger_at_level

trigger_at_level: bool = False

Use trigger at level.

trigger_at_level_lines

trigger_at_level_lines: tuple[bool, bool, bool, bool] = (False, False, False, False)

Trigger at level lines.

Line order : [d0 high, d1 high, d2 high, d3 high]

to_psobj

to_psobj()

from_psobj

from_psobj(psobj)

Construct ELevel dataclass from PalmSens.Techniques.ELevel object.

PostMeasurement

Set the post measurement settings for a given method.

Attributes:

cell_on_after_measurement

cell_on_after_measurement: bool = False

Enable/disable cell after measurement.

standby_potential

standby_potential: float = 0.0

Standby potential (V) for use with cell on after measurement.

standby_time

standby_time: float = 0.0

Standby time (s) for use with cell on after measurement.

CurrentLimits

Set the limit settings for a given method.

Attributes:

use_limit_max

use_limit_max: bool = False

Use limit current max.

This will reverse the scan instead of aborting measurement.

limit_max

limit_max: float = 0.0

Limit current max in µA.

use_limit_min

use_limit_min: bool = False

Use limit current min.

This will reverse the scan instead of aborting measurement.

limit_min

limit_min: float = 0.0

Limit current min in µA.

PotentialLimits

Set the limit settings for a given method.

Attributes:

use_limit_max

use_limit_max: bool = False

Use limit potential max.

limit_max

limit_max: float = 0.0

Limit potential max in V.

use_limit_min

use_limit_min: bool = False

Use limit potential min.

limit_min

limit_min: float = 0.0

Limit potential min in V.

ChargeLimits

Set the charge limit settings for a given method.

Attributes:

use_limit_max

use_limit_max: bool = False

Use limit charge max.

limit_max

limit_max: float = 0.0

Limit charge max in µC.

use_limit_min

use_limit_min: bool = False

Use limit charge min.

limit_min

limit_min: float = 0.0

Limit charge min in µC.

IrDropCompensation

Set the iR drop compensation settings for a given method.

Attributes:

enable

enable: bool = False

Enable iR compensation

ir_compensation

ir_compensation: float = 0.0

Set the iR compensation in Ω

EquilibrationTriggers

Set the trigger at equilibration settings for a given method.

Attributes:

  • enable (bool) – Enable equilibration triggers.

  • 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.

enable

enable: bool = False

Enable equilibration triggers.

If enabled, set one or more digital outputs at the start of the equilibration period.

d0

d0: bool = False

If True, enable trigger at d0 high.

d1

d1: bool = False

If True, enable trigger at d1 high.

d2

d2: bool = False

If True, enable trigger at d2 high.

d3

d3: bool = False

If True, enable trigger at d3 high.

MeasurementTriggers

Set the trigger at measurement settings for a given method.

Attributes:

  • enable (bool) – Enable measurement triggers.

  • 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.

enable

enable: bool = False

Enable measurement triggers.

If enabled, set one or more digital outputs at the start measurement,

d0

d0: bool = False

If True, enable trigger at d0 high.

d1

d1: bool = False

If True, enable trigger at d1 high.

d2

d2: bool = False

If True, enable trigger at d2 high.

d3

d3: bool = False

If True, enable trigger at d3 high.

Multiplexer

Set the multiplexer settings for a given method.

Attributes:

mode

mode: Literal['none', 'consecutive', 'alternate'] = 'none'

Set multiplexer mode.

Possible values:

  • ‘none’ = No multiplexer (disable)

  • ’consecutive

  • ’alternate

channels

channels: list[int] = attrs.field(factory=list)

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

connect_sense_to_working_electrode: bool = False

Connect the sense electrode to the working electrode. Default is False.

combine_reference_and_counter_electrodes

combine_reference_and_counter_electrodes: bool = False

Combine the reference and counter electrodes. Default is False.

use_channel_1_reference_and_counter_electrodes

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

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 for a given method.

Attributes:

smooth_level

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

min_height: float = 0.0

Determines the minimum peak height in µA for peak finding.

Peaks lower than this value are neglected.

min_width

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 neglected (default: 0.1 V).

General

Sets general/other settings for a given method.

Attributes:

save_on_internal_storage

save_on_internal_storage: bool = False

Save on internal storage.

use_hardware_sync

use_hardware_sync: bool = False

Use hardware synchronization with other channels/instruments.

notes

notes: str = ''

Add some user notes for use with this technique.

power_frequency

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).