Skip to content

Commit

Permalink
Added webplotdigitzer example. Fixed tabs in fluid dynamics lecture?
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanHehnen committed May 3, 2024
1 parent 94ea63e commit b9eee46
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 12 deletions.
2 changes: 1 addition & 1 deletion book/content/examples/01_basic/01_basic_example_i.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion book/content/examples/01_basic/02_basic_example_ii.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion book/content/examples/01_basic/03_basic_example_iii.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
29 changes: 27 additions & 2 deletions book/content/examples/01_basic/04_basic_example_iv.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,32 @@
"\n",
"## Setup Description\n",
"\n",
"We give an introduction to the [WebPlotDigitizer](https://automeris.io/WebPlotDigitizer/). This tool enables the user to extract data points from plots that are images. For example, when reading old scientific articles the document might only be able as a scan. One might also not be able to contact the author anymore or even if it is possible the data might be lost. \n",
"We give an introduction to the [WebPlotDigitizer](https://automeris.io/WebPlotDigitizer/). This tool enables the user to extract data points from plots that are images. For example, when reading old scientific articles the document might only be available as a scan. One might also not be able to contact the author anymore or even if it is possible the data might be lost.\n",
"\n",
"Let's assume we would like to investigate purely buoyant diffusion flames, where many experiments have been conducted in the past. For example, Bernard J. McCaffrey published results from [experiments](https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nbsir79-1910.pdf) in 1979 with the National Bureau of Standards. Part of this investigation was to determine the gas velocity in the flame region. This information is provided in figure 8 in the report linked above.\n",
"\n",
"## Task\n",
"\n",
"The task is to extract the data points from figure 8, save them as a CSV (comma separated value) file and reproduce the figure as plot in Python, or another plotting software of your choice. \n",
"\n",
"- Download the PDF from the link above. \n",
"- Take a screen capture from figure 8. \n",
"- Navigate to the webplotdigitizer webpage.\n",
"\n",
"On the webplotdigitizer webpage, start the online version. The image can be uploaded either from the right hand side using the \"Load image\" button, or at the top left \"File\" and \"Load Image\" or by drag-and-drop. \n",
"\n",
"Afterwards, a menu appears to where you provide basic information about the plot to be investigated. In our case it is a simple 2D (x/y) plot. \n",
"\n",
"One the plot type is identified, the axis need to be aligned. Clicking the \"Align\" button, a new window appears that gives a brief description about the alignment process. Clicking on \"Proceed\", you we are presented with our uploaded image. Now, we have to introduce four points to identify the x- and y-axis. They are simply introduced by clicking on the image, in the order: x1, x2, y1 and y2. It makes sense to click on the axis ticks such that the two x-points are as far apart as possible on a known location, same for the y-points. After the four points are positioned, you can click on them and use the arrow keys to finely adjust their location. There is a zoomed-in view in the top right. Below this vies there are also coordinates displayed that can be used to help with the alignment process.Once you are satisfied, click the \"Complete!\"button on the right hand side.\n",
"\n",
"In the next menu, the values for the point locations are to be entered. For the x-points the values from the respective x-ticks and the y-points the values from the respective y-ticks. If the axis would be logarithmically scaled, one can identify this by checking the \"Log Scale\" box for the appropriate axis. This would be the case for figure 1 or figure 2 from the same report, for example.\n",
"\n",
"Look at the right hand side, \"Add Point\" should be selected. Now, new points can be positioned by clicking into the image. Once you have loced a couple of points, you can click on \"Adjust Points\" and move them around with the arrow keys as before. Activating the \"Delete Point\" functionality points can be deleted by clicking on them. \n",
"\n",
"Once satisfied, you can click on the left hand side on \"View Data\". Often it makes sense to sort the points by x. You can then either copy the numbers to the clipboard or download the CSV directly.\n",
"\n",
"If you want to extract lines instead of points, you can use the automatic extraction on the right hand side (where we had the \"Add Point\" selected before in the manual selection). A color needs to be selected, for the program to look for. Then you can draw lines on the image. When clicking on \"Run\" at the bottom right, points will automatically be placed with distance of delta x/y.\n",
"\n",
"\n",
"Example McCaffrey figure 1 or figure 2 (or both). Iso-lines of figure 10?"
]
Expand Down Expand Up @@ -65,7 +90,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
14 changes: 7 additions & 7 deletions book/content/modelling/02_fluids/02_cfd.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6938,27 +6938,27 @@
"\n",
"````{tab-set}\n",
"```{tab-item} f(x)\n",
"<img src=\"./figs/taylor_fnk.svg\" width=\"90%\">\n",
"<img src=\"./figs/taylor_fnk.svg\" width=\"90%\" />\n",
"```\n",
"\n",
"```{tab-item} n=0\n",
"<img src=\"./figs/taylor_ts0.svg\" width=\"90%\">\n",
"<img src=\"./figs/taylor_ts0.svg\" width=\"90%\" />\n",
"```\n",
"\n",
"```{tab-item} n=1\n",
"<img src=\"./figs/taylor_ts1.svg\" width=\"90%\">\n",
"<img src=\"./figs/taylor_ts1.svg\" width=\"90%\" />\n",
"```\n",
"\n",
"```{tab-item} n=2\n",
"<img src=\"./figs/taylor_ts2.svg\" width=\"90%\">\n",
"<img src=\"./figs/taylor_ts2.svg\" width=\"90%\" />\n",
"```\n",
"\n",
"```{tab-item} n=3\n",
"<img src=\"./figs/taylor_ts3.svg\" width=\"90%\">\n",
"<img src=\"./figs/taylor_ts3.svg\" width=\"90%\" />\n",
"```\n",
"\n",
"```{tab-item} n in [0,...,3]\n",
"<img src=\"./figs/taylor_all.svg\" width=\"90%\">\n",
"<img src=\"./figs/taylor_all.svg\" width=\"90%\" />\n",
"```\n",
"````"
]
Expand Down Expand Up @@ -18362,7 +18362,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down

0 comments on commit b9eee46

Please sign in to comment.