transformation_block
Block logic for transferring FIT rates between fault types.
TransformationBlock
Bases: BlockInterface
Transfers a portion of one fault type's rate to another fault type.
This operation adds a calculated rate to the target fault type based on the source fault type, without removing the rate from the source (unlike SplitBlock).
Source code in src/ecc_analyzer/core/transformation_block.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 | |
__init__(source_fault, target_fault, factor)
Initializes the transformation block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_fault
|
FaultType
|
The fault type from which the rate is calculated. |
required |
target_fault
|
FaultType
|
The fault type to which the calculated rate is added. |
required |
factor
|
float
|
The multiplication factor applied to the source rate. |
required |
Source code in src/ecc_analyzer/core/transformation_block.py
15 16 17 18 19 20 21 22 23 24 25 | |
compute_fit(spfm_rates, lfm_rates)
Transforms the input fault rate dictionaries by transferring a portion of the source rate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spfm_rates
|
dict[FaultType, float]
|
Current residual failure rates. |
required |
lfm_rates
|
dict[FaultType, float]
|
Current latent failure 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 (target fault increased). - Unchanged LFM rates. |
Source code in src/ecc_analyzer/core/transformation_block.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |