Plotting

touscheklib.plotting.plot_survey(madx, kmin=None, kmax=None, figsize=(12, 12), s=3, aspect=True)

Plot survey of machine elements utilizing MAD-X survey command.

Parameters
  • kmin (int, optional) – Start index of the survey elements to be plotted.

  • kmax (int, optional) – End index of the survey elements to be plotted.

  • figsize (tuple, optional) – The size of the figure.

  • s (int, optional) – Dotsize of label points.

  • aspect (bool, optional) – If True, create plot having the same aspect ratio in both directions.

touscheklib.plotting.plot_touschek_losses(optics, touschek_results, xlim='auto', ylim='auto', with_beta=False, figsize=(16, 4))

Plot the losses due to Touschek-scattering along the machine.

Parameters
  • optics – An instance of optics class.

  • touschek_results (dict) – The output of touschek.lifetime.

  • xlim (list or str, optional) – Either a tuple [x0, x1] to display the results only from x0 to x1 or str == ‘auto’, in which we display the results according to the underlying symmetry used.

  • with_beta (bool, optional) – If True, also show 1/(betax*betay) as indication of the locations with largest losses.

  • figsize (tuple, optional) – The size of the figure.