Skip to content

Peltier

This module holds the Peltier class.

ATTRIBUTE DESCRIPTION
MAX_LEN

maximum length of buffer

TYPE: int

READ_FORMAT

read format

TYPE: str

TempData

temperature data

TYPE: NamedTuple

CLASS DESCRIPTION
Peltier

Peltier class

Documentation last updated: 2025-02-22

Peltier

Peltier(
    port: str,
    power_threshold: float = 20,
    stabilize_timeout: float = 10,
    tolerance: float = 1.5,
    *,
    baudrate: int = 115200,
    verbose: bool = False,
    **kwargs,
)

Bases: HeaterMixin, Maker

Peltier class

ATTRIBUTE DESCRIPTION
buffer

buffer data

TYPE: deque[tuple[NamedTuple, datetime]]

records

records data

TYPE: deque[tuple[NamedTuple, datetime]]

record_event

record event

TYPE: Event

tolerance

tolerance

TYPE: float

power_threshold

power threshold

TYPE: float

stabilize_timeout

stabilize timeout

TYPE: float

buffer_df

buffer data as DataFrame

TYPE: DataFrame

records_df

records data as DataFrame

TYPE: DataFrame

METHOD DESCRIPTION
clearCache

clear data cache

getData

get data from device

record

record data

stream

stream data

connect

connect to device

reset

reset device

atTemperature

check if at temperature

getTemperature

get temperature

setTemperature

set temperature

disconnect

disconnect from the device

execute

execute task

resetFlags

reset all flags to class attribute _default_flags

run

alias for execute()

shutdown

shutdown procedure for tool

Initialize the class

PARAMETER DESCRIPTION
port

port

TYPE: str

power_threshold

power threshold. Defaults to 20.

TYPE: float DEFAULT: 20

stabilize_timeout

stabilize timeout. Defaults to 10.

TYPE: float DEFAULT: 10

tolerance

tolerance. Defaults to 1.5.

TYPE: float DEFAULT: 1.5

baudrate

baudrate. Defaults to 115200.

TYPE: int DEFAULT: 115200

verbose

verbosity. Defaults to False.

TYPE: bool DEFAULT: False

buffer_df property

buffer_df: DataFrame

Buffer data as DataFrame

records_df property

records_df: DataFrame

Records data as DataFrame

atTemperature

atTemperature(
    temperature: float | None = None,
    *,
    tolerance: float | None = None,
    power_threshold: float | None = None,
    stabilize_timeout: float | None = None,
) -> bool

Check if at temperature

PARAMETER DESCRIPTION
temperature

target temperature. Defaults to None.

TYPE: float DEFAULT: None

tolerance

tolerance. Defaults to None.

TYPE: float DEFAULT: None

power_threshold

power threshold. Defaults to None.

TYPE: float DEFAULT: None

stabilize_timeout

stabilize timeout. Defaults to None.

TYPE: float DEFAULT: None

RETURNS DESCRIPTION
bool

at temperature

TYPE: bool

clearCache

clearCache()

Clear data cache

getData

getData(*args, **kwargs) -> TempData | None

Get data from device

RETURNS DESCRIPTION
TempData

data from device

TYPE: TempData | None

getTemperature

getTemperature() -> float | None

Get temperature

RETURNS DESCRIPTION
float

temperature

TYPE: float | None

record

record(
    on: bool, show: bool = False, clear_cache: bool = False
)

Record data

PARAMETER DESCRIPTION
on

record data

TYPE: bool

show

print data. Defaults to False.

TYPE: bool DEFAULT: False

clear_cache

clear cache. Defaults to False.

TYPE: bool DEFAULT: False

reset

reset()

Reset device

stream

stream(on: bool, show: bool = False)

Stream data

PARAMETER DESCRIPTION
on

stream data

TYPE: bool

show

print data. Defaults to False.

TYPE: bool DEFAULT: False