- Install Miniconda or Anaconda here
- Open the Anaconda Prompt and run
where conda
to find the path to conda (ex.C:\Users\USERNAME\Miniconda3\Scripts\conda.exe
) - Add to PATH
- Edit environmental variables
- Put as first in the list to prevent potential conflicts
- Open up Command Prompt and run the following:
conda init cmd.exe
conda config --add channels conda-forge
conda config --set ssl_verify no
conda upgrade conda
- if you already have python installed, run
conda create -n s4 python
. otherwise, runconda create -n s4 python=3.7
conda activate s4
conda install -c paulgoulain s4
### this no longer worksconda install -c marcus-o s4
- Test the installation by running:
python
import S4 as S4
(capitalization matters)- if nothing happens it was installed right
- Ctrl + Z to exit
- Install necessary python packages by running
pip install numpy matplotlib scipy tqdm
- Install Miniconda or Anaconda here
- Open up Terminal and run the following:
conda config --add channels conda-forge
conda upgrade conda
- if you already have python installed, run
conda create -n s4 python
. otherwise, runconda create -n s4 python=3.7
conda activate s4
conda install -c paulgoulain s4
#### this is no longer workingconda install -c marcus-o s4
#### use this package
- Test the installation by running:
python
import S4 as S4
(capitalization matters)- if nothing happens it was installed right
- ^Z to exit
- Install necessary python packages by running
pip3 install numpy matplotlib scipy tqdm
- start by verifying that you are in the s4 environment (run
conda activate s4
) - run the program by typing
python main.py
(Windows) orpython3 main.py
(MacOS) - input requested information
- if any information is incorrect, terminate the program and start over (Ctrl + C or ^C)
- all data files will be saved to the specified data directory
- data directory will be in the phase-shift directory
- selected parameters will be saved in
R_selected_parameters.txt
orT_selected_parameters.txt
in the data directory (R for reflection, T for transmission)- for reference, raw data will be in a separate folder inside the directory too (to reduce clutter)
- simulation time for set intervals will be saved in
time_logs.txt
in the logs directory (for reference) - at the end of the program, the graphs of selected parameter values will be generated using matplotlib
- each set of parameters will produce a separate graph
- use Ctrl + W or Cmd + W to close current graph
- next graph will automatically pop up once previous graph is closed
- archived: sample simulation files
- lua_simu14: sample lua simulation files
- python_simu14: sample python simulation files
- logs: miscellaneous log files
- time_logs.txt: records time taken for simulation (only most recent info is saved)
- compare.py: simple python script that compares 2 txt files
- data: contains data files generated from simulation code (directory name is customizable)
- Ereflected = EZ0 - Eincident
- Phase Shift: atan2(ratioI, ratioR)
- ratioI = (reference/reflected).imag (imaginary component)
- ratioR = (reference/reflected).real (real component)
- frequency = 1000/wavelength
- np.linspace was used instead of something like np.arange to prevent some float precision errors
- add input details
- progress bar
- add alternate method: run from command line and use sys.argv
- more detailed installation guide