Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting the spatial distribution of light #36

Open
timk110 opened this issue Jun 10, 2024 · 2 comments
Open

Plotting the spatial distribution of light #36

timk110 opened this issue Jun 10, 2024 · 2 comments

Comments

@timk110
Copy link

timk110 commented Jun 10, 2024

I am currently working on simulating SHG of low pulse energy, tightly focused light. Due to the presence of group velocity mismatch and spatial walk off in the system, the generated SH should exhibit signficant pulse front tilt and a distorted SH beam profile. I am trying to use python to plot the spatial profile of the output of a simulation to characterise this (e.g. a heatmap of the electric field over the x-y axes). However I am having trouble deciphering the way the electric fields are stored in a python lightwaveExplorer object. Do you have any sample code that I could use to get started, or just some tips on the way the electric field is stored in the lightwaveExplorer object?

Any help would be greatly appreciated!

@NickKarpowicz
Copy link
Owner

NickKarpowicz commented Jun 10, 2024

Hi there!

I made a simple example of how to do this in an ipynb notebook, which I've attached here, along with the result.
The LWE result file is here: SHG_tilt_3D.zip

Here's how it looked at the end of the simulation. It's doing SHG of an 800 nm pulse in a BBO crystal, in 3D.
Screenshot_20240610_151928

The notebook I used to process it is here:
shg_tilt.zip

It produces these output images:

Slides through the electric field (x vs. time, y vs. time)
FieldDistributionSlices.pdf

False-color images of the beam that emerges in the far-field
FalseColorImages.pdf

Does this help?

edit: ignore the fact that I forgot to make a new x and y axis for the far-field image :)

@timk110
Copy link
Author

timk110 commented Jun 10, 2024

Thank you for the swift response! This is a lot more than I expected and perfect for what I need. I will have a play with this for my results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants