query_parameters
query_parameters
¶
This module contains end user functions for querying the TS table
parameters_by_location_id(location_id: str) -> pdt.DataFrame
¶
retrieves all TS parameters associated with a given location id
Parameters:
Name | Type | Description | Default |
---|---|---|---|
location_id
|
str
|
label for a TS location (e.g., Wellington or -47.3~167.8) |
required |
Returns:
Name | Type | Description |
---|---|---|
df |
pdt.DataFrame
|
dataframe with the TS parameters by APoE (rows) and (Site Class, parameter) (multi-index columns) |
Source code in nzssdt_2023/end_user_functions/query_parameters.py
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 107 108 109 110 111 112 113 114 115 116 117 118 |
|
retrieve_md_parameters(location_id: str, apoe_n: int, site_class: str) -> Tuple[float, float | str]
¶
retrieves the M and D parameters for a single line of the TS table
Parameters:
Name | Type | Description | Default |
---|---|---|---|
location_id
|
str
|
label for a TS location (e.g., 'Wellington' or '-47.3~167.8') |
required |
apoe_n
|
int
|
shorthand for APoE (1/n) (this is commonly known as a return period) |
required |
site_class
|
str
|
TS site class label (e.g., 'IV') |
required |
Returns:
Name | Type | Description |
---|---|---|
m |
float
|
earthquake magnitude |
d |
float | str
|
distance to nearest fault |
Source code in nzssdt_2023/end_user_functions/query_parameters.py
50 51 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 |
|
retrieve_sa_parameters(location_id: str, apoe_n: int, site_class: str) -> Tuple[float, float, float, float]
¶
retrieves the spectral acceleration parameters for a single line of the TS table
Parameters:
Name | Type | Description | Default |
---|---|---|---|
location_id
|
str
|
label for a TS location (e.g., 'Wellington' or '-47.3~167.8') |
required |
apoe_n
|
int
|
shorthand for APoE (1/n) (this is commonly known as a return period) |
required |
site_class
|
str
|
TS site class label (e.g., 'IV') |
required |
Returns:
Name | Type | Description |
---|---|---|
pga |
float
|
peak ground acceleration |
sas |
float
|
short-period acceleration |
tc |
float
|
spectral-acceleration-plateau corner period |
td |
float
|
spectral-velocity-plateau corner period |
Source code in nzssdt_2023/end_user_functions/query_parameters.py
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 |
|