solution participation
solution_participation
¶
Module providing the SolutionParticipation helper class.
Classes¶
SolutionParticipation(solution: InversionSolution)
¶
Calculate solution participation rates.
Calculates rupture participation rates at either section or fault levels, with the option
to make the rates Conditional Participation
by specifying a subset of the available ruptures.
Examples:
>>> sol = solvis.InversionSolution.from_archive(filename)
>>>
>>> rate = SolutionParticipation(sol)\
.fault_participation_rates(['Vernon 4', 'Alpine: Jacksons to Kaniere'])
>>>
Methods:
Name | Description |
---|---|
section_participation_rates |
get rates for fault sections. |
fault_participation_rates |
get rates for parent faults. |
named_fault_participation_rates |
get rates for named faults |
Instantiate a new instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
solution
|
InversionSolution
|
the subject solution instance. |
required |
Source code in solvis/solution/solution_participation.py
44 45 46 47 48 49 50 |
|
Functions¶
section_participation_rates(subsection_ids: Optional[Iterable[int]] = None, rupture_ids: Optional[Iterable[int]] = None) -> DataFrame[dataframe_models.SectionParticipationSchema]
¶
Calculate the 'participation rate' for fault subsections.
Participation rate for each section is the the sum of rupture rates for the ruptures involving that section.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
subsection_ids
|
Optional[Iterable[int]]
|
the list of subsection_ids to include. |
None
|
rupture_ids
|
Optional[Iterable[int]]
|
calculate participation using only these ruptures (aka |
None
|
Notes
- Passing a non empty
subsection_ids
does not affect the rates, only the subsections for which rates are returned. - Passing a non empty
rupture_ids
affects the rate calculation, as only the specified ruptures will be included in the sum. This is referred to as theconditional participation rate
which might be used when you are only interested in the rates of e.g. ruptures in a particular magnitude range.
Returns:
Type | Description |
---|---|
DataFrame[dataframe_models.SectionParticipationSchema]
|
pd.DataFrame: a participation rates dataframe |
Source code in solvis/solution/solution_participation.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 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 |
|
fault_participation_rates(parent_fault_ids: Optional[Iterable[int]] = None, rupture_ids: Optional[Iterable[int]] = None) -> DataFrame[dataframe_models.ParentFaultParticipationSchema]
¶
Calculate the 'participation rate' for parent faults.
Participation rate for each parent fault is the the sum of rupture rates for the ruptures involving that parent fault.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parent_fault_ids
|
Optional[Iterable[int]]
|
the list of parent_fault_ids to include. |
None
|
rupture_ids
|
Optional[Iterable[int]]
|
calculate participation using only these ruptures (aka Conditional Participation). |
None
|
Notes
- Passing
parent_fault_ids
does not affect the rate calculation, only the parent faults for which rates are returned. - Passing
rupture_ids
affects the rate calculation, as only the specified ruptures will be included in the sum. This is referred to as theconditional participation rate
which might be used when you are only interested in e.g. the rates of ruptures in a particular magnitude range.
Returns:
Type | Description |
---|---|
DataFrame[dataframe_models.ParentFaultParticipationSchema]
|
pd.DataFrame: a participation rates dataframe |
Source code in solvis/solution/solution_participation.py
100 101 102 103 104 105 106 107 108 109 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 |
|
named_fault_participation_rates(named_fault_names: Optional[Iterable[str]] = None, rupture_ids: Optional[Iterable[int]] = None) -> DataFrame[dataframe_models.NamedFaultParticipationSchema]
¶
Calculate the 'participation rate' for parent faults.
Participation rate for each named fault is the the sum of rupture rates for the ruptures involving that fault.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
named_fault_names
|
Optional[Iterable[str]]
|
the list of named_fault_names to include. |
None
|
rupture_ids
|
Optional[Iterable[int]]
|
calculate participation using only these ruptures (aka Conditional Participation). |
None
|
Notes
- Passing
named_fault_names
does not affect the rate calculation, only the faults for which rates are returned. - Passing
rupture_ids
affects the rate calculation, as only the specified ruptures will be included in the sum. This is referred to as theconditional participation rate
which might be used when you are only interested in e.g. the rates of ruptures in a particular magnitude range.
Returns:
Type | Description |
---|---|
DataFrame[dataframe_models.NamedFaultParticipationSchema]
|
pd.DataFrame: a participation rates dataframe |
Source code in solvis/solution/solution_participation.py
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 |
|