STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
feedtwin.model.units.Unit Class Reference

Public Member Functions

float to_si (self, float value)
float from_si (self, float value)

Static Public Attributes

float offset = 0.0
bool canonical = False

Detailed Description

A unit, and how to get from it to this package's canonical one.

``si = value * factor + offset``. The offset exists for temperature and is
zero for everything else; keeping it in the general form is cheaper than a
special case that someone later forgets.

Definition at line 57 of file units.py.

Member Function Documentation

◆ from_si()

float feedtwin.model.units.Unit.from_si ( self,
float value )

Definition at line 78 of file units.py.

References offset.

◆ to_si()

float feedtwin.model.units.Unit.to_si ( self,
float value )

Definition at line 75 of file units.py.

References offset.

Member Data Documentation

◆ canonical

bool feedtwin.model.units.Unit.canonical = False
static

Definition at line 69 of file units.py.

◆ offset

feedtwin.model.units.Unit.offset = 0.0
static

Definition at line 68 of file units.py.

Referenced by from_si(), and to_si().


The documentation for this class was generated from the following file: