|
46 | 46 | },
|
47 | 47 | {
|
48 | 48 | "cell_type": "code",
|
49 |
| - "execution_count": 1, |
| 49 | + "execution_count": null, |
50 | 50 | "id": "3aa0f9f2-68c4-4201-b9ef-5d90031e4477",
|
51 | 51 | "metadata": {},
|
52 |
| - "outputs": [ |
53 |
| - { |
54 |
| - "ename": "ModuleNotFoundError", |
55 |
| - "evalue": "No module named 'openquake.vmtk'", |
56 |
| - "output_type": "error", |
57 |
| - "traceback": [ |
58 |
| - "\u001b[31m---------------------------------------------------------------------------\u001b[39m", |
59 |
| - "\u001b[31mModuleNotFoundError\u001b[39m Traceback (most recent call last)", |
60 |
| - "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[1]\u001b[39m\u001b[32m, line 8\u001b[39m\n\u001b[32m 5\u001b[39m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mmatplotlib\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mpyplot\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mas\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mplt\u001b[39;00m\n\u001b[32m 7\u001b[39m \u001b[38;5;66;03m# Import the IMCalculator class\u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m8\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mopenquake\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mvmtk\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mim_calculator\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m IMCalculator \n\u001b[32m 9\u001b[39m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34;01mopenquake\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mvmtk\u001b[39;00m\u001b[34;01m.\u001b[39;00m\u001b[34;01mutilities\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m sorted_alphanumeric, export_to_pkl\n", |
61 |
| - "\u001b[31mModuleNotFoundError\u001b[39m: No module named 'openquake.vmtk'" |
62 |
| - ] |
63 |
| - } |
64 |
| - ], |
| 52 | + "outputs": [], |
65 | 53 | "source": [
|
66 | 54 | "import os\n",
|
67 | 55 | "import sys\n",
|
|
162 | 150 | "for i in range(len(gmrs)):\n",
|
163 | 151 | " \n",
|
164 | 152 | " ### Load the acceleration time-histories and the time-step files\n",
|
165 |
| - " current_acc = pd.read_csv(os.path.join(gm_directory,'acc',f'acc_{i}.csv'), header=None).to_numpy()\n", |
166 |
| - " current_dts = pd.read_csv(os.path.join(gm_directory,'dts',f'dts_{i}.csv'), header=None).to_numpy()\n", |
| 153 | + " current_acc = pd.read_csv(os.path.join(gm_directory,'acc',f'acc_{i}.csv'), header=None).to_numpy().flatten()\n", |
| 154 | + " current_dts = pd.read_csv(os.path.join(gm_directory,'dts',f'dts_{i}.csv'), header=None).to_numpy().flatten()\n", |
167 | 155 | " \n",
|
168 | 156 | " ### Define the time-step of the acceleration time-history\n",
|
169 | 157 | " dt_gm = (current_dts[1] - current_dts[0]).item() # Subtract any consecutive rows of the time-step file\n",
|
|
0 commit comments