How to set source wavelength at specific points using script

script

#1

Hi,
Can someone comment on how to set source wavelength at a few specific points using script commands?
I defined Lambda_start and Lambda_stop and used this commands to set source wavelength.

set("wavelength start",Lambda_start);
set("wavelength stop",Lambda_stop);

But within this range, I want only specific points, let’s say Lambda_start = 400 nm and Lambda_stop = 700 nm and I want wavelength points as Lambda = [400, 450, 500, 532, 550, 600, 632, 650, 700]

The one way seems to edit the global monitor settings as below, but still, it doesn’t solve the issue.
set(‘override global monitor settings’,true);
set(‘use linear wavelength spacing’, true);
set(‘frequency points’,5);


#2

Hi @visvas

You can run single frequency simulations by setting the wavelength start and stop of the source to the wavelength of interest.

Alternatively, since the wavelength is not linearly spaced, you can run a broadband simulations and have two monitors: one using linear spacing from 400-700 and 7 frequency points, and the other one recording at 532 and 632 as is shown below:

image

You could also use a higher frequency number of points and then extract the results at the wavelength of interest as a post processing step.

hope this helps.


#3

Does this mean that monitors will includes those 07 points of wavelength and additional two points as well ? Or I need to perform two separate simulation ?


#4

Dear @visvas

Only one simulation is enough. You can use only one monitor with a higher number of frequency points to capture the light at different wavelengths.

Another approach is to run the simulations once, but have two monitors: one using linear spacing from 400-700 and 7 frequency points, and the other one recording at 532 and 632.

Hope this was helpful.


#5

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.