|
efind
electronic component selection utility
|
A component, without knowledge of its value - only bounds and defining formula. More...
Inheritance diagram for efind.Component:Public Member Functions | |
| None | __init__ (self, str prefix, str suffix, str unit, Sequence[float] series=E24, Optional[CalculateCall] calculate=None, float minimum=0, Optional[float] maximum=None, bool use_for_err=True) |
| str | __str__ (self) |
| str | name (self) |
Public Attributes | |
| values | |
| start_decade | |
A component, without knowledge of its value - only bounds and defining formula.
| None efind.Component.__init__ | ( | self, | |
| str | prefix, | ||
| str | suffix, | ||
| str | unit, | ||
| Sequence[float] | series = E24, |
||
| Optional[CalculateCall] | calculate = None, |
||
| float | minimum = 0, |
||
| Optional[float] | maximum = None, |
||
| bool | use_for_err = True |
||
| ) |
| prefix | i.e. R, C or L |
| suffix | Typically a number, i.e. the "2" in R2 |
| unit | i.e. Hz, A, F, ... |
| series | One of E3 through E96 |
| calculate | A callable that will be given all values of previous components in the calculation sequence. These values are floats, and the return must be a float. If this callable is None, the component will be interpreted as a degree of freedom. |
| minimum | Min allowable value; the return of calculate will be checked against this and failures will be silently dropped. Must be at least zero, or greater than zero if calculate is not None. |
| maximum | Max allowable value; the return of calculate will be checked against this and failures will be silently dropped. |
| use_for_err | If True, error from this component's ideal to approximated value will influence the solution rank. |
Reimplemented in efind.Resistor, and efind.Capacitor.