madgui.online.orbit module

Contains functions to deduce initial particle coordinates from given measurements.

Classes

Readout(name, posx, posy)

Functions

add_offsets(readouts, offsets)

fit_particle_readouts(model, readouts[, to])

fit_particle_orbit(model, records, secmaps)

fit_initial_orbit(records[, rcond])

Compute initial beam position/momentum from multiple recorded monitor readouts + associated transfer maps.

class madgui.online.orbit.Readout(name, posx, posy)[source]

Bases: object

madgui.online.orbit.add_offsets(readouts, offsets)[source]
madgui.online.orbit.fit_initial_orbit(records, rcond=1e-06)[source]

Compute initial beam position/momentum from multiple recorded monitor readouts + associated transfer maps.

Call as follows:

>>> fit_initial_orbit([(T1, K1, Y1), (T2, K2, Y2), …])

where

T are the 4D/6D SECTORMAPs from start to the monitor. K are the 4D/6D KICKs of the map from the start to the monitor. Y are the 2D measurement vectors (x, y)

This function solves the linear system:

T1 X + K1 = Y1 T2 X + K2 = Y2 …

for the 4D phase space vector X = (x, px, y, py).

Returns: [x,px,y,py], chi_squared, underdetermined

madgui.online.orbit.fit_particle_orbit(model, records, secmaps, from_=None, to='#s')[source]
madgui.online.orbit.fit_particle_readouts(model, readouts, to='#s')[source]