Low brightness in beam visualization. #2248
-
Never posted a question on github before, please forgive any question upload mistakes. As seen in the image above, I'm having trouble visualizing beam propagation in a prism. The source is a GaussianBeamSource. The beam is not bright enough to see. I assume the issue is that normalization and spread of the beam, but I need to see how this beam propagates to create structures in its path. I thought about manipulating the amplitude but don't know how to modify that in this specific source type, or if it would be normalized back to the same state of brightness/visibility. Another guess is that the short wavelength (473nm) combined with the large sim size (50x50um) is leading to low visibility. Thanks in advance if anyone can offer help or advice. Hope this group is still active. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Relevant code snippets: basic simulation parametersresolution = 50 # pixels/um fcen = 1/0.473 # pulse center frequency sources = [mp.GaussianBeamSource( plt.figure() |
Beta Was this translation helpful? Give feedback.
-
The problem is that you are using an More generally, you can also try creating an animation of the time-dependent field propagation. There are a couple of ways to do this:
|
Beta Was this translation helpful? Give feedback.
The problem is that you are using an
mp.Hz
source in a 2D simulation but plotting themp.Ez
fields which is zero by orthogonality. This is why your figure contains no fields. In your call toplot2D
, replacefields.mp.Ez
withfields=mp.Hz
.More generally, you can also try creating an animation of the time-dependent field propagation. There are a couple of ways to do this:
mp.Hz
is the scalar field in the 2D simulation) to disk as an HDF5 file usingmp.output_hfield_z
at every Δt time units. Then, in post processing from the shell terminal, convert the HDF5 files to PNG via$ h5topng -vZc bluered -C epsilon.h5 hz-000*.h5
whereepsil…