logic_tree
Classes for the combined SRM + GMCM logic trees used to define a seismic hazard model.
HazardComponentBranch
¶
A component branch of the combined (SRM + GMCM) logic tree comprised of an srm branch and a gmcm branch.
The HazardComposite branch is the smallest unit necessary to create a hazard curve realization.
Source code in toshi_hazard_post/logic_tree.py
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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
gmcm_hash_digest
property
¶
The hash digest of the gmcm branch.
registry_identity
property
¶
The registry identity of the component branch.
The registry identity is formed as concatinations of the source and gmcm identities. {source branch id}{gmcm branch1}|{gmcm branch2}...
source_hash_digest
property
¶
The hash digest of the source branch.
__init__(source_branch, gmcm_branches)
¶
Initialize a new HazardComponentBranch object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
source_branch
|
SourceBranch
|
The source branch of the composite branch. |
required |
gmcm_branches
|
Tuple[GMCMBranch]
|
The GMCM branches that make up the composite branch. |
required |
Source code in toshi_hazard_post/logic_tree.py
27 28 29 30 31 32 33 34 35 36 37 38 |
|
HazardCompositeBranch
¶
A composite branch of the combined (SRM + GMCM) logic tree.
A HazardCompositeBranch will have multiple sources and multiple ground motion models and is formed by taking all combinations of branches from the branch sets. The HazardComposite branch is an Iterable and will return HazardComponentBranch when iterated.
Source code in toshi_hazard_post/logic_tree.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
__init__(branches, source_weight)
¶
Initialize a new HazardCompositeBranch object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
branches
|
list[HazardComponentBranch]
|
The source-ground motion pairs that comprise the HazardCompositeBranch |
required |
source_weight
|
float
|
The weight of the source branch. |
required |
Source code in toshi_hazard_post/logic_tree.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
__iter__()
¶
Iterate over all HazardComponentBranches that make up the HazardCompositeBranch.
Source code in toshi_hazard_post/logic_tree.py
95 96 97 98 |
|
__next__()
¶
Get the next HazardComponentBranch.
Source code in toshi_hazard_post/logic_tree.py
100 101 102 103 104 105 106 |
|
HazardLogicTree
¶
The combined (SRM + GMCM) logic tree needed to define the complete hazard model.
Source code in toshi_hazard_post/logic_tree.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
|
branch_hash_table
property
¶
The simplest structure used to iterate though the realization hashes.
Each element of the list represents a composite branch as a list of hashes of the component branches that make up the composite branch.
Returns:
Name | Type | Description |
---|---|---|
hash_list |
list[list[str]]
|
the list of composite branches, each of wich is a list of component branch hashes. |
component_branches
property
¶
Get the component branches (each SRM branch with all possible GMCM branch matches).
Returns:
Name | Type | Description |
---|---|---|
component_branches |
list[HazardComponentBranch]
|
the component branches that make up the independent realizations of the logic tree |
composite_branches
property
¶
Get the composite branches combining the SRM branches with the appropraite GMCM branches.
The tectonic region types will be matched between SRM and GMCM branches.
Returns:
Name | Type | Description |
---|---|---|
composite_branches |
list[HazardCompositeBranch]
|
the composite branches that make up all full realizations of the complete hazard |
list[HazardCompositeBranch]
|
logic tree |
weights
property
¶
The weights for every enumerated branch (srm + gmcm) of the logic tree.
Returns:
Name | Type | Description |
---|---|---|
weights |
NDArray
|
one dimensional array of branch weights |
__init__(srm_logic_tree, gmcm_logic_tree)
¶
Initialize a new HazardLogicTree object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
srm_logic_tree
|
SourceLogicTree
|
The seismicity rate model logic tree. |
required |
gmcm_logic_tree
|
GMCMLogicTree
|
The ground motion characterisation model logic tree. |
required |
Source code in toshi_hazard_post/logic_tree.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|