Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes for v1.0.4 #22

Merged
merged 9 commits into from
Aug 28, 2023
148 changes: 114 additions & 34 deletions examples/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"\n",
"Jake Nunemaker\n",
"\n",
"Last Updated: 01/03/2023 (gbarter)"
"Last Updated: 08/27/2023 (gbarter)"
]
},
{
Expand Down Expand Up @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -53,7 +53,7 @@
}
],
"source": [
"output_dir = \"/Users/gbarter/devel/pCrunch/tests/io/data\"\n",
"output_dir = \"/Users/gbarter/devel/pCrunch/pCrunch/test/io/data\"\n",
"results_dir = os.path.join(output_dir, \"results\")\n",
"save_results = True\n",
"\n",
Expand All @@ -74,18 +74,18 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[<pCrunch.io.openfast.OpenFASTBinary at 0x1071db250>,\n",
" <pCrunch.io.openfast.OpenFASTBinary at 0x1071db130>,\n",
" <pCrunch.io.openfast.OpenFASTBinary at 0x1071db6d0>]"
"[<pCrunch.io.openfast.OpenFASTBinary at 0x1294c2fe0>,\n",
" <pCrunch.io.openfast.OpenFASTBinary at 0x129706260>,\n",
" <pCrunch.io.openfast.OpenFASTBinary at 0x1297070a0>]"
]
},
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -100,7 +100,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -153,7 +153,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -191,7 +191,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -204,8 +204,10 @@
" trim_data=(0,), # If 'trim_data' is passed, all input files will\n",
") # be trimmed to (tmin, tmax(optional))\n",
"\n",
"la.process_outputs(cores=4) # Once LoadsAnalysis is configured, process outputs with\n",
" # `process_outputs`. `cores` is optional but will trigger parallel processing if configured"
"la.process_outputs(cores=4, # Once LoadsAnalysis is configured, process outputs with\n",
" return_damage=True, # optional return of Palmgren-Miner damange and\n",
" goodman=True) # optional use of goodman correction for mean load values\n",
" # Note `cores` is optional but will trigger parallel processing if configured"
]
},
{
Expand All @@ -217,7 +219,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -450,7 +452,7 @@
"[5 rows x 1799 columns]"
]
},
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -462,7 +464,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -566,7 +568,7 @@
"AOC_WSt.outb NaN NaN NaN "
]
},
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -578,7 +580,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand All @@ -592,7 +594,7 @@
"Name: (RootMc1, min), dtype: float64"
]
},
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -603,7 +605,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand All @@ -623,7 +625,7 @@
"Name: DLC2.3_3.out, Length: 1799, dtype: float64"
]
},
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -635,7 +637,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -708,7 +710,7 @@
"AOC_WSt.outb 0.003558 0.003558 0.003558"
]
},
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -720,7 +722,92 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>RootMc1</th>\n",
" <th>RootMc2</th>\n",
" <th>RootMc3</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Test1.outb</th>\n",
" <td>2.610118e-42</td>\n",
" <td>3.230998e-42</td>\n",
" <td>2.143750e-42</td>\n",
" </tr>\n",
" <tr>\n",
" <th>step_0.outb</th>\n",
" <td>5.184544e-35</td>\n",
" <td>1.633931e-37</td>\n",
" <td>2.555698e-34</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Test2.outb</th>\n",
" <td>1.438786e-41</td>\n",
" <td>1.714979e-41</td>\n",
" <td>1.890789e-41</td>\n",
" </tr>\n",
" <tr>\n",
" <th>DLC2.3_3.out</th>\n",
" <td>4.790238e-42</td>\n",
" <td>4.007654e-42</td>\n",
" <td>2.539284e-46</td>\n",
" </tr>\n",
" <tr>\n",
" <th>AOC_WSt.outb</th>\n",
" <td>4.244367e-104</td>\n",
" <td>4.244367e-104</td>\n",
" <td>4.244367e-104</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" RootMc1 RootMc2 RootMc3\n",
"Test1.outb 2.610118e-42 3.230998e-42 2.143750e-42\n",
"step_0.outb 5.184544e-35 1.633931e-37 2.555698e-34\n",
"Test2.outb 1.438786e-41 1.714979e-41 1.890789e-41\n",
"DLC2.3_3.out 4.790238e-42 4.007654e-42 2.539284e-46\n",
"AOC_WSt.outb 4.244367e-104 4.244367e-104 4.244367e-104"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Palmgren-Miner damage can be viewed with:\n",
"la.damage"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -916,7 +1003,7 @@
" 'RootMc3': nan}]}"
]
},
"execution_count": 12,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -925,18 +1012,11 @@
"# Extreme events:\n",
"la.extreme_events"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -950,7 +1030,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.11"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Loading