Question: (20 points) Use the python code that I provided for this question 1. In the code, I have commented everything that I have done in

 (20 points) Use the python code that I provided for thisquestion 1. In the code, I have commented everything that I have

(20 points) Use the python code that I provided for this question 1. In the code, I have commented everything that I have done in case you want to see how it works. Not only does this code calculate the fields for you and plot them, but it also walks you through how to do this on your own for future reference. If you want to know any syntax for Python, googling it will probably give you the answer (there are tonnes of forums on stackexchange that can answer questions). A comment on solutions for Phys3210: when I say that something is to be plotted, I mean that I want to see the plot as done in Python (or some other plotting program). If I say "sketch" then you can do it by hand to show some kind of trend, but you should still label the relevant parts (axes, title, etc). Run the code for the following waves: A wave of 1 frequency component in time. Plot its cycle-averaged intensity in time. Plot its spectrum. A wave of 2 frequency components in time. Plot their cycle-averaged intensity in time. Plot their spectrum. A wave of 3 frequency components in time. Plot their cycle-averaged intensity in time. Plot this spectrum. In the following case, you'll need to make a single change to the code. On line 147 , change Nw=3 to 11 . Do this to plot a wave of 11 frequency components in time. Plot the cycle-averaged intensity in time. Plot the spectrum. The questions that I want answered here are: (a) What is happening, as you add more frequency components, to the maximum (the peak) field strength? (b) What is happening to the maximum intensity? The phase of the wave =t. You are plotting the fields/intensities as functions of t and . Now, still with 11 frequency components, change the initial phase from all being the same to random. You can do this in the code by commenting out line 148 with a \#, that is, change PhiN =0 to #PhiN=0, and uncommenting out line 149 , that is PhiN =2np pi*np.random.rand ((NW) ) and see how the peak field (or intensity) changes 2. (c) What is the difference in the spectrum when the phase is 0 or the phase is random? Think of what this means when you see a rainbow: the water (or diamond, or prism etc) separates the different frequency components so that you can see what their 1 My preferred compiler is Anaconda, and I like using the Spyder editor, both of which can be found at: tps://www.anaconda.com/download/ 2 Python package np.random has a rand function, generating random number from [0,1). Multiply this 2 to go over the full range of . amplitudes are but never their phases. This phase retrieval problem has been the subject of much research, especially since the advent of pulsed lasers. (d) What is the peak intensity now? This is the difference between coherent light (phases all well-known, like a laser) versus incoherent light (phases are random, like a lightbulb)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!