Skip to content

API reference / Switchback

tsdive.switchback.PowerReadout dataclass

PowerReadout(
    tag: str,
    start: Timestamp,
    end: Timestamp,
    unit: str | None,
    draws: int,
    deltas: tuple[float, ...],
    sigma: float | None = None,
    n_kept: int = 0,
    rates: tuple[float, ...] = (),
    smallest: float | None = None,
    reason: str | None = None,
    detail: str | None = None,
)

Detection rates of the plan's design over a history window where nothing changed.

rates[i] is the share of draws seeded schedules whose 95% interval excludes 0 after deltas[i] * sigma is added to the B blocks: the claim rate at a zero shift, detection above it. smallest is the smallest shift on the grid, in sigma, detected at POWER_TARGET or more, or None. On a refusal reason names it and the rates are empty.

Attributes:

Name Type Description
tag str
start Timestamp
end Timestamp
unit str | None
draws int
deltas tuple[float, ...]
sigma float | None
n_kept int
rates tuple[float, ...]
smallest float | None
reason str | None
detail str | None

tag instance-attribute

tag: str

start instance-attribute

start: Timestamp

end instance-attribute

end: Timestamp

unit instance-attribute

unit: str | None

draws instance-attribute

draws: int

deltas instance-attribute

deltas: tuple[float, ...]

sigma class-attribute instance-attribute

sigma: float | None = None

n_kept class-attribute instance-attribute

n_kept: int = 0

rates class-attribute instance-attribute

rates: tuple[float, ...] = ()

smallest class-attribute instance-attribute

smallest: float | None = None

reason class-attribute instance-attribute

reason: str | None = None

detail class-attribute instance-attribute

detail: str | None = None