Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 2.78 KB

README.md

File metadata and controls

44 lines (36 loc) · 2.78 KB

Waves and Optics - code base

This repository is made for the course Waves and Optics, department of physics and technology, UiT - the arctic university of Norway.

For Beginners

In case you don't remember how to setup Python and git:

  • Install Anaconda https://www.anaconda.com/
  • Install git https://git-scm.com/downloads
  • To check whether git and Python are recognized, open the Anaconda prompt and execute:
    • Check python installation python --version
    • check git command in acanconda prompt git --version
    • (you should see versions as results)

Now follow these steps in your command prompt/terminal:

  • Make a new environment conda create --name PROJECT_NAME
  • Activate the environment conda activate PROJECT_NAME
  • Make a new folder and give it a name.
  • Go back to the terminal and change the directory to the new folder by typing cd PATH_TO_THE_NEW_FOLDER
  • Make sure that the last name of the path shown in the terminal is the new folder's name.
  • Now download the repository by typing git clone https://github.com/farhadnkm/WAVES_AND_OPTICS.git
  • Then install the requirements pip install -r requirements.txt
  • Eventually, execute the code python test.py

This must run without any errors. You should see some printed statements in the terminal and figures popping up. You can read more details about test.py here.

Note: Having VScode or an IDE on your machine is recommended

VScode has an internal interpretor for jupyter. If VScode or any sort of IDE is not available:

  • To install VScode: https://code.visualstudio.com/download
  • Working without VScode
    • install jupyter conda install jupyter
    • Change directory to the project folder cd .../SOME_ROOT_DIRECTORY/FOLDER_NAME/WAVES_AND_OPTICS
    • in command prompt run jupyter notebook

Following the Sessions

For each chapter, a separate jupyter notebook is made. They are being updated in an ongoing manner.

Syncing your local copy

If changes are made here, you can directly update your copy of this repository by following these steps:

  1. Open the terminal window
  2. Navigate to the project folder
  3. Type git pull