Accelerating the ELT wavefront simulations

Context: to prepare the commissioning of the ELT, the Wavefront Control Team performs simulations of the optical propagation in the telescope and its metrologies. This involves ray tracing (geometric optics) and fourier propagation (diffractive regime). In both cases, the simulations address a large dynamic of frequencies, spatial (from a few cm to 40 m the diameter of the telescope) as well as temporal (from milliseconds to tens of seconds) resulting in intensive computational load and memory use.

Our need is to study the existing code base (approx. 30000 lines of code in 130 files) and suggest and implement performance modifications to accelerate the simulations, with a goal of a factor 10 decrease in execution time. This should be carried out in a maintainable manner, keeping the source code accessible for modifications by the Wavefront team members, who are not professional Software Engineers.

We propose two problems:

  • The simulation of the propagation in a pyramid Wavefront Sensor. The algorithm is quite simple, consisting in series of Fourier transforms to be repeated typically 20 times on the same input. This is repeated identically at each control cycle.
  • The simulation of the propagation of rays in the telescope. Millions of rays are generated at the input and hit sequentially the mirrors until they reach the focal plane of the telescope. The mirrors are modelled with a few properties (position, surface shape, …) which may evolve between iterations. The optics of the telescope contain segmented mirrors, which makes the optical path in part non deterministic (we do not know in advance which segments the rays will hit).

In both problems, the simulator is written in Python, and executing on a Linux platform. The task of the intern will be to analyze the code, identify and implement optimization opportunities. The work will be supervised by a Wavefront engineer for contextualization and by a Software engineer for technical guidance.

The work can be carried out partially remotely, accessing a virtualized environment in the ESO premises. The virtualized environment is not the current runtime platform for the simulators (which run on physical machines) however should provide a suitable workbench for this task.

Ideally, the internship should start in September 2023 for a duration of 5 or 6 months.

Supervisor: H. Bonnet