Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Autolens_rms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"fnum = 4.0 # F-number\n",
"flange = 18.0 # Flange distance in mm\n",
"thickness = 120.0 # Maximum thickness in mm\n",
"lens_type = [[\"Spheric\", \"Spheric\"], [\"Spheric\", \"Spheric\"], [\"Spheric\", \"Spheric\", \"Spheric\"], [\"Aperture\"], [\"Spheric\", \"Spheric\", \"Spheric\"], [\"Spheric\", \"Aspheric\"], [\"Spheric\", \"Aspheric\"]]\n",
"surf_list = [[\"Spheric\", \"Spheric\"], [\"Spheric\", \"Spheric\"], [\"Spheric\", \"Spheric\", \"Spheric\"], [\"Aperture\"], [\"Spheric\", \"Spheric\", \"Spheric\"], [\"Spheric\", \"Aspheric\"], [\"Spheric\", \"Aspheric\"]]\n",
"\n",
"# Create a lens from scratch\n",
"lens = create_lens(\n",
Expand All @@ -135,7 +135,7 @@
" fnum=fnum,\n",
" flange=flange,\n",
" thickness=thickness,\n",
" lens_type=lens_type,\n",
" surf_list=surf_list,\n",
" save_dir=result_dir,\n",
")\n",
"\n",
Expand Down Expand Up @@ -941,7 +941,7 @@
" )\n",
" rays_backup.append(ray)\n",
"\n",
" center_ref = -lens.psf_center(points=ray.o[:, :, 0, :], method=\"pinhole\")\n",
" center_ref = -lens.psf_center(ray.o[:, :, 0, :], method=\"pinhole\")\n",
" center_ref = center_ref.unsqueeze(-2).repeat(1, 1, spp, 1)\n",
"\n",
" # Optimize lens by minimizing RMS\n",
Expand All @@ -953,7 +953,7 @@
"\n",
" # Ray error and valid mask\n",
" ray_xy = ray.o[..., :2]\n",
" ray_valid = ray.valid\n",
" ray_valid = ray.is_valid\n",
" ray_err = ray_xy - center_ref\n",
"\n",
" # Weight mask (non-differentiable)\n",
Expand Down