Skip to content

Commit

Permalink
Use math instead of np in 'integration.ipynb'
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielKotik committed Nov 28, 2019
1 parent aeca3d5 commit e7453d2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Laguerre_Gauss_3d/integration_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@
"\n",
"\n",
"psi (cartesian): (0.6062810704686634-1.7444288209294596j)\n",
"CPU times: user 1min 14s, sys: 219 ms, total: 1min 14s\n",
"Wall time: 1min 15s\n",
"CPU times: user 1min 16s, sys: 60.1 ms, total: 1min 17s\n",
"Wall time: 1min 17s\n",
"psi (spherical): (0.6062810703699058-1.7444288201684213j)\n",
"CPU times: user 4.88 s, sys: 24 µs, total: 4.88 s\n",
"Wall time: 4.92 s\n"
"CPU times: user 4.96 s, sys: 4.01 ms, total: 4.96 s\n",
"Wall time: 4.98 s\n"
]
}
],
Expand Down Expand Up @@ -167,8 +167,8 @@
"y = 0.3\n",
"z = 0.5\n",
"\n",
"ϕ = np.arctan2(k_y/k1, -k_z/k1)\n",
"θ = np.arccos(k_x/k1)\n",
"ϕ = math.atan2(k_y/k1, -k_z/k1)\n",
"θ = math.acos(k_x/k1)\n",
"\n",
"print(\"Gauss spectrum (cartesian): \", f_Gauss_cartesian(W_y=w_0, k_y=k_y, k_z=k_z))\n",
"print(\"Gauss spectrum (spherical): \", f_Gauss_spherical(W_y=w_0, sin_theta=math.sin(θ)))\n",
Expand Down Expand Up @@ -204,8 +204,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 6min 40s, sys: 971 ms, total: 6min 41s\n",
"Wall time: 6min 47s\n"
"CPU times: user 690 ms, sys: 132 ms, total: 822 ms\n",
"Wall time: 1.93 s\n"
]
}
],
Expand Down

0 comments on commit e7453d2

Please sign in to comment.