branch
branch
¶
Classes for defining logic tree branches
Branch
dataclass
¶
Bases: ABC
Abstract baseclass for logic tree branches
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
a name for the branch |
required | |
weight
|
float
|
a weight for the branch |
1.0
|
Source code in nzshm_model/logic_tree/branch.py
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 |
|
filtered_branch(logic_tree, branch_set)
abstractmethod
¶
Produce a new filtered branch with the properties of the branch
Parameters:
Name | Type | Description | Default |
---|---|---|---|
logic_tree
|
LogicTree
|
The logic tree that the branch belongs to |
required |
branch_set
|
BranchSet
|
The branch est that the branch belongs to |
required |
Returns:
Type | Description |
---|---|
FilteredBranch
|
a filtered branch |
Source code in nzshm_model/logic_tree/branch.py
30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
CompositeBranch
dataclass
¶
A logic tree branch comprised of combinations of branches from one or more branch sets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
branches
|
Sequence[Branch]
|
the component branches (branches from branch sets) in the composite branch |
list()
|
weight
|
float
|
the weight of the composite branch |
1.0
|
Source code in nzshm_model/logic_tree/branch.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|