This repository is made for the course Waves and Optics, department of physics and technology, UiT - the arctic university of Norway.
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)
- Check python installation
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.
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
- install jupyter
For each chapter, a separate jupyter notebook is made. They are being updated in an ongoing manner.
If changes are made here, you can directly update your copy of this repository by following these steps:
- Open the terminal window
- Navigate to the project folder
- Type
git pull