Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions modules/performSIMULATION/capacitySpectrum/CapacityModels.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,42 +291,42 @@ class HAZUS_cao_peterson_2006(capacity_model_base):
def __init__(self, general_info, dD=0.001): # noqa: N803
# HAZUS capacity data: Table 5-7 to Table 5-10 in HAZUS 5.1
self.capacity_data = dict() # noqa: C408
self.capacity_data['SC'] = pd.read_csv(
self.capacity_data['Severe-Code'] = pd.read_csv(
os.path.join( # noqa: PTH118
os.path.dirname(__file__), # noqa: PTH118, PTH120, RUF100
'SC_capacity_data.csv',
),
index_col=0,
).to_dict(orient='index')
self.capacity_data['VC'] = pd.read_csv(
self.capacity_data['Very High-Code'] = pd.read_csv(
os.path.join( # noqa: PTH118
os.path.dirname(__file__), # noqa: PTH118, PTH120, RUF100
'VC_capacity_data.csv',
),
index_col=0,
).to_dict(orient='index')
self.capacity_data['HC'] = pd.read_csv(
self.capacity_data['High-Code'] = pd.read_csv(
os.path.join( # noqa: PTH118
os.path.dirname(__file__), # noqa: PTH118, PTH120, RUF100
'HC_capacity_data.csv',
),
index_col=0,
).to_dict(orient='index')
self.capacity_data['MC'] = pd.read_csv(
self.capacity_data['Moderate-Code'] = pd.read_csv(
os.path.join( # noqa: PTH118
os.path.dirname(__file__), # noqa: PTH118, PTH120, RUF100
'MC_capacity_data.csv',
),
index_col=0,
).to_dict(orient='index')
self.capacity_data['LC'] = pd.read_csv(
self.capacity_data['Low-Code'] = pd.read_csv(
os.path.join( # noqa: PTH118
os.path.dirname(__file__), # noqa: PTH118, PTH120, RUF100
'LC_capacity_data.csv',
),
index_col=0,
).to_dict(orient='index')
self.capacity_data['PC'] = pd.read_csv(
self.capacity_data['Pre-Code'] = pd.read_csv(
os.path.join( # noqa: PTH118
os.path.dirname(__file__), # noqa: PTH118, PTH120, RUF100
'PC_capacity_data.csv',
Expand Down
14 changes: 7 additions & 7 deletions modules/performSIMULATION/capacitySpectrum/DampingModels.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ def __init__(self):
header=None,
)
self.kappa_col_map = {
'SC': {'S': 1, 'M': 2, 'L': 3},
'VC': {'S': 1, 'M': 2, 'L': 3},
'HC': {'S': 1, 'M': 2, 'L': 3},
'MC': {'S': 4, 'M': 5, 'L': 6},
'LC': {'S': 7, 'M': 8, 'L': 9},
'PC': {'S': 10, 'M': 11, 'L': 12},
'Severe-Code': {'S': 1, 'M': 2, 'L': 3},
'Very High-Code': {'S': 1, 'M': 2, 'L': 3},
'High-Code': {'S': 1, 'M': 2, 'L': 3},
'Moderate-Code': {'S': 4, 'M': 5, 'L': 6},
'Low-Code': {'S': 7, 'M': 8, 'L': 9},
'Pre-Code': {'S': 10, 'M': 11, 'L': 12},
}

def get_beta_elastic(self, HAZUS_bldg_type): # noqa: N803
Expand Down Expand Up @@ -255,7 +255,7 @@ def get_beta(self, Dp, Ap): # noqa: N803
)
except: # noqa: E722
sys.exit(
f'The base model {self.base_model} does not have a useful'
f'The base model {self.base_model} does not have a useful '
'get_kappa method.'
)
if Dp <= 0 or Ap <= 0:
Expand Down
Loading