When a cavity is defined and with one or two objects of the class Mirror, it is possible to define an etalon effect in the input or end mirrors. For that we should add 2 ingredients: One example of such code is give in the OSCAR repository: Example_Mirror_as_input.m But how to choose the right number […]

# Tag: How-to

Some tips how to use OSCAR

While in OSCAR, the function Add_Astigmatism() can add an extra sagitta distortion with a Zernike polynomial over a certain diameter, it is not always practical. Sometimes, it is simpler to define a surface with two perpendicular radii of curvature R_x and R_Y. The solution described here was given to me by Jean-Yves Vinet (a big […]

The method is very similar to the transverse shift of a laser beam on the grid presented in this post. In this case, we will rather shift the aperture which is defined by the variable I.mask inside one instance I of the class Interface. Example:

In this post, we will see a comparison of the same calculation running on the CPU and GPU. The time taken by the simulations depends of course on your CPU and GPU, so the numbers presented here are not absolute. First example, calculation of the steady state high finesse cavity. Grid size Calculation time on […]

FFT simulations could take times. The first idea to speed up would be to buy a new and powerful computer and hoping that Moore’s law will continue forever. The second idea would be to decrease the accuracy, a number which determines when we estimate that we have converged to the steady state field. It could […]

Yes, it is now possible thanks to Matlab Online. First, you would need a Mathworks account, you may have one if you already have a Matlab license. Then go to the OSCAR Gitlab page and at the bottom of the readme file, you will find a button named Open in MATLAB Online: It should open […]

To scan the cavity and display quickly the circulating power, there are 2 dedicated functions optimised for speed and convenience:C1 = Cavity_Scan(C1);Display_Scan(C1); However one may want to also record the reflected power. One way to do that would be to scan the cavity manually setting a different round trip phase for each iteration. Concretely, once […]

The first way in OSCAR would be to use the function Add_Astigmatism(), it will add to the surface (object of class Interface) a Zernike polynomial of order 2,0 whose amplitude is given as a parameter. That is not always practical, as astigmatism is usually given as difference of radii of curvature. For large Radii of […]

By default, in the simulation, the beam is always defined at the center of the grid. After the definition of a beam, it is possible to shift it by simply offsetting the whole complex field. The offset will be an integer number of pixels to avoid any interpolation. Example: Be sure to have a large […]

Intrinsically in FFT code, the Gouy phase is automatically calculated. For design purpose, we would like to calculate the accumulated Gouy phase as the beam propagates. The function attached calculates the Gouy phase of a TEM00 beam for a propagation length defined by the user. The principle behind it is to calculate the phase of […]