xboa
|
Data following a single pass of the closed orbit finder. More...
Inherits object.
Public Member Functions | |
def | __init__ |
Initialisation. More... | |
def | calculate_ellipse |
Calculate the beam ellipse and noise list based on points. More... | |
def | get_mean_noise |
Return the mean of the noise list. More... | |
def | get_sigma_noise |
Return the standard deviation of the noise list. More... | |
def | plot_ellipse |
Plot the beam ellipse for a set of points. More... | |
def | json_repr |
Represent the iteration as a json object. More... | |
Public Attributes | |
keys | |
points | |
eps_max | |
centre | |
ellipse | |
noise | |
Data following a single pass of the closed orbit finder.
Handle a single iteration of the CO finder. Few utility functions to find the ellipse, look for convergence and return outputs to the user.
Definition at line 196 of file _ellipse_closed_orbit_finder.py.
def __init__ | ( | self, | |
keys, | |||
points, | |||
eps_max, | |||
calculate_ellipse = False |
|||
) |
Initialisation.
Requires numpy
Definition at line 210 of file _ellipse_closed_orbit_finder.py.
def calculate_ellipse | ( | self | ) |
Calculate the beam ellipse and noise list based on points.
Raises a ValueError if noise cannot be calculated.
Definition at line 227 of file _ellipse_closed_orbit_finder.py.
References EllipseClosedOrbitFinderIteration.centre, EllipseClosedOrbitFinderIteration.ellipse, EllipseClosedOrbitFinder.eps_max, EllipseClosedOrbitFinderIteration.eps_max, EllipseClosedOrbitFinderIteration.noise, and EllipseClosedOrbitFinderIteration.points.
Referenced by EllipseClosedOrbitFinderIteration.get_mean_noise(), and EllipseClosedOrbitFinderIteration.get_sigma_noise().
def get_mean_noise | ( | self | ) |
Return the mean of the noise list.
If noise is None, will attempt to calculate noise by calling calculate_ellipse. Raises a ValueError if noise cannot be calculated.
Definition at line 252 of file _ellipse_closed_orbit_finder.py.
References EllipseClosedOrbitFinderIteration.calculate_ellipse(), and EllipseClosedOrbitFinderIteration.noise.
Referenced by EllipseClosedOrbitFinderIteration.get_sigma_noise(), and EllipseClosedOrbitFinderIteration.plot_ellipse().
def get_sigma_noise | ( | self | ) |
Return the standard deviation of the noise list.
If noise is None, will attempt to calculate noise by calling calculate_ellipse. Raises a ValueError if noise cannot be calculated.
Definition at line 269 of file _ellipse_closed_orbit_finder.py.
References EllipseClosedOrbitFinderIteration.calculate_ellipse(), EllipseClosedOrbitFinderIteration.get_mean_noise(), EllipseClosedOrbitFinderIteration.noise, and EllipseClosedOrbitFinderIteration.plot_ellipse().
def plot_ellipse | ( | self, | |
x_axis_string, | |||
y_axis_string, | |||
x_axis_units, | |||
y_axis_units, | |||
marker_style = 4 , |
|||
title_string = 'fit' , |
|||
canvas = None |
|||
) |
Plot the beam ellipse for a set of points.
Return value is a tuple of (canvas, histogram, ellipse, graph) where canvas is an object of type ROOT.TCanvas, histogram is an object of type ROOT.TH2D, ellipse is an object of type ROOT.TF2 and graph is an object of type ROOT.TGraph
Definition at line 298 of file _ellipse_closed_orbit_finder.py.
References EllipseClosedOrbitFinderIteration.centre, EllipseClosedOrbitFinderIteration.ellipse, EllipseClosedOrbitFinderIteration.get_mean_noise(), and EllipseClosedOrbitFinderIteration.points.
Referenced by EllipseClosedOrbitFinderIteration.get_sigma_noise().
def json_repr | ( | self | ) |
Represent the iteration as a json object.
(To get the noise, etc call init against this data)
Definition at line 340 of file _ellipse_closed_orbit_finder.py.
References EllipseClosedOrbitFinder.eps_max, EllipseClosedOrbitFinderIteration.eps_max, EllipseClosedOrbitFinderIteration.keys, and EllipseClosedOrbitFinderIteration.points.
keys |
Definition at line 212 of file _ellipse_closed_orbit_finder.py.
Referenced by EllipseClosedOrbitFinderIteration.json_repr().
points |
Definition at line 213 of file _ellipse_closed_orbit_finder.py.
Referenced by EllipseClosedOrbitFinderIteration.calculate_ellipse(), EllipseClosedOrbitFinderIteration.json_repr(), and EllipseClosedOrbitFinderIteration.plot_ellipse().
eps_max |
Definition at line 214 of file _ellipse_closed_orbit_finder.py.
Referenced by EllipseClosedOrbitFinderIteration.calculate_ellipse(), and EllipseClosedOrbitFinderIteration.json_repr().
centre |
Definition at line 215 of file _ellipse_closed_orbit_finder.py.
Referenced by EllipseClosedOrbitFinderIteration.calculate_ellipse(), and EllipseClosedOrbitFinderIteration.plot_ellipse().
ellipse |
Definition at line 216 of file _ellipse_closed_orbit_finder.py.
Referenced by EllipseClosedOrbitFinderIteration.calculate_ellipse(), and EllipseClosedOrbitFinderIteration.plot_ellipse().
noise |
Definition at line 217 of file _ellipse_closed_orbit_finder.py.
Referenced by EllipseClosedOrbitFinderIteration.calculate_ellipse(), EllipseClosedOrbitFinderIteration.get_mean_noise(), and EllipseClosedOrbitFinderIteration.get_sigma_noise().