hvl_ccb.dev.pfa2_filter.base

Inheritance diagram of hvl_ccb.dev.pfa2_filter.base

Base classes for the PFA-2 filter from Precision Filter Inc..

The PFA-2 filter is a high-precision, low-noise analog filter commonly used in laboratory instrumentation and signal conditioning setups. It is suitable for applications requiring clean signal output, such as spectroscopy, low-level voltage measurements, signal recovery and high-resolution data acquisition.

The class PFA2Filter has been tested with a PFA-2 (with option H) unit. Verify compatibility with your specific filter variant before use, especially for units with custom or user-modified settings.

Product information and technical details: https://pfinc.com/product/precision-pfa-2-filter-amplifier

class Pfa2FilterChannelCoupling(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

StrEnum for the channel coupling

AC = 'AC'
DC = 'DC'
class Pfa2FilterChannelMode(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

StrEnum for the channel modes

CALIBRATION = 'CAL'
OPERATE = 'OPERATE'
SHORTED = 'SHORT'
exception Pfa2FilterCommunicationError[source]

Bases: CommunicationError

exception Pfa2FilterError[source]

Bases: DeviceError

class Pfa2FilterHPFState(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

StrEnum for the high pass filter state

OFF = 'OFF'
ON = 'ON'
class Pfa2FilterLPFMode(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

StrEnum for the low pass filter mode

FLAT = 'FLAT'
OFF = 'NONE'
PULSE = 'PULSE'
class Pfa2FilterOverloadMode(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: StrEnum

StrEnum for the overload handling mode

CONTINUOUS = 'CONTINUOUS'
LATCHING = 'LATCHING'
class Pfa2FilterPostGain(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: RangeEnum

RangeEnum for the post filter gain value

EIGHT: float = 8.0
FOUR: float = 4.0
ONE: float = 1.0
ONE_EIGHT: float = 0.125
ONE_HALF: float = 0.5
ONE_QUARTER: float = 0.25
ONE_SIXTEENTH: float = 0.0625
SIXTEEN: float = 16.0
TWO: float = 2.0
classmethod is_reversed() bool[source]

Returns if the desired range value is not available, the next suitable range which is larger (is_reversed = False) or smaller (is_reversed = True) than the desired range value should be selected Default: False :return: True if the next suitable range should be larger than the desired value False if the next suitable range should be smaller than the desired value

classmethod unit() Literal[''][source]

Returns the Unit of the values in the enumeration. :return: the unit of the values in the enumeration in string format

class Pfa2FilterPreGain(value=<no_arg>, names=None, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: RangeEnum

RangeEnum for the pre filter gain value

EIGHT: float = 8.0
FOUR: float = 4.0
ONE: float = 1.0
ONE_HUNDRED_TWENTY_EIGHT: float = 128.0
SIXTEEN: float = 16.0
SIXTY_FOUR: float = 64.0
THIRTY_TWO: float = 32.0
TWO: float = 2.0
classmethod is_reversed() bool[source]

Returns if the desired range value is not available, the next suitable range which is larger (is_reversed = False) or smaller (is_reversed = True) than the desired range value should be selected Default: False :return: True if the next suitable range should be larger than the desired value False if the next suitable range should be smaller than the desired value

classmethod unit() Literal[''][source]

Returns the Unit of the values in the enumeration. :return: the unit of the values in the enumeration in string format

class Pfa2FilterSerialCommunication(configuration)[source]

Bases: SerialCommunication, SyncCommunicationProtocol

Specific communication protocol implementation for PFA-2 filters. Predefines device-specific protocol parameters in config.

static config_cls()[source]

Return the default configdataclass class.

Returns:

a reference to the default configdataclass class

class Pfa2FilterSerialCommunicationConfig(terminator: bytes = b'\r\n', encoding: str = 'utf-8', encoding_error_handling: str = 'strict', wait_sec_read_text_nonempty: int | float = 0.5, default_n_attempts_read_text_nonempty: int = 10, port: str | None = None, baudrate: int = 57600, parity: str | ~hvl_ccb.comm.serial.SerialCommunicationParity = <SerialCommunicationParity.NONE: 'N'>, stopbits: int | float | ~hvl_ccb.comm.serial.SerialCommunicationStopbits = <SerialCommunicationStopbits.ONE: 1>, bytesize: int | ~hvl_ccb.comm.serial.SerialCommunicationBytesize = <SerialCommunicationBytesize.EIGHTBITS: 8>, timeout: int | float = 2)[source]

Bases: SerialCommunicationConfig

Specific communication config implementation for for PFA-2 filters Predefines device-specific protocol parameters.

baudrate: int = 57600

Baudrate of the serial port

force_value(fieldname, value)

Forces a value to a dataclass field despite the class being frozen.

NOTE: you can define post_force_value method with same signature as this method to do extra processing after value has been forced on fieldname.

Parameters:
  • fieldname – name of the field

  • value – value to assign

classmethod keys() Sequence[str]

Returns a list of all configdataclass fields key-names.

Returns:

a list of strings containing all keys.

classmethod optional_defaults() dict[str, object]

Returns a list of all configdataclass fields, that have a default value assigned and may be optionally specified on instantiation.

Returns:

a list of strings containing all optional keys.

classmethod required_keys() Sequence[str]

Returns a list of all configdataclass fields, that have no default value assigned and need to be specified on instantiation.

Returns:

a list of strings containing all required keys.