ocelot.cpbd.response_matrix

Module Contents

Classes

MeasureResponseMatrix

RingRM

LinacOpticalRM

LinacSimRM

LinacRmatrixRM

LinacDisperseSimRM

LinacDisperseTmatrixRM

ResponseMatrixJSON

ResponseMatrix

ocelot.cpbd.response_matrix.logger
class ocelot.cpbd.response_matrix.MeasureResponseMatrix(lattice, hcors, vcors, bpms)
calculate(self)
read_virtual_orbit(self, p_init=None, write2bpms=True)

searching closed orbit by function closed_orbit(lattice) and searching coordinates of beam at the bpm positions

Parameters

lattice – class MagneticLattice

Returns

orbit.bpms

read_virtual_dispersion(self, E0)
optical_func_params(self, tw_init=None)

Optical function parameters for correctors and bpms. It is needed for calculation of ideal response matrix: defining beta functions on the azimuth of correctors and bpms: beta_x, beta_y; defining phase shift between origin of lattice and element: mu_x, mu_y; defining tunes of beta functions of whole lattice: nu_x, nu_y = mu(totalLen)/(2*pi)

Parameters

lattice – class MagneticLattice

Returns

class ocelot.cpbd.response_matrix.RingRM(lattice, hcors, vcors, bpms)

Bases: ocelot.cpbd.response_matrix.MeasureResponseMatrix

calculate(self, tw_init=None)

calculation of ideal response matrix

Parameters
  • lattice – class MagneticLattice

  • tw_init – if tw_init == None, function tries to find periodical solution

Returns

orbit.resp

class ocelot.cpbd.response_matrix.LinacOpticalRM(lattice, hcors, vcors, bpms)

Bases: ocelot.cpbd.response_matrix.MeasureResponseMatrix

calculate(self, tw_init=None)

calculation of ideal response matrix

Parameters
  • lattice – class MagneticLattice

  • tw_init – if tw_init == None, function tries to find periodical solution

Returns

orbit.resp

class ocelot.cpbd.response_matrix.LinacSimRM(lattice, hcors, vcors, bpms)

Bases: ocelot.cpbd.response_matrix.MeasureResponseMatrix

calculate(self, tw_init=None)

calculation of ideal response matrix

Parameters
  • lattice – class MagneticLattice

  • tw_init – if tw_init == None, function tries to find periodical solution

Returns

orbit.resp

class ocelot.cpbd.response_matrix.LinacRmatrixRM(lattice, hcors, vcors, bpms)

Bases: ocelot.cpbd.response_matrix.MeasureResponseMatrix

calculate(self, tw_init=None)

calculation of ideal response matrix

Parameters
  • lattice – class MagneticLattice

  • tw_init – if tw_init == None, initial beam energy is ZERO

Returns

orbit.resp

class ocelot.cpbd.response_matrix.LinacDisperseSimRM(lattice, hcors, vcors, bpms)

Bases: ocelot.cpbd.response_matrix.MeasureResponseMatrix

calculate(self, tw_init=None)

calculation of ideal dispersive response matrix

Parameters
  • lattice – class MagneticLattice

  • tw_init – if tw_init == None, function tries to find periodical solution

Returns

orbit.resp

class ocelot.cpbd.response_matrix.LinacDisperseTmatrixRM(lattice, hcors, vcors, bpms)

Bases: ocelot.cpbd.response_matrix.MeasureResponseMatrix

calculate(self, tw_init=None)

calculation of ideal response matrix

Parameters
  • lattice – class MagneticLattice

  • tw_init – if tw_init == None, function tries to find periodical solution

Returns

orbit.resp

class ocelot.cpbd.response_matrix.ResponseMatrixJSON(method=None)
calculate(self, tw_init=None)

rewrites cor_name, bpm_name and matrix

Parameters

method

Returns

get_matrix(self)
extract(self, cor_list, bpm_list)
inject(self, cor_list, bpm_list, inj_matrix)

Update some elements of the response matrix

Parameters
  • cor_list

  • bpm_list

  • inj_matrix

Returns

dump(self, filename)
load(self, filename)
compare(self, rmatrix, absolut=0.001, relative=0.1)
show(self, list_cor=None, list_bpm=None)
class ocelot.cpbd.response_matrix.ResponseMatrix(method=None)
bpm2x_name(self, bpm_id)

Transform bpm id to a name how it use in a control system to get horizontal beam position :param bpm_id: :return: channel for X position

bpm2y_name(self, bpm_id)

Transform bpm id to a name how it use in a control system to get vertical beam position

Parameters

bpm_id

Returns

channel for Y position

xy_names2bpm_id(self, xy_names)

transform BPM channels to bpm ids

Parameters

xy_names

Returns

calculate(self, tw_init=None)

rewrites cor_name, bpm_name and matrix

Parameters

method

Returns

get_matrix(self)
extract_df_slice(self, cor_list, bpm_list)
extract(self, cor_list, bpm_list)
retrieve_from_scan(self, df_scan)
clean_rm(self, coupling=True)
inject(self, cor_list, bpm_list, inj_matrix)

Update some elements of the response matrix

Parameters
  • cor_list

  • bpm_list

  • inj_matrix

Returns

data2df(self, matrix, bpm_names, cor_names)
df2data(self)
dump(self, filename)
load(self, filename)
compare(self, rmatrix, absolut=0.001, relative=0.1)
show(self, list_cor=None, list_bpm=None)