We present a numerical method which, given an analytical or numerical solution of the Helmholtz equation in a neighborhood of a fixed observation point determines the relevant geometrical optics quantities at this point: the number crossing rays, their directions and associated complex amplitudes. We discuss applications to hybrid solvers in CEM and show some numerical results.