:mod:`ocelot.cpbd.response_matrix` ================================== .. py:module:: ocelot.cpbd.response_matrix Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ocelot.cpbd.response_matrix.MeasureResponseMatrix ocelot.cpbd.response_matrix.RingRM ocelot.cpbd.response_matrix.LinacOpticalRM ocelot.cpbd.response_matrix.LinacSimRM ocelot.cpbd.response_matrix.LinacRmatrixRM ocelot.cpbd.response_matrix.LinacDisperseSimRM ocelot.cpbd.response_matrix.LinacDisperseTmatrixRM ocelot.cpbd.response_matrix.ResponseMatrixJSON ocelot.cpbd.response_matrix.ResponseMatrix .. data:: logger .. py:class:: MeasureResponseMatrix(lattice, hcors, vcors, bpms) .. method:: calculate(self) .. method:: 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 :param lattice: class MagneticLattice :return: orbit.bpms .. method:: read_virtual_dispersion(self, E0) .. method:: 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) :param lattice: class MagneticLattice :return: .. py:class:: RingRM(lattice, hcors, vcors, bpms) Bases: :class:`ocelot.cpbd.response_matrix.MeasureResponseMatrix` .. method:: calculate(self, tw_init=None) calculation of ideal response matrix :param lattice: class MagneticLattice :param tw_init: if tw_init == None, function tries to find periodical solution :return: orbit.resp .. py:class:: LinacOpticalRM(lattice, hcors, vcors, bpms) Bases: :class:`ocelot.cpbd.response_matrix.MeasureResponseMatrix` .. method:: calculate(self, tw_init=None) calculation of ideal response matrix :param lattice: class MagneticLattice :param tw_init: if tw_init == None, function tries to find periodical solution :return: orbit.resp .. py:class:: LinacSimRM(lattice, hcors, vcors, bpms) Bases: :class:`ocelot.cpbd.response_matrix.MeasureResponseMatrix` .. method:: calculate(self, tw_init=None) calculation of ideal response matrix :param lattice: class MagneticLattice :param tw_init: if tw_init == None, function tries to find periodical solution :return: orbit.resp .. py:class:: LinacRmatrixRM(lattice, hcors, vcors, bpms) Bases: :class:`ocelot.cpbd.response_matrix.MeasureResponseMatrix` .. method:: calculate(self, tw_init=None) calculation of ideal response matrix :param lattice: class MagneticLattice :param tw_init: if tw_init == None, initial beam energy is ZERO :return: orbit.resp .. py:class:: LinacDisperseSimRM(lattice, hcors, vcors, bpms) Bases: :class:`ocelot.cpbd.response_matrix.MeasureResponseMatrix` .. method:: calculate(self, tw_init=None) calculation of ideal dispersive response matrix :param lattice: class MagneticLattice :param tw_init: if tw_init == None, function tries to find periodical solution :return: orbit.resp .. py:class:: LinacDisperseTmatrixRM(lattice, hcors, vcors, bpms) Bases: :class:`ocelot.cpbd.response_matrix.MeasureResponseMatrix` .. method:: calculate(self, tw_init=None) calculation of ideal response matrix :param lattice: class MagneticLattice :param tw_init: if tw_init == None, function tries to find periodical solution :return: orbit.resp .. py:class:: ResponseMatrixJSON(method=None) .. method:: calculate(self, tw_init=None) rewrites cor_name, bpm_name and matrix :param method: :return: .. method:: get_matrix(self) .. method:: extract(self, cor_list, bpm_list) .. method:: inject(self, cor_list, bpm_list, inj_matrix) Update some elements of the response matrix :param cor_list: :param bpm_list: :param inj_matrix: :return: .. method:: dump(self, filename) .. method:: load(self, filename) .. method:: compare(self, rmatrix, absolut=0.001, relative=0.1) .. method:: show(self, list_cor=None, list_bpm=None) .. py:class:: ResponseMatrix(method=None) .. method:: 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 .. method:: bpm2y_name(self, bpm_id) Transform bpm id to a name how it use in a control system to get vertical beam position :param bpm_id: :return: channel for Y position .. method:: xy_names2bpm_id(self, xy_names) transform BPM channels to bpm ids :param xy_names: :return: .. method:: calculate(self, tw_init=None) rewrites cor_name, bpm_name and matrix :param method: :return: .. method:: get_matrix(self) .. method:: extract_df_slice(self, cor_list, bpm_list) .. method:: extract(self, cor_list, bpm_list) .. method:: retrieve_from_scan(self, df_scan) .. method:: clean_rm(self, coupling=True) .. method:: inject(self, cor_list, bpm_list, inj_matrix) Update some elements of the response matrix :param cor_list: :param bpm_list: :param inj_matrix: :return: .. method:: data2df(self, matrix, bpm_names, cor_names) .. method:: df2data(self) .. method:: dump(self, filename) .. method:: load(self, filename) .. method:: compare(self, rmatrix, absolut=0.001, relative=0.1) .. method:: show(self, list_cor=None, list_bpm=None)