Commit 949644e3 authored by Tara Evaz Zadeh's avatar Tara Evaz Zadeh
Browse files

Fixed the bug appearing when there is only one cell for computation

parent 0568bafd
Pipeline #19016 passed with stage
in 1 minute and 48 seconds
......@@ -45,7 +45,7 @@ def get_exposure_per_tile(
full_ground_motion_field = losslib.get_full_GMF(
ground_motion_field, lons_whole_area, lats_whole_area, interpolation_method
cell_ids = np.loadtxt(cell_id_source_filepath, dtype="str", skiprows=1)
cell_ids = pd.read_csv(cell_id_source_filepath)
with open(result_filepath, "a+", newline="") as write_obj:
csv_writer = csv.writer(write_obj)
if exposure_type == "building":
......@@ -119,7 +119,7 @@ def get_exposure_per_tile(
for i in range(cell_ids.shape[0]):
cell_id = cell_ids[i]
cell_id = cell_ids.loc[i][0]
exposure_per_tile = exposure.loc[exposure[tile_id] == cell_id]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment