Skip to content

Commit

Permalink
update EELS notebooks for google colab
Browse files Browse the repository at this point in the history
  • Loading branch information
gduscher committed Nov 30, 2023
1 parent 2f53fd5 commit 6853369
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion notebooks/EELS/Analyse_Low_Loss-SI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"# pyTEMlib setup ------------------\n",
"if test_package('pyTEMlib') < '0.2023.6.6':\n",
" print('installing pyTEMlib')\n",
" !{sys.executable} -m pip install --upgrade sidpy\n",
" !{sys.executable} -m pip install git+https://github.com/pycroscopy/sidpy.git@main -q\n",
" !{sys.executable} -m pip install --upgrade git+https://github.com/pycroscopy/SciFiReaders.git@main -q\n",
" !{sys.executable} -m pip install --upgrade git+https://github.com/pycroscopy/pyTEMlib.git@main -q --upgrade\n",
" \n",
Expand Down Expand Up @@ -218,6 +218,13 @@
"%load_ext autoreload\n",
"%autoreload 2\n",
"\n",
"\n",
"if 'google.colab' in sys.modules:\n",
" from google.colab import output\n",
" output.enable_custom_widget_manager()\n",
" from google.colab import drive\n",
"\n",
"\n",
"# additional package \n",
"import ipywidgets as ipyw\n",
"from scipy.optimize import leastsq ## fitting routine of scipy\n",
Expand Down
10 changes: 8 additions & 2 deletions notebooks/EELS/Analysis_Core_Loss.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@
"\n",
"\n",
"# pyTEMlib setup ------------------\n",
"if test_package('pyTEMlib') < '0.2023.8.1':\n",
"if test_package('pyTEMlib') < '0.2023.11.1':\n",
" print('installing pyTEMlib')\n",
" !{sys.executable} -m pip install git+https://github.com/pycroscopy/sidpy\n",
" !{sys.executable} -m pip install git+https://github.com/pycroscopy/sidpy.git@main -q\n",
" !{sys.executable} -m pip install git+https://github.com/pycroscopy/SciFiReaders.git@main -q\n",
" !{sys.executable} -m pip install git+https://github.com/pycroscopy/pyTEMlib.git@main -q --upgrade\n",
" \n",
Expand Down Expand Up @@ -229,6 +229,12 @@
"\n",
"import sys\n",
"sys.path.insert(0, '../..')\n",
"\n",
"if 'google.colab' in sys.modules:\n",
" from google.colab import output\n",
" output.enable_custom_widget_manager()\n",
" from google.colab import drive\n",
"\n",
"import pyTEMlib\n",
"import pyTEMlib.file_tools as ft # File input/ output library\n",
"import pyTEMlib.image_tools as it\n",
Expand Down

0 comments on commit 6853369

Please sign in to comment.