-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathold_test_pyfocus.py
More file actions
50 lines (37 loc) · 855 Bytes
/
old_test_pyfocus.py
File metadata and controls
50 lines (37 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 20 09:45:35 2021
@author: Fernando Caprile
"""
from PyFocus import sim
from PyFocus.src.plot import plot
import numpy as np
from matplotlib import pyplot as plt
NA=1.4
n=1.5
h=3
w0=5
wavelength=640
I0=1
gamma=0
beta=0
z=0
x_steps=2
z_steps=5
x_range=800
z_range=1500
figure_name='Example'
L=''
R=''
ds=''
z_int=''
parameters=np.array((NA, n, h, w0, wavelength, gamma, beta, z, x_steps, z_steps, x_range, z_range, I0, L, R, ds, z_int, figure_name), dtype=object)
divisions_theta=30
divisions_phi=30
entrance_field=lambda rho,phi,w0,f,k:1
custom_mask=lambda rho,phi,w0,f,k:1
fields=sim.custom(entrance_field,custom_mask,False,False,*parameters,divisions_theta,divisions_phi)
fields2=np.copy(fields)
# Ez=fields2[-1]
plt.close('all')
fig1,fig2=plot.plot_XZ_XY(*fields2,x_range,z_range,figure_name)