Skip to content

Commit e47348d

Browse files
fixed light source
1 parent 435589d commit e47348d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

experiments/four_f_optical_table.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Setting the path for XLuminA modules:
22
import os
33
import sys
4+
5+
# Setting the path for XLuminA modules:
46
current_path = os.path.abspath(os.path.join('..'))
5-
dir_path = os.path.dirname(current_path)
6-
module_path = os.path.join(dir_path)
7+
module_path = os.path.join(current_path)
8+
79
if module_path not in sys.path:
810
sys.path.append(module_path)
911

@@ -25,8 +27,12 @@
2527
x, y = space(x_total, sensor_lateral_size)
2628
shape = jnp.shape(x)[0]
2729

30+
# 2. Define the light source:
31+
w0 = (1200*um , 1200*um)
32+
input_light = LightSource(x, y, wavelength)
33+
input_light.gaussian_beam(w0=w0, E0=1)
2834

29-
# 2. Define the optical functions:
35+
# 3. Define the optical functions:
3036
def batch_dualSLM_4f(input_mask, x, y, wavelength, parameters):
3137
"""
3238
[4f system coded exclusively for batch optimization purposes].

0 commit comments

Comments
 (0)