stanza.models

Module Contents

Classes

NameDescription
BaseModelWithConfigNone
ElectrodeNone
PadTypePad type
GateTypestr(object=”) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
ContactTypestr(object=”) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
InstrumentTypestr(object=”) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
GateNone
ContactNone
RoutineConfigNone
BaseInstrumentConfigBase instrument configuration with discriminator.
MeasurementInstrumentConfigInstrument configuration for measurement instruments with required timing parameters.
ControlInstrumentConfigInstrument configuration for control instruments.
GeneralInstrumentConfigInstrument configuration for general instruments with both control and measurement capabilities.
DeviceConfigNone

Data

PYDANTIC_VERSION_MINOR_TUPLE PYDANTIC_V2 InstrumentConfig

API

1stanza.models.PYDANTIC_VERSION_MINOR_TUPLE

Value: tuple(...)

1stanza.models.PYDANTIC_V2

Value: None

1class stanza.models.BaseModelWithConfig

Bases: pydantic.BaseModel

1class stanza.models.Electrode

Bases: pydantic.BaseModel

1control_channel: int | None

Value: Field(...)

1measure_channel: int | None

Value: Field(...)

1v_lower_bound: float | None

Value: None

1v_upper_bound: float | None

Value: None

1validate_control_channel_required_when_no_measure_channel() -> stanza.models.Electrode
1validate_control_channel_requires_v_bounds() -> stanza.models.Electrode
1class stanza.models.PadType

Bases: str, enum.Enum

Pad type

Initialization

Initialize self. See help(type(self)) for accurate signature.

1GATE

Value: GATE

1CONTACT

Value: CONTACT

1ALL

Value: ALL

1__str__() -> str
1class stanza.models.GateType

Bases: str, enum.Enum

1PLUNGER

Value: PLUNGER

1BARRIER

Value: BARRIER

1RESERVOIR

Value: RESERVOIR

1SCREEN

Value: SCREEN

1class stanza.models.ContactType

Bases: str, enum.Enum

1SOURCE

Value: SOURCE

1DRAIN

Value: DRAIN

1class stanza.models.InstrumentType

Bases: str, enum.Enum

1CONTROL

Value: CONTROL

1MEASUREMENT

Value: MEASUREMENT

1GENERAL

Value: GENERAL

1class stanza.models.Gate

Bases: stanza.models.Electrode

1type: stanza.models.GateType

Value: None

1class stanza.models.Contact

Bases: stanza.models.Electrode

1type: stanza.models.ContactType

Value: None

1class stanza.models.RoutineConfig

Bases: stanza.models.BaseModelWithConfig

1name: str

Value: None

1parameters: dict[str, typing.Any | str] | None

Value: None

1routines: list[stanza.models.RoutineConfig] | None

Value: None

1class stanza.models.BaseInstrumentConfig

Bases: stanza.models.BaseModelWithConfig

Base instrument configuration with discriminator.

1name: str

Value: None

1ip_addr: str | None

Value: None

1serial_addr: str | None

Value: None

1port: int | None

Value: None

1type: stanza.models.InstrumentType

Value: None

1driver: str | None

Value: Field(...)

1check_comm_type() -> stanza.models.BaseInstrumentConfig
1class stanza.models.MeasurementInstrumentConfig

Bases: stanza.models.BaseInstrumentConfig

Instrument configuration for measurement instruments with required timing parameters.

1type: typing.Literal[stanza.models.InstrumentType]

Value: None

1measurement_duration: float

Value: Field(...)

1sample_time: float

Value: Field(...)

1conversion_factor: float

Value: Field(...)

1machine_type: str | None

Value: Field(...)

1cluster_name: str | None

Value: Field(...)

1measurement_channels: list[int] | None

Value: Field(...)

1connection_headers: dict[str, str] | None

Value: Field(...)

1octave: str | None

Value: Field(...)

1validate_timing_constraints() -> stanza.models.MeasurementInstrumentConfig

Validate logical constraints between timing parameters.

1class stanza.models.ControlInstrumentConfig

Bases: stanza.models.BaseInstrumentConfig

Instrument configuration for control instruments.

1type: typing.Literal[stanza.models.InstrumentType]

Value: None

1slew_rate: float

Value: Field(...)

1class stanza.models.GeneralInstrumentConfig

Bases: stanza.models.ControlInstrumentConfig, stanza.models.MeasurementInstrumentConfig

Instrument configuration for general instruments with both control and measurement capabilities.

1model_config

Value: ConfigDict(...)

1type: typing.Literal[stanza.models.InstrumentType]

Value: None

1stanza.models.InstrumentConfig

Value: None

1class stanza.models.DeviceConfig

Bases: pydantic.BaseModel

1model_config

Value: ConfigDict(...)

1name: str

Value: None

1gates: dict[str, stanza.models.Gate]

Value: None

1contacts: dict[str, stanza.models.Contact]

Value: None

1routines: list[stanza.models.RoutineConfig]

Value: None

1instruments: list[stanza.models.InstrumentConfig]

Value: None

1validate_unique_channels() -> stanza.models.DeviceConfig

Ensure that all channels are unique across gates and contacts

1validate_required_instruments() -> stanza.models.DeviceConfig