I know that the profile monitors perform Discrete Fourier Transforms (DFT) to calculate the electromagnetic fields as a function of angular frequency,In this section,the frequency monitors calculate this Fourier transform integral up to the time when the simulation stops.when I specify only one frequency in the monitor ,how long the monitor caculate this time domain by DFT.In fact,I want to monitor calculated over the last period of the simulation at the frequency specified,and not the complete time window.
Expecting your help!
How can I get mode source poynting vector?
As you mentioned, the Fourier transform to get frequency-domain results is calculated up to the time when the simulation stops. This is independent of the number of frequency points in the monitor settings. The number of frequency points you choose actually does not change anything in the time evolution of the fields in the simulation; the only change is in the number of frequencies that will be collected when calculating the Fourier transform.
If I understood correctly, you also mentioned that you would like to use a period of time different from the full simulation time to calculate the frequency-domain results. For this you could use apodization as explained here. You can change the apodization in the monitor settings, “Spectral averaging and apodization” tab.
Hi @fgomez ,sorry for forgetting to attach the picture last post
At the same time,I have another question about the specturm from the profile monitor,so I would like to ask it at this post.
As the picture shown(I have set the frequency point to 1000),what is meaning of the value of the vertical axis .I also have found that one frequency point strength vary with the x and y axis ,but the picture have no response to such information.
@fgomez Thank you fou help!
As you have said, I would like to use a period of time instead of the full simulation time to calculate the frequency-domain results since the DFT can calculate one period of time to get the over frequency domain roughly.When I study the apodization you provided，I find it maybe work .
But I have some problems about window of apodization.For example,I want to only calculate the last period of the simulation as the picture shown.Do I have to choose the end apodization? Do the apodization center is[ (end-A)/2]+A,and the apodization width is (end-A)/2?
Expecting your help！
Regarding your question
The frequency-domain monitors calculate the discrete Fourier transform E(ω) of the time-domain data. The units of the DFT depend on the normalization state used as explained in detail here. Usually, we work in the CW normalization state where E(ω) has units of V/m. Note that the values of E(ω) depend on the amplitude of the source
as explained in the “Source amplitude” section here.
The second part of the question was not clear to me. Are you comparing E vs f plots for different x, y positions in the monitor? Maybe you can attach a snapshot that illustrates the problem.
In this case I would use start apodization with center time at A. Start apodization means that the apodization window starts at the center time and extends until the end of the simulation. The apodization width depends on how fast you want to make the transition to the apodization window. Typically, you don’t want to make this transition too fast because it might introduce artifacts in the frequency-domain data, such as ripples. Apodization is an advanced feature and it is important to use it carefully; this KB page offers some useful details and links to examples.
Hope this helps.
@fgomez Thank you for your reply!
I have not described the problem clearly .So I will attach one spectrum from the monitor by script,as below
and then i can plot the same spectrum with power monitor,except for the value of the vertical axis ，as below
the frist spectrum by script
and then I will attach the spectrum by the monitor
As you see,there is no difference between the two spectrum except for the value of the vertical axis.So i want to know how to calculate the spectrum by the monitor.
Expecting your reply!
Sorry for the long wait. When you get different plots from the raw data and the results of a DFT monitor, this is probably because of the normalization state.
The raw data is what you access when you use the script function getdata, as you did in your example script lines. The results are what you get when you simply visualize the E field from the monitor (right-click on monitor > Visualize > E) or when you use the getresult script function.
When the “no Normalization” state is used both the raw data and the result for the field should agree because no normalization is applied to the data. If CW normalization is enabled then the results will be different because they are affected by the normalization. In most cases, it makes sense to use CW normalization, but it really depends on what you are interested in. This KB page explains the meaning of the CW normalized results.
I have made some test simulation about the apodization width to konw how it works,so I set different apodization width and get the different spectrum as below.
As you see,these spectrum are different from each other and I don’t know which setting would be much more avaliable .
For another question,whether the apodization width will be involved in the DFT calculation?
Expecting for your help!
Sorry for the wait. To determine the right apodization width and center I think we need to look at the time signal as well. For example, if you have an initial strong time signal from the source that you want to block and another signal from a resonance at a later time that you want to include, we need to choose the apodization center and width accordingly. If you share your simulation, I can take a look at it and get a better idea of what you want to capture with the apodization.
The apodization will affect the results of the DFT since it modifies the time signal that is Fourier-transformed.
Hi @fgomez Thank you for your reply!
sorry!It is difficult for me to share my simulation for getting the best solution.
However,I will attach the time signal for you. The time signal as below,I want to make an DFT in the time signal of electric field from 100000 fs to 200000 fs .How can I use apodization for it?
For a window between two time values you can use the full apodization instead. You can set the center to the mid-point between the two times, 1.5e5 fs, and set the width to the difference, 1e5fs. Again, I would suggest testing the effect of increasing the apodization width.
From the time signal it seems like you are exiting a high-Q resonance. We have an analysis group that is useful in this case. You might find this KB page useful.
Hope this helps!
Hi @fgomez Thanks for your help!
The apodization width always trouble me.Is the full apodization window from center-width/2 to center+width/2?If it is,why the start apodization window is from apodization center to the end of simulation,instead of from center-width/2 to the end of center?