Introduction to Image Handling with Python
All of the scripts in the course are written as Jupyter Notebooks. These are easy to read, and allow text comments in between coding windows, which is ideal for teaching purposes. The workbooks can be run either online via google colab, or they can be downloaded and run on your local pc.
Using Google Colab
The workbooks are linked to google colab, and you can therefore access and run the code yourself, by clicking the colab symbol at the top of each workbook (some browsers require ctrl click or shift click). This will redirect you to the google colab environment, where you have to log in with a valid google account. The colab environment has an active kernel so you can alter and execute the workbooks, which gives a better feel for the role of each line of code and an excellent hands on experience. You can always reset the code, by reloading it from the LiveNano website, or save your own version of an altered workbook to your google account.
As the kernel is online, it does not require a local version of python, but some of the packages used in the scripts, has to be installed each time the code is reopened in colab. This is accounted for with the top few lines of code in the workbooks.
However, google colab lacks some of the capabilities of a local python installation, and some features are therefore not available. These include the interactive plots in hyperspy, which are particularly useful. To enable these functionalities, install python and the necessary packages on your local drive, by following the guide below and download the workbooks from links provided above each of the workbooks.
Using a local Python installation
The workbooks can also be downloaded to your local drive, using the links above each of the workbooks. This requires a local python installation on your own machine. We recommend the anaconda distribution, which is available for download here: https://www.anaconda.com/products/individual-b. The download options can be foudn by scrolling to the bottom of the anaconda package.
Some of the scripts will require python libraries or packages, which are not included in the basic python installation e.g. openCV and HyperSpy. These packages can be installed by writing the following commands in the anaconda prompt (available once the anaconda distribution has been installed).