-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated plotEllipse simulation #91
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats on the first PR @camFoltz! See the comments below.
simulations/plotting.py
Outdated
plt.ylim(-1, 1) | ||
|
||
|
||
def plotEllipse2(S1, S2, S3, S4, size=5, axes=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- the Stokes parameters are named S0, S1, S2, S3 (https://en.wikipedia.org/wiki/Stokes_parameters). * it is better to give plotEllipse2 a more descriptive name, e.g., plotEllipseStokes.
def plotEllipse2(S1, S2, S3, S4, size=5, axes=None): | |
def plotEllipseStokes(S0, S1, S2, S3, size=5, axes=None): |
- Notebook sets S0 to integer and the other three Stokes parameters to float. They are all float. The maximum value of S1, S2, S3 can at most be S0, since S0 represents total intensity of light.
simulations/plotting.py
Outdated
arrowprops=dict(arrowstyle="->", color=color), | ||
size=size) | ||
|
||
Stokes = np.array([S1,S2,S3,S4]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stokes = np.array([S1,S2,S3,S4]) | |
Stokes = np.array([S0,S1,S2,S3]) |
Added second ellipse plotting function in plotting.py that takes in parameters of the stokes parameters. Fixed issue with interaction simulation in test_plotEllipse.ipynb and renamed to plotEllipse.ipynb