qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec.simulate.ScatteringRate. plot_angular_distribution  (  x=None ,  n=5 ,  theta=None ,  phi=None ,  mode=None ,  show=True ,  save=None  )[source]

Plot the angular distribution of the fluorescence light for a given laser frequency, see ScatteringRate.generate_y.

Parameters:
xscalar | None

The frequency of light in the atom's rest frame (MHz). If None, the position of the first resonance is taken.

nint

2**n + 1 samples for theta and 2**(n + 1) + 1 samples for phi are drawn.

thetaarray_like | None

A custom array for $\theta$. Overwrites n.

phiarray_like | None

A custom array for $\phi$. Overwrites n.

modestr | None

Either "3d" for a surface plot or anything else for a color-mesh plot.

showbool

Whether to show the plot.

savestr | None

The path where to save the plot. If None, the plot will not be saved.

Returns:
(theta, phi, y)tuple[ndarray, ndarray, ndarray]

The angles and the fluorescence intensities.