basic_event
Represents a fault source (Basic Event) injecting FIT rates.
BasicEvent
Bases: BlockInterface
Represents a source of a fault (Basic Event) that injects a specific FIT rate.
This class handles the mathematical addition of failure rates to the fault dictionaries.
Source code in src/ecc_analyzer/core/basic_event.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
__init__(fault_type, rate, is_spfm=True)
Initializes the BasicEvent fault source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fault_type
|
FaultType
|
The type of fault (Enum) this event produces. |
required |
rate
|
float
|
The FIT rate of this basic event. |
required |
is_spfm
|
bool
|
Whether this rate counts towards SPFM (True) or LFM (False). Defaults to True. |
True
|
Source code in src/ecc_analyzer/core/basic_event.py
14 15 16 17 18 19 20 21 22 23 24 25 | |
compute_fit(spfm_rates, lfm_rates)
Transforms the input fault rate dictionaries by injecting the defined FIT rate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spfm_rates
|
dict[FaultType, float]
|
Dictionary containing current SPFM/residual fault rates. |
required |
lfm_rates
|
dict[FaultType, float]
|
Dictionary containing current LFM/latent fault rates. |
required |
Returns:
| Type | Description |
|---|---|
tuple[dict[FaultType, float], dict[FaultType, float]]
|
tuple[dict[FaultType, float], dict[FaultType, float]]: A tuple containing: - Updated SPFM rates dictionary. - Updated LFM rates dictionary. |
Source code in src/ecc_analyzer/core/basic_event.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |