Imaging and Spectral Data Analysis in Python
We present a set of jupyter notebooks and presentations that go over the basics of:
- Image and spectral data analysis in Python
- USID, pyUSID, and pycroscopy as tools for analyzing large and multidimensional imaging / spectroscopy datasets
This material was developed as part of the 2018 CNMS User Meeting
See our list of tutorials for more information
Getting started
(Recommended) Working on your personal computer
- (one time only) Install necessary software:
- Follow these instructions to install Anaconda + pycroscopy on your own laptop
- Also please install pyUSID via:
pip install pyUSIDjust like how you installed pycroscopy
- (one time only) Download the contents of this tutorial onto your computer:
- click on the green
Clone or downloadbutton - Click on
Download ZIP - Download the zip file to your Documents / Downloads / Desktop
- Unzip the zip file
- click on the green
- Start up a Jupyter Notebook:
- Start a terminal:
- Windows users: Click on
Start>>Anaconda3>>Anaconda Prompt - Mac / Linux users: Open
Terminal. You can find it by holding down yourCommandandSpacekey and typingTerminalin the search bar that pops up.
- Windows users: Click on
- In the
TerminalorAnaconda Prompt, typejupyter notebookand press theEnterorReturnkey. If everything happened correctly, a new tab should pop up on your default browser showing familiar folders such asDesktop,Documents, etc. - Do not close the Terminal or Anaconda Prompt!
- Start a terminal:
- Finally, work on the notebooks in this tutorial:
- Navigate to the folder (e.g. -
Desktop) where you unzipped the zip file in step 2. - Click on the
index.ipynbfile which should present a new tab on your browser that looks like this
- Navigate to the folder (e.g. -
- Once you are done working on the jupyter notebooks:
- Go back to the
TerminalorAnaconda Prompt. Hold down theCtrl(control) key and press theCkey twice to shut down the Jupyter server. - You can now close the Jupyter browser tabs and the
TerminalorAnaconda Prompt
- Go back to the
We understand that this may seem a little tedious in the beginning but we assure you that you will get used to this very quickly
Trying out the tutorial online
If you are having trouble with installing Anaconda on your personal computer (above), please try one of the following:
-
Azure notebooks
- You will need to sign up for a Microsoft (Outlook, Hotmail, ...) account if you don't already have one.
- Once you are logged in, click here
- Next, click on the
Clonebutton (just above the search bar) to make your own copy of the project - Once your copy of the project has been created, click on the
Runbutton along the same line as theClonebutton - You should be directed to a familiar Jupyter notebook server page.
-
Binder
- The benefit of Binder is that one does not need a Microsoft account, but the drawback is that your solutions / edits will be lost if you close the browser tab(s)
- Click here to launch the jupyter notebook server. This will take a while so please be patient.
Finally, for either option, click here to get started with the notebooks
Getting help
Please get in touch with us on our Google group