ManzoniPlotlyArtist#
- class georges.vis.ManzoniPlotlyArtist(tracks_color: str = 'b', **kwargs)[source]#
Bases:
PlotlyArtist
A plotly implementation of a Plotly artist.
- Parameters:
ax (param) – the matplotlib ax used for plotting. If None it will be created with init_plot (kwargs are
forwarded). –
tracks_color – color for the plotting of tracks
kwargs – forwarded to ZgoubiPlot and to init_plot.
Methods Summary
compute_halo
(data, percentile)Return a dataframe containing the 1st, 5th, 95th and 99th percentiles of each dimensions.
filled_plot
(ax, x, y0, y, c[, fill])losses
([observer, log_scale])Plot the losses along the beamline :param observer: Observer used for the tracking :param log_scale: Log scale for transmission
phase_space
([observer, element, location, ...])tracking
([observer, plane, fill_between, ...])Plot the beam envelopes from tracking data.
twiss
([observer, with_beta, with_alpha, ...])Plot the Twiss function along the beamline
Methods Documentation
- static compute_halo(data, percentile)[source]#
Return a dataframe containing the 1st, 5th, 95th and 99th percentiles of each dimensions.
- losses(observer: LossesObserver | None = None, log_scale: bool = False, **kwargs)[source]#
Plot the losses along the beamline :param observer: Observer used for the tracking :param log_scale: Log scale for transmission
- phase_space(observer: BeamObserver | None = None, element: str | None = None, location: str = 'OUT', dim=None, nbins=None, draw_ellipse: bool = True)[source]#
- tracking(observer: Observer | None = None, plane: str = 'X', fill_between: bool = False, mean: bool = True, std: bool = False, halo: bool = True, **kwargs)[source]#
Plot the beam envelopes from tracking data.
- Parameters:
observer (_Observer, optional) – Observer used for the tracking. Defaults to None.
plane (str, optional) – Plane to draw. Defaults to “X”.
fill_between (bool, optional) – Fill the gap between the lines in transparency. Defaults to False.
mean (bool, optional) – Add the mean to the plot. Defaults to True.
std (bool, optional) – Add the std to the plot. Defaults to False.
halo (bool, optional) – Add a halo to the plot. Defaults to True.
- twiss(observer: TwissObserver | None = None, with_beta: bool = True, with_alpha: bool = False, with_dispersion: bool = False, tfs_data: DataFrame | Table | None = None, relativistic_beta: float = 1.0, **kwargs)[source]#
Plot the Twiss function along the beamline
- Parameters:
observer (_TwissObserver, optional) – TwissObserver. Defaults to None.
with_beta (bool, optional) – Add beta function to the plot. Defaults to True.
with_alpha (bool, optional) – Add the alpha function ot the plot. Defaults to False.
with_dispersion (bool, optional) – Add the dispersion to the plot. Defaults to False.
tfs_data (Union[_pd.DataFrame, cpymad.madx.Table], optional) – tfs file from MAD. Defaults to None.
relativistic_beta (float) – Relativistic beta value to scale the dispersion. Default to 1.