plateform
stringclasses
1 value
repo_name
stringlengths
13
113
name
stringlengths
3
74
ext
stringclasses
1 value
path
stringlengths
12
229
size
int64
23
843k
source_encoding
stringclasses
9 values
md5
stringlengths
32
32
text
stringlengths
23
843k
github
robertcastle/dtslam-master
test_disp.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/Factorize/Test/test_disp.m
6,016
utf_8
457e71942dd7611721712b8b00e42ac2
function test_disp %TEST_DISP test the display method of the factorize object % % Example % test_disp % % See also factorize, test_all. % Copyright 2011-2012, Timothy A. Davis, http://www.suitesparse.com reset_rand ; tol = 1e-10 ; err = 0 ; %-------------------------------------------------------------------------...
github
robertcastle/dtslam-master
test_svd.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/Factorize/Test/test_svd.m
6,212
utf_8
6302c745225348ed8b5a230f4441477b
function err = test_svd (A) %TEST_SVD test factorize(A,'svd') and factorize(A,'cod') for a given matrix % % Example % err = test_svd (A) ; % % See also test_all % Copyright 2011-2012, Timothy A. Davis, http://www.suitesparse.com fprintf ('.') ; if (nargin < 1) % has rank 3 A = magic (4) ; end [m, n] = si...
github
robertcastle/dtslam-master
test_accuracy.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/Factorize/Test/test_accuracy.m
2,952
utf_8
5d41ae00bdefd11f286352bff8500c20
function err = test_accuracy %TEST_ACCURACY test the accuracy of the factorize object % % Example % err = test_accuracy % % See also test_all, test_factorize. % Copyright 2011-2012, Timothy A. Davis, http://www.suitesparse.com fprintf ('\nTesting accuracy:\n') ; reset_rand ; A = [ 0.1482 0.3952 0.1783 1.1...
github
robertcastle/dtslam-master
shellgui.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/shellgui/shellgui.m
11,635
utf_8
1b16a617abce89c6b0f0edf90831fafd
function varargout = shellgui(varargin) %SHELLGUI GUI interface for seashell function % Timothy A. Davis, Chapman Hall / CRC Press, 7th edition. % Controls the parameters a, b, c, n, azimuth, and elevation, using % sliders. To the whole range of each parameter, click on the button to % the right of each slider...
github
robertcastle/dtslam-master
spok_test.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/spok/spok_test.m
2,050
utf_8
e481f5b5280c567be98f4e245c3a5f87
function spok_test %SPOK_TEST installs and tests SPOK % % Example: % spok_install % % See also sparse, spok, spok_install % Copyright 2008-2011, Timothy A. Davis, http://www.suitesparse.com % compile and install spok help spok ; spok_install ; c = pwd ; cd private ; % mex spok_invalid.c ; is64 = ~isempty (strfind ...
github
robertcastle/dtslam-master
waitex.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/waitmex/waitex.m
1,047
utf_8
65beaefa68f21bc993f23673d3d2c040
function result = waitex %WAITEX same as the waitexample mexFunction, just in M instead of C. % The only purpose of this function is to serve as a precise description of % what the waitexample mexFunction does. % % Example: % waitex % draw a waitbar, make progress, and then close the waitbar % h = waitex ;...
github
robertcastle/dtslam-master
spqr_rank_stats.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/spqr_rank/spqr_rank_stats.m
33,128
utf_8
548109abdb301991b7a827b8ca13eb0e
function spqr_rank_stats (stats, print_opts) %SPQR_RANK_STATS prints the statistics from spqr_rank functions % % For a detailed description of the meaning of the basic statistic for % spqr_basic, spqr_null, spqr_pinv or spqr_cod, just type % 'spqr_rank_stats' with no inputs. Type spqr_rank_stats('ssi') or % spqr_rank_...
github
robertcastle/dtslam-master
demo_spqr_rank.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/spqr_rank/demo_spqr_rank.m
51,341
utf_8
081d27fdd8b2c6e4d628f0bec45c311c
function [nfailures SJid_failures] = demo_spqr_rank (ids,args) %DEMO_SPQR_RANK lengthy demo for spqr_rank functions (requires SJget) % Usage: demo_spqr_rank(ids,args) % % This is a demonstration program for the routines spqr_basic, spqr_null, % spqr_pinv, spqr_cod discussed in the paper "Algorithm xxx: Reliable % Calcu...
github
robertcastle/dtslam-master
meshnd_example.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/MESHND/meshnd_example.m
2,401
utf_8
25a8393c5bdc074d5abd5993910a6cd2
function meshnd_example %MESHND_EXAMPLE example usage of meshnd and meshsparse. % % Example: % meshnd_example % % See also meshnd. % Copyright 2009, Timothy A. Davis, http://www.suitesparse.com help meshnd % 2D mesh, compare with Cleve Moler's demos m = 7 ; n = 7 ; [G p pinv Gnew] = meshnd (m,n) ; fprintf ('Orig...
github
robertcastle/dtslam-master
meshnd.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/MESHND/meshnd.m
3,113
utf_8
6dcbfba9099c003d22ca78e6aae8d7dd
function [G, p, pinv, Gnew] = meshnd (arg1,n,k) %MESHND creation and nested dissection of a regular 2D or 3D mesh. % [G p pinv Gnew] = meshnd (m,n) constructs an m-by-n 2D mesh G, and then finds % a permuted mesh Gnew where Gnew = pinv(G) and G = p(Gnew). meshnd(m,n,k) % creates an m-by-n-by-k 3D mesh. % % [G p pinv G...
github
robertcastle/dtslam-master
ssmult_test.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/SSMULT/ssmult_test.m
3,744
utf_8
38a56fcaf9f51fe8c2034ebc02023860
function ssmult_test %SSMULT_TEST lengthy test of SSMULT and SSMULTSYM % % Example % ssmult_test % % See also ssmult, ssmultsym % Copyright 2007-2011, Timothy A. Davis, http://www.suitesparse.com fprintf ('\nTesting large sparse column vectors (1e7-by-1)\n') ; x = sprandn (1e7,1,1e-4) ; y = sprandn (1e7,1,1e-...
github
robertcastle/dtslam-master
find_components_example.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/find_components/find_components_example.m
3,942
utf_8
d813797df447adda5c09bf47365591d0
function find_components_example(example, dopause) %FIND_COMPONENTS_EXAMPLE gives an example usage of find_components. % % Example: % find_components_example(0) % a small example, with lots of printing % find_components_example(1) % Doug's example, with lots of printing % find_components_example(2) % a large e...
github
robertcastle/dtslam-master
UFpage.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/UFcollection/UFpage.m
21,274
utf_8
b6033591f32e638d43ebf2d281f6c565
function UFpage (matrix, index, figures) %UFPAGE create web page for a matrix in UF Sparse Matrix Collection % % Usage: % UFpage (matrix, index, figures) % % matrix: id or name of matrix to create the web page for. % index: the UF index, from UFget. % figures: 1 if the figures are to be created, 0 otherwise % % Ex...
github
robertcastle/dtslam-master
UFread.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/UFcollection/UFread.m
13,580
utf_8
21725dae7e24c05f02784c011410d1be
function Problem = UFread (directory, tmp) %UFREAD read a Problem in Matrix Market or Rutherford/Boeing format % containing a set of files created by UFwrite, in either Matrix Market or % Rutherford/Boeing format. See UFwrite for a description of the Problem struct. % % Usage: Problem = UFread (directory) % % Example: ...
github
robertcastle/dtslam-master
UFwrite.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/MATLAB_Tools/UFcollection/UFwrite.m
17,464
utf_8
53f4b8d22f4a1cc6d25d7dfccce1e1be
function UFwrite (Problem, Master, arg3, arg4) %UFWRITE write a Problem in Matrix Market or Rutherford/Boeing format % containing a set of text files in either Matrix Market or Rutherford/Boeing % format. The Problem can be read from the files back into MATLAB via UFread. % See http://www.suitesparse.com for the UF Sp...
github
robertcastle/dtslam-master
spqr_make.m
.m
dtslam-master/3rdparty/suitesparse-metis-for-windows-1.2.1/SuiteSparse/SPQR/MATLAB/spqr_make.m
15,873
utf_8
b64ca7a48152cc3c6f11710dad3ac09b
function spqr_make (opt1) %SPQR_MAKE compiles the SuiteSparseQR mexFunctions % % Example: % spqr_make % % SuiteSparseQR relies on CHOLMOD, AMD, and COLAMD, and optionally CCOLAMD, % CAMD, and METIS. All but METIS are distributed with CHOLMOD. To compile % SuiteSparseQR to use METIS you must first place a copy of th...
github
robertcastle/dtslam-master
doVideoLoop.m
.m
dtslam-master/code/matlab/doVideoLoop.m
3,489
utf_8
e4e3c354e046996d28e09999137f4b59
%doVideoLoop %Processes a video sequence (either from disk or from a webcam) and calls %the given function for each frame. The user can cleanly stop the process by %clicking a stop button. %Inputs: % processFun - [function] pointer to a function that takes a single % argument, the current image, and returns true if pr...
github
robertcastle/dtslam-master
absoluteOrientationQuaternion.m
.m
dtslam-master/code/matlab/absoluteOrientationQuaternion.m
3,763
utf_8
46796abdfca36c69cb1c57a5b9967b24
% [s R T error] = absoluteOrientationQuaternion( A, B, doScale) % % Computes the orientation and position (and optionally the uniform scale % factor) for the transformation between two corresponding 3D point sets Ai % and Bi such as they are related by: % % Bi = sR*Ai+T % % Implementation is based on the paper by...
github
robertcastle/dtslam-master
error_ellipse.m
.m
dtslam-master/code/matlab/error_ellipse.m
8,066
utf_8
88ee33435327a635d2d76393c95234ae
function h=error_ellipse(varargin) % ERROR_ELLIPSE - plot an error ellipse, or ellipsoid, defining confidence region % ERROR_ELLIPSE(C22) - Given a 2x2 covariance matrix, plot the % associated error ellipse, at the origin. It returns a graphics handle % of the ellipse that was drawn. % % ERROR_ELLIPSE(C33) ...
github
robertcastle/dtslam-master
rotationpars.m
.m
dtslam-master/code/matlab/rotationpars.m
376
utf_8
5e467689e132e8767645691d551f0773
% by Juho Kannala %Matrix form of rotation to vector form (Rodriguez formula) function t=rotationpars(R) [V,D]=eig(R-eye(3)); evs=diag(D); [minv,mini]=min(evs); vect=V(:,mini); cosphi=0.5*(trace(R)-1); sinphi=0.5*vect'*[ R(3,2)-R(2,3); R(1,3)-R(3,1); R(2,1)-R(1,2)]; %if cosphi==0 % phi=pi/2; %else % phi=atan(sinph...
github
robertcastle/dtslam-master
stoploop.m
.m
dtslam-master/code/matlab/stoploop.m
2,421
utf_8
1fdea2ea3084588c21da52991f8008cd
function F = stoploop(str) % STOPLOOP - creates stop button to have a user interrupt a loop % % FS = STOPLOOP creates a message box window and returns a structure FS that % holds two functions, called FS.Stop and FS.Clear. The function FS.Stop() % will return true, if the OK button has been clicked (or the message ...
github
robertcastle/dtslam-master
intersect_lines.m
.m
dtslam-master/code/matlab/intersect_lines.m
637
utf_8
ac6746c5220c7551705f4f3e146ccfb6
%[x,t]=intersect_lines(a,dir) % Input % a [3xN] 3D points that the lines go through % dir [3xN] 3D direction vectors for the line % % Line i is described by the equation xi = a(:,i)+t*dir(:,i) % where t is the free parameter. % Output % x [3x1] is the intersection (or closest point) % t [1xN] is the paramet...
github
robertcastle/dtslam-master
nonlinearOrientation.m
.m
dtslam-master/code/matlab/nonlinearOrientation.m
1,093
utf_8
a2b7c32f7be0633dbb4b2776f1c6533c
%At the end: pb = s*R*pa function [s,R,t, paa]=nonlinearOrientation(pa,pb) [s,R,t] = absoluteOrientationQuaternion(pa, pb, true); % options = optimoptions('lsqnonlin','display','none','MaxFunEvals',1e10,'MaxIter',1e10); % params0 = [rotationpars(R); t; s]; % params = lsqnonlin(@(x) errorFunc(x,pa,pb), ...
github
robertcastle/dtslam-master
rotationmat.m
.m
dtslam-master/code/matlab/rotationmat.m
451
utf_8
2c4c56198f06d5ae8c0d0586321bbe0c
% by Juho Kannala %Vector form of rotation to matrix form (Rodriguez formula) function R=rotationmat(t) t=t(:); phi=norm(t); if 0 if phi==0 sincphi=1; sc=0; else sc=(1-cos(phi))/(phi^2); sincphi=sin(phi)/phi; end R=cos(phi)*eye(3)+sincphi*[0 -t(3) t(2); t(3) 0 -t(1); -t(2) t(1) 0]+sc*t*t'; end if phi==0 R=...
github
siavashk/GMM-FEM-master
read_ply.m
.m
GMM-FEM-master/IO/read_ply.m
15,858
UNKNOWN
51803bd9b0b4b864c187b8aad8cb56ef
function [vertex,face] = read_ply(filename) % read_ply - read data from PLY file. % % [vertex,face] = read_ply(filename); % % 'vertex' is a 'nb.vert x 3' array specifying the position of the vertices. % 'face' is a 'nb.face x 3' array specifying the connectivity of the mesh. % % IMPORTANT: works only for trian...
github
lnls-fac/MatlabMiddleLayer-master
loco.m
.m
MatlabMiddleLayer-master/Release/applications/loco/loco.m
102,297
utf_8
e09f0be92de56ae35c067eb2a66263c2
function [LocoModel, BPMData, CMData, FitParameters, LocoFlags, RINGData] = loco(LocoMeasData, BPMData, CMData, FitParameters, LocoFlags, RINGData) %LOCO - Main routine for the LOCO algorithm % % [LocoModel, BPMData, CMData, FitParameters, LocoFlags, RINGData] = loco(LocoMeasData, BPMData, CMData, FitParameters, Lo...
github
lnls-fac/MatlabMiddleLayer-master
locogui.m
.m
MatlabMiddleLayer-master/Release/applications/loco/locogui.m
139,437
utf_8
2ead5a05b8acec495e1e94863dbbcf6d
function varargout = locogui(varargin) %LOCOGUI - Graphical interface for running the LOCO algorithm % % There are a number of inputs when running LOCO. % % I. File menu % A. Open -> open a loco data file. The input file can be a .mat file or a .m script. % B. Save as -> save file to a different name. %...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calcula_tau.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calcula_tau.m
7,625
UNKNOWN
622835de3ea088c00e88d2adbb74ad89
% LNLS_CALCULA_TAU calcula as contribui��es para o tempo de vida e o tempo % de vida total. % % [lifetime,pressure] = LNLS_CALCULA_TAU(data1,data2,pres,vacc) com % pres=-1 usa o arquivo de perfil de press�o especificado em AD; com % vacc=-1, sem refine, usa o perfil de c�mara de v�cuo no modelo (nesse % c...
github
lnls-fac/MatlabMiddleLayer-master
lnls_correct_chrom.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_correct_chrom.m
1,801
utf_8
fa0849765af8659adbdef4a1d4c4f613
function ring = lnls_correct_chrom(ring, chrom, fams, max_iter, tolerancia) if ~exist('chrom', 'var'), chrom = [0,0]; end if ~exist('max_iter', 'var'), max_iter = 10; end if ~exist('tolerancia', 'var'), tolerancia = 1e-3; end if ~exist('fams', 'var') fams = {'SDA1', 'SDA2', 'SDA3', 'SFA1', 'SFA2', ... 'SDB...
github
lnls-fac/MatlabMiddleLayer-master
lnls_chaos_indicator.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_chaos_indicator.m
9,587
utf_8
1dea81313f1a0d0db318f3e2b98b01c3
function indicator = lnls_chaos_indicator(ring, param, plota) % indicator = lnls_chaos_indicator(ring, param, plota) % Calculate ASDR (see Plinio's internship report for details) and % diffusion for a model of ring. % % INPUT % ring = accelerator model. % param = struct with the mandatory field ...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calcula_ibs.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calcula_ibs.m
7,800
UNKNOWN
ee1c98040e1893c696e2d6ead0c5d010
% LNLS_CALCULA_IBS calcula o aumento das emit�ncias horizontal e vertical e % o aumento da dispers�o relativa de energia devido a Intrabeam Scattering, % com base na aproxima��o CIMP descrita em KUBO, MTINGWA, AND WOLSKI - % Intrabeam scattering formulas for high energy beams - Phys. Rev. ST % Accel. Beams 8, 08100...
github
lnls-fac/MatlabMiddleLayer-master
tune_shift.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/tune_shift.m
1,690
utf_8
36574b7ff3c931635acf391d9ad44d16
function [points tunes] = tune_shift(p1, p2, nr_pts) %function [points tunes] = tune_shift(p1, p2, nr_pts) global THERING; nr_turns = 512; small_pos = 0.01 * 1e-8; ringpassptr = @myringpass; for i=1:nr_pts points(i,:) = [small_pos 0 small_pos 0 0 0] + p1 + (i-1) * (p2 - p1) / (nr_pts - 1); ...
github
lnls-fac/MatlabMiddleLayer-master
lnls_lifetime_touschek.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_lifetime_touschek.m
3,767
utf_8
244aab9783e04880e40fc2409acf5d19
%lnls_lifetime_touschek(data_at,phase,I,Nb,K): Calculates the Touschek %lifetime taking into account the variation of emittance due to ID's, i.e., %for a given operation phase and also takes into consideration the IBS %effect in the growth of emittance. % %The main reference is: J. Le Duff - "Single and Multiple Tousch...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calc_emittance_coupling.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calc_emittance_coupling.m
1,119
utf_8
adcf7ad924a050a72b34d2e7f1c05fe0
function [coupling, xlist] = lnls_calc_emittance_coupling(the_ring, xlist) % arguments if ~exist('xlist','var') xlist = 1e-3 * linspace(-0.1,0.1,10); end nr_turns = 30; % calcs 4d closed orbit the_ring = setcavity('off', the_ring); the_ring = setradiation('off', the_ring); cod = [findorbit4(the_ring, 0); 0; 0]; ...
github
lnls-fac/MatlabMiddleLayer-master
ibs_phases.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/ibs_phases.m
6,173
utf_8
85f2244da499921893a84990dbfbbe0e
% ibs_phases: write in file and plot final values of horizontal and vertical % emittances and energy spread in function of current per bunch in % operation phases 1 and 2. The calculations take into account the effect % of IBS (using CIMP and Bane models) and also consider the changes in % natural emittance and natural...
github
lnls-fac/MatlabMiddleLayer-master
lnls_lifetime_calc.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_lifetime_calc.m
4,711
UNKNOWN
c776fcc9d274e90bda9074ac16087fe0
% lnls_calc_total_lifetime: calculates each contribution for the total % lifetime (quantum, elastic, inelastic and Touschek). For the Touschek % lifetime it takes the effect of IBS into account. For the elastic and % inelastic lifetimes it was used a simulated pressure profile with % accumulated charge of 10000Ah a...
github
lnls-fac/MatlabMiddleLayer-master
ibs_id.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/ibs_id.m
1,289
utf_8
720012479384bd99016f67b854359559
%ibs_id: calculates the values of final vertical and horizontal emittances %and energy spread due to IBS effect. The natural emittances and energy %spread depends on the operation phase chosen. % %INPUT data_atsum: struct with ring parameters (atsummary) % I : Current per bunch vector [A] % K ...
github
lnls-fac/MatlabMiddleLayer-master
lnls_lifetime_elastic.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_lifetime_elastic.m
2,815
utf_8
77b81c44c3c5a23c22008070d27bf871
%lnls_elastic_lifetime: calculates the rate due to elastic scattering %of electrons with nuclei of residual gas in vacuum chamber % %Reference: H. Wiedemann - "Particle Accelerator Physics" - Third Edition %Section 8.8.1 - Beam Lifetime and Vacuum (Elastic Scattering) % %Input: Z : atomic number of equivalent gas o...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calc_energy_dependent_optics.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calc_energy_dependent_optics.m
4,910
utf_8
9b49c869473825c365fdf1f5844f1bfa
function [par, fit] = lnls_calc_energy_dependent_optics(ring,energy,n, print, sdepend) if ~exist('energy','var') || isempty(energy), energy = (-5:0.2:5)*1e-2; end; if ~exist('n','var') || isempty(n), n = 6; end; if ~exist('print','var'), print = false; end; if ~exist('sdepend','var'), sdepend = false; end par.energy...
github
lnls-fac/MatlabMiddleLayer-master
lnls_plot_lattice.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_plot_lattice.m
2,290
utf_8
9ef95c4f0579ebf1353b02de9305c50a
function lnls_plot_lattice(the_ring, smin, smax, y, dy) bends = findcells(the_ring, 'BendingAngle'); multi = setdiff(findcells(the_ring, 'PolynomB'), bends); sexts = multi(getcellstruct(the_ring, 'PolynomB', multi, 1, 3) ~= 0); quads = setdiff(multi, sexts); if ~isempty(quads) quads_qf = (getcellstruct(the_ring, ...
github
lnls-fac/MatlabMiddleLayer-master
lnls_correct_tunes.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_correct_tunes.m
5,621
utf_8
dc69348106ac30cf11dd6ac9ef8e55a6
function [the_ring, converged, tunesf, tunesi] = lnls_correct_tunes(the_ring, goal_tunes, families, method, variation, max_iter, tolerance) % [the_ring0, converged, tunes] = lnls_correct_tune(the_ring, goal_tunes, families, method, variation, max_iter, tolerance) % % Correct tunes with specified quadrupole families. % ...
github
lnls-fac/MatlabMiddleLayer-master
lnls_naff.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_naff.m
1,092
utf_8
3e3a1749293550152620f1e66f33e994
function tunes = lnls_naff(data, init_tunes) % lnls_naff % % Analise de Frequencias Fundamentais % % Examplo: % % global THERING; % data = ringpass(THERING, [0.0001 0 0.0001 0 0 0]', 1024); % tunes = lnls_naff(data(1,:), [24.26, 13.18]); options.Display = 'off'; options.TolFun = 1e-15; [x,fval,exitfl...
github
lnls-fac/MatlabMiddleLayer-master
lnls_read_igor_binary_file.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_read_igor_binary_file.m
24,101
utf_8
1b216a45138ecf6c10678e3e47642a4e
function D = IBWread(FN) % IBWread - read Igor wave from IBW file % D = IBWread('Foo.ibw') reads Igor file Foo.ibw into struct D. if exist('fullfilename', 'file'), FFN = fullfilename(FN, cd, '.ibw'); else, FFN = FN; end % read headers [D.binHeader, D.waveHeader, FFN] = readIBWheaders(FN); fid = fopen(FFN,...
github
lnls-fac/MatlabMiddleLayer-master
lnls_at2tracyflat.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_at2tracyflat.m
9,248
utf_8
f446f028a34c3532b34b4db12d1d0200
function lnls_at2tracyflat(ring, flat_name) %lnls_at2tracyflat(ring,flat_name) gera um arquivo flat_file %com nome flat_name do tracy3 a partir do modelo do anel ring do AT. % %O c???digo ainda pode ser otimizado para ganho de velocidade. % %Ximenes - 2013-01-11 - Implementado elemento KickMap %Fernando - 2012-...
github
lnls-fac/MatlabMiddleLayer-master
lnls_carrega_funcoes.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_carrega_funcoes.m
3,549
UNKNOWN
3173bf7d1d999d4a6ae50e31132af7e7
% LNLS_CARREGA_FUNCOES fornece um vetor r com posi��es, a press�o P e as % fun��es Bx, By, -B'/2, D e D', sem elementos repetidos. % % [r,P,Bx,By,alpha,eta,eta_diff,err] = LNLS_CARREGA_FUNCOES(s_B,Bx0,By0, % alpha0,eta0,eta_diff0,pres,flag_refine) com pres do tipo string carrega % o perfil de pressao cuj...
github
lnls-fac/MatlabMiddleLayer-master
lnls_drawlattice.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_drawlattice.m
5,151
utf_8
94c4c145b47c1efabac8e70ec708ff10
function lnls_drawlattice(the_ring, nper, offset, unset_names, scale, bpms, cms, girders, h) % lnls_drawlattice(the_ring, nper, offset, unset_names, scale, bpms_and_cms, h) % % INPUTS: % the_ring - lattice to be drawn; % nper - symmetry of the ring. The lattice will be drawn from the % ...
github
lnls-fac/MatlabMiddleLayer-master
lnls_import_pressure_profile.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_import_pressure_profile.m
2,385
utf_8
8a4f098d604c0165ae9683928347cbf9
%lnls_import_pressure_profile(data_at,file,q_acc): Import the pressure %profile file which contains the values of pressure simulated for various %accumulated charges and over 1/20 of the ring. This function uses the %periodicity of pressure to extend the pressure profile over the whole %ring. Adjustments to match the c...
github
lnls-fac/MatlabMiddleLayer-master
lnls_emit_ID_total.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_emit_ID_total.m
4,172
utf_8
a246170ea9787b2fc3f2e26f649f8402
%lnls_emit_ID_total: calculates the variation on horizontal emittance and %energy spread due to the presence of insertions devices (IDs) on the sto- %rage ring. The function also evaluates the effective emittance, the energy %lost due to radiation emission and the power. % %INPUT: data1: scruct which contains ring para...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calc_touschek_accep.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calc_touschek_accep.m
11,461
utf_8
ad50a1af4707ae27bc9809c26375a2de
function [Accep, info, ring] = lnls_calc_touschek_accep(ring,delta,plota,flag_dyn,info_in) % [Accp, tune_pos, tune_neg] = lnls_calc_touschek_accep(ring,delta) % Function lnls_calc_touschek_accep calculates the transverve linear energy % acceptance of the_ring, considering its twiss functions and vacuum % chamber. % ...
github
lnls-fac/MatlabMiddleLayer-master
fmap.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/fmap.m
5,483
utf_8
e1b532acb06dd8e2764af9e064143cc0
function r = fmap(nx,ny,ax,ay) % Simulates a frequency map using the tracking routine's out of Andrei Terebilos AT toolbox and Jacques Laskars NAFF algorithm % % function [nux,nuy,diffu] = lnls1_fmap_soleil(nx,ny,ax,ay) % % simulates a frequency map using the tracking % routine's out of Andrei Terebilos AT toolb...
github
lnls-fac/MatlabMiddleLayer-master
lnls_lifetime_plot.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_lifetime_plot.m
1,260
utf_8
be433c852ca0121d2a8a9238e3830b88
%lnls_lifetime_plot: calculates the total lifetime as a function of current %per bunch and creates a file .txt useful for plotting graphics. % %INPUT data_at : struct with ring parameters (atsummary) % I : Current per bunch vector [A] % phase: set the operational phase (0, 1 or 2) % %OUTPUT li...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calc_ibs_bane_cimp.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calc_ibs_bane_cimp.m
10,913
utf_8
8275ccc55d2ef9c59badc3d8934cb5dd
% lnls_calc_ibs_bane_cimp: calculates the horizontal and vertical emittance growth % and relative energy spread due to intrabeam scattering. The code uses two % approximated models: CIMP and high energy developed by Bane. Equilibrium % emittances are calculated by the temporal evolution over a time which is % a multipl...
github
lnls-fac/MatlabMiddleLayer-master
lnls_lifetime_quantum.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_lifetime_quantum.m
1,426
utf_8
f0ab18a6c258105f185297b35cad7cd4
% Wm = lnls_lifetime_quantum(tau_am,K,EA_x,EA_y,E_n,cp,mcf,Nb,V,U0): % calculates the loss rate due to quantum effects, which its inverse is the % quantum lifetime % % Input: tau_am damping times x, z e E [s] % K coupling factor % EA_x horizontal acceptance [mm mrad] % EA_y ver...
github
lnls-fac/MatlabMiddleLayer-master
lnls_dynapt.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_dynapt.m
6,084
utf_8
cfd3924cebfac23f55812473155b0ba3
function r = lnls_dynapt(the_ring, varargin) % r = lnls_dynapt(varargin) % % Calculo de separatriz da abertura dinamica % % Inputs % % the_ring : modelo da rede para o calculo da abertura dinamica % % (struct): % 'energy_deviation' : vector com valores de desvio de anergia para calculo de abert...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calcula_aceitancias.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calcula_aceitancias.m
3,481
UNKNOWN
ff51545f630db756f057f427388e4498
% LNLS_CALCULA_ACEITANCIAS calcula as aceitancias horizontal e vertical % devido a camara de vacuo. % % [EA_x,EA_y,R,err] = LNLS_CALCULA_ACEITANCIAS(r,Bx,By,vacc) com vacc do % tipo string usa o perfil de c�mara de vacuo cujo arquivo (caminho e % nome) � vacc; com vacc = [Vx Vy], considera um perfil de c...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calc_drive_terms.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calc_drive_terms.m
6,065
utf_8
29b5db696736613ef2a5799f3a578cad
function [DT, S, Q] = lnls_calc_drive_terms(ring,twiss,n_per,Jx,Jy,delta,drts, fams) % [DT, S, Q] = lnls_calc_drive_terms(ring,twiss,n_per,Jx,Jy,delta) if ~exist('twiss','var'), twiss = calctwiss(ring,1:length(ring)); end if ~exist('n_per','var'), n_per = 1; end if ~exist('Jx','var'), Jx = 1; end if ~exist('Jy','var')...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calc_tune_shifts.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calc_tune_shifts.m
5,054
iso_8859_1
429bc6788509b0bec811b3cb486055f2
function [tunex,tuney,px,py,amps] = lnls_calc_tune_shifts(ring,print,amps, npols, de) % [tunex,tuney,px,py,amps] = lnls_calc_tune_shifts(ring,amps) % % Plota os espacos de fase horizontal e vertical e monta o diagrama de % tuneshifts com as amplitudes horizontal e vertical: % % ring = modelo do anel para o qual os cal...
github
lnls-fac/MatlabMiddleLayer-master
lnls_insert_kicktable_old.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_insert_kicktable_old.m
5,511
utf_8
486771b0174f8f20f8965bc69c9b2db1
function the_ring = lnls_insert_kicktable_old(the_ring0, idx_pos, file_name, nsegs, strength, famname) % reads kicktable [posx posy kickx kicky id_length] = lnls_read_kickmap_file(file_name); % calculates indices of elements in the location of insertion idx_dws = idx_pos+1; while any(strcmpi(the_ring0{idx...
github
lnls-fac/MatlabMiddleLayer-master
lnls_calcula_tau_ibs.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_calcula_tau_ibs.m
4,518
UNKNOWN
328a0c99a146a732671ef4d63277517a
% lnls_calc_total_lifetime: calculates each contribution for the total % lifetime (quantum, elastic, inelastic and Touschek). For the Touschek % lifetime it takes the effect of IBS into account. For the elastic and % inelastic lifetimes it was used a simulated pressure profile with % accumulated charge of 10000Ah a...
github
lnls-fac/MatlabMiddleLayer-master
lnls_lifetime_inelastic.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_lifetime_inelastic.m
2,874
utf_8
ee3884211c6a3bf6cb930d1cbba92db6
%lnls_inelastic_lifetime: calculates the rate due to inelastic scattering %of electrons with nuclei of residual gas in vacuum chamber % %Reference: H. Wiedemann - "Particle Accelerator Physics" - Third Edition %Section 8.8.1 - Beam Lifetime and Vacuum (Inelastic Scattering) % %Input: r: position where the twiss param...
github
lnls-fac/MatlabMiddleLayer-master
lnls_plot_cod.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_plot_cod.m
5,181
utf_8
a3bfefbc1c750600fb3605fe332f60ef
function lnls_plot_cod(default_path) prompt = {'Submachine (bo/si)', 'COD unit (um/mm)', 'symmetry', 'plot title', 'corrected?(y/n)'}; defaultanswer = {'si', 'mm', '20', 'SI.V14.C03','n'}; answer = inputdlg(prompt,'Select submachine and trackcpp algorithms to run',1,defaultanswer); if isempty(answer), return; end; su...
github
lnls-fac/MatlabMiddleLayer-master
lnls_effect_emittance.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_effect_emittance.m
3,428
utf_8
0749123d36cf56dd35a357e685540576
%lnls_effect_emittance: defines the parameters of beam lines, returns new %struct with ring parameters due to the presence of IDs. The function lnls_emit_ID_total %performs the calculations of variations. % %INPUT data_at: struct with storage ring parameters (atsummary) % phase: set the operational phase (0, 1...
github
lnls-fac/MatlabMiddleLayer-master
lnls_at2flatfile.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lnls_at2flatfile.m
8,913
utf_8
775cbe1a4a6f632f3aacb5058c725e5d
function lnls_at2flatfile(lattice, filename) %lnls_at2flatfile(lattice, filename) gera um arquivo flatfile %com nome 'filename' a partir do modelo do 'lattice' do AT. % % %Ximenes - 2014-08-27 cts = lnls_constants; L = findspos(lattice, length(lattice)+1); rv_freq = cts.c / L; idx = findcells(lattice, 'Frequency'); i...
github
lnls-fac/MatlabMiddleLayer-master
genetic_operator.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/nsga_ii/genetic_operator.m
9,471
UNKNOWN
9167a7ea5a0cfe883f63b6ac46dcccf0
function f = genetic_operator(parent_chromosome, M, V, mu, mum, l_limit, u_limit, scale, func) %% function f = genetic_operator(parent_chromosome, M, V, mu, mum, l_limit, u_limit) % % This function is utilized to produce offsprings from parent chromosomes. % The genetic operators corssover and mutation which ar...
github
lnls-fac/MatlabMiddleLayer-master
study_errors_effects.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/study_errors_effects.m
10,046
utf_8
31a73c8854ca27dd26abea59ec3c6569
function machine = study_errors_effects() % initializations name = 'CONFIG'; name_saved_machines = name; initializations(name); % defines nominal lattice model read_from_file = false; [the_ring, family_data] = create_nominal_model(read_from_file, name); % creates and applies misalignment, rotation and exc...
github
lnls-fac/MatlabMiddleLayer-master
calc_ripple_effects.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/calc_ripple_effects.m
4,814
utf_8
2cefdc19080df93b0401b10255c0481a
function machine = calc_ripple_effects(r, selection) global THERING; fprintf(['--- ripple_effects [' datestr(now) '] ---\n']); dim = '4d'; the_ring0 = r.params.the_ring; coupling = r.params.ref_coupling; twiss0 = calctwiss(the_ring0); ats0 = atsummary(the_ring0); sigmax0 = sqrt(twiss0.betax * ats0.naturalEmittanc...
github
lnls-fac/MatlabMiddleLayer-master
get_orb_corr_streng.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/get_orb_corr_streng.m
2,562
utf_8
1c74a8f6e4eb7c9e6ae75b7f29935ae5
function get_orb_corr_streng() ring = sirius_si_lattice(); fam_data = sirius_si_family_data(ring); % making sure they are in order bpm_idx = sort(fam_data.bpm.ATIndex); hcm_idx = sort(fam_data.ch.ATIndex); vcm_idx = sort(fam_data.cv.ATIndex); cv_idx = findcells(ring,'FamName','cv')'; vcm_nocv_idx = setdiff(vcm_idx,c...
github
lnls-fac/MatlabMiddleLayer-master
lnls_latt_err_generate_errors.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Errors/lnls_latt_err_generate_errors.m
9,109
utf_8
10203ce19acf913dc7fb008a78d7d719
function errors = lnls_latt_err_generate_errors(name, the_ring, config, nr_mach, cutoff, rndtype) % % Generates random errors to be applied in the model by the function % apply_errors. % % INPUTS: % name : a string to be used as name to save the configuration data % the_ring : is a ring model. % c...
github
lnls-fac/MatlabMiddleLayer-master
lnls_latt_err_generate_apply_bpmcorr_errors.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Errors/lnls_latt_err_generate_apply_bpmcorr_errors.m
5,088
utf_8
c74c3175db529fa9093d3fa33540dc4d
function the_ring = lnls_latt_err_generate_apply_bpmcorr_errors(name, the_ring, control, cutoff, rndtype) % function the_ring = lnls_latt_err_generate_apply_bpmcorr_errors(name, the_ring, control, cutoff, rndtype) % % Generates and apply errors to bpms and correctors in the_ring: % - For every bpm defined in control, ...
github
lnls-fac/MatlabMiddleLayer-master
lnls_latt_err_apply_errors.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Errors/lnls_latt_err_apply_errors.m
4,530
utf_8
69c6674793cc6ea5e7f54fb871d39a15
function machine = lnls_latt_err_apply_errors(name, machine, errors, increment) % % Apply the errors generated by generate_errors to the ring model. % % INPUTS: % name : name of the file to save input parameters % machine : might be a model of the ring or a cell array of models of % th...
github
lnls-fac/MatlabMiddleLayer-master
lnls_latt_err_generate_multipole_errors.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Errors/lnls_latt_err_generate_multipole_errors.m
3,259
utf_8
acabfc73737a5a58a1f6dd83af3a45fb
function errors = lnls_latt_err_generate_multipole_errors(name, the_ring, multi, nr_mach, cutoff) % function errors = lnls_latt_err_generate_multipole_errors(name, the_ring, multi, nr_machines, cutoff) % % Generates random errors to be applied in the model by the function % apply_errors. % % INPUTS: % name : a ...
github
lnls-fac/MatlabMiddleLayer-master
get_response_matrix.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Tools/get_response_matrix.m
3,382
utf_8
5d719494825f53288e96a58015885ed6
function MR = get_response_matrix(the_ring, bpms, hcms, vcms, dim) % M(y,x) --> y : orbit x: corrector if ~exist('dim','var'), dim = get_dim(the_ring); end if strcmp(dim,'6d') [M, T] = findm66(the_ring, 1:length(the_ring)+1); else [M, T] = findm44(the_ring,0,1:length(the_ring)+1); end len_hcms = size(hcms...
github
lnls-fac/MatlabMiddleLayer-master
optics_sg.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Optics/optics_sg.m
2,486
utf_8
d5d28bb310ad42c69c9583c9a10b6eee
function [the_ring, quadstr, init_fm,best_fm, iter, n_times] = optics_sg(the_ring, optics) % assumes uniform quadrupolar field in quadrupole models tol = abs(optics.tolerance); quad_lst = optics.kbs_idx(:); U = optics.respm.U; V = optics.respm.V; S = optics.respm.S; if ischar(optics.svs) && strcmpi(optics.svs, 'al...
github
lnls-fac/MatlabMiddleLayer-master
calc_residue_optics_loco.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Optics/calc_residue_optics_loco.m
1,312
utf_8
c99a2c8a8f99f264b90531581db5b616
function v = calc_residue_optics_loco(ring, optics, goal) BETAW = 1e2; % order of centimeters DISPW = 1e4; % order of tenth of milimeters TUNEW = 1e4; % order of 10^-2 twi0 = goal.twi_goal; tune0 = goal.tune_goal; hcm_idx = sort(optics.hcm_idx); vcm_idx = sort(optics.vcm_idx); bpm_idx = sort(optics.bpm_idx); [twi1,...
github
lnls-fac/MatlabMiddleLayer-master
calc_respm_optics_loco.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Optics/calc_respm_optics_loco.m
1,431
utf_8
7076eee4124c4f226fb68f95b104ba34
function respm = calc_respm_optics_loco(the_ring, optics, goal) hcm_idx = sort(optics.hcm_idx); vcm_idx = sort(optics.vcm_idx); bpm_idx = sort(optics.bpm_idx); kbs_idx = sort(optics.kbs_idx); sym = optics.symmetry; nb = [1, length(bpm_idx), length(hcm_idx), length(bpm_idx), ... length(vcm_idx), length(bpm_idx)];...
github
lnls-fac/MatlabMiddleLayer-master
coup_sg.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Coupling/coup_sg.m
2,154
utf_8
680234bedfa184396e3ae60d5fc3cc67
function [the_ring, skewstr, init_fm,best_fm, iter, n_times] = coup_sg(the_ring, coup) tol = abs(coup.tolerance); skew_lst = coup.scm_idx(:); U = coup.respm.U; V = coup.respm.V; S = coup.respm.S; if ischar(coup.svs) && strcmpi(coup.svs, 'all') sing_vals = min(size(S)); else sing_vals = coup.svs; end % sele...
github
lnls-fac/MatlabMiddleLayer-master
lnls_latt_err_correct_cod.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/lattice_errors/Orbit/lnls_latt_err_correct_cod.m
8,598
utf_8
d950057bd0df46475867dd07bffe0295
function machine = lnls_latt_err_correct_cod(name, machine, orbit, goal_codx, goal_cody) % % function machine = lnls_latt_err_correct_cod(name, machine, orbit, goal_codx, goal_cody) % % Correct orbit of several machines. % % INPUTS: % name : name of the file to which the inputs will be saved % machine ...
github
lnls-fac/MatlabMiddleLayer-master
scatplot.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/scatplot.m
6,859
utf_8
cb80e1c784fb80aacdc48a58b9a15bb4
function out = scatplot(x,y,method,radius,N,n,po,ms) % Scatter plot with color indicating data density % % USAGE: % out = scatplot(x,y,method,radius,N,n,po,ms) % out = scatplot(x,y,dd) % % DESCRIPTION: % Draws a scatter plot with a colorscale % representing the data density computed % using three methods % ...
github
lnls-fac/MatlabMiddleLayer-master
multiple_pulse.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+bo_inj/multiple_pulse.m
9,786
utf_8
8becbae1da50773aa6b111667d5560e5
function r_particles_out = multiple_pulse(machine, param, param_errors, n_part, n_pulse, point, kckr, plt, diag) % Simulation of injection pulses in the booster. The starting point is the % end of injection septum. % % INPUTS: % - machine: cell with ring model which the first point is InjSept % - param: struct with inj...
github
lnls-fac/MatlabMiddleLayer-master
pso_inj_bo.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+bo_inj/pso_inj_bo.m
3,311
utf_8
c20f3bf3d25a46ede420589fef1304d5
function [xhystr, fhystr] = pso_inj_bo(boinj, param, param_err, fam_tb, niter) quads = set_quads(fam_tb); % 10 TB quadrupoles + PosAng X and Y dim = length(quads) + 4; w = 0.7984; c1 = 1.49618; c2 = c1; npart = 10 + 2 * round(sqrt(dim)); k_max = 2; dr_max = 0.5e-3; ...
github
lnls-fac/MatlabMiddleLayer-master
result_find_machine.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+meas_fitting/result_find_machine.m
3,283
utf_8
57e0fa3ec782d231935fe1f288f2041c
function result_find_machine(respm_init, respm_final, respm_goal, ring_init, ring_final, k_dip) %{ n_ch_cv = size(respm_init, 2) - 1; n_bpm = size(respm_init, 1) / 2; dif_init = zeros(n_ch_cv, 1); dif_final = zeros(n_ch_cv, 1); for c1 = 1:n_ch_cv for i = 1:2*n_bpm dif_init(c1) = dif_init(c1) + (respm_init...
github
lnls-fac/MatlabMiddleLayer-master
adjust_rf_fine.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/adjust_rf_fine.m
6,787
utf_8
49d616b114f0985ab8623788dda07899
function adjust_rf_fine(machine, param, param_errors, n_part, n_turns, ph_lag, freq_new) sirius_commis.common.initializations(); machine = setcavity('on', machine); machine = setradiation('on', machine); param.beam.sigmae = param.beam.sigmae/2; param.beam.sigmaz = 3e-3; param_errors.phase_sist = 23e-2; param.phase_si...
github
lnls-fac/MatlabMiddleLayer-master
phase_space_caract.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/phase_space_caract.m
4,435
utf_8
91831768be9c6e4b9260e2c9014769d5
function [n_v, r] = phase_space_caract(machine, n_turns, n_points, mode) % Caracterization of longitudinal phase space introduzing a macroparticle % at different initial conditions of longitudinal phase and energy. It % simulates two cases: the first one with the RF frequency changing and in % the second one the parti...
github
lnls-fac/MatlabMiddleLayer-master
correct_first_turn_SOFB.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/correct_first_turn_SOFB.m
8,849
utf_8
421f69f1fb6ccda6678b06314d354b28
function correct_first_turn_SOFB(bpm, n_sv, sum_min) % v_prefix = getenv('VACA_PREFIX'); ioc_prefix = ['BO-Glob:AP-SOFB:']; % kicks_ch_pv = [ioc_prefix, 'KicksCH-Mon']; % kicks_cv_pv = [ioc_prefix, 'KicksCV-Mon']; % delta_kicks_ch_pv = [ioc_prefix, 'DeltaKicksCH-Mon']; % delta_kicks_cv_pv = [ioc_prefix, 'DeltaKicksCV-...
github
lnls-fac/MatlabMiddleLayer-master
correct_orbit_SOFB.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/correct_orbit_SOFB.m
5,871
utf_8
362cf492900edd229848ce1dc1d72fef
function correct_orbit_SOFB(bpm, n_sv, n_turns) % v_prefix = getenv('VACA_PREFIX'); ioc_prefix = ['BO-Glob:AP-SOFB:']; % kicks_ch_pv = [ioc_prefix, 'KicksCH-Mon']; % kicks_cv_pv = [ioc_prefix, 'KicksCV-Mon']; % delta_kicks_ch_pv = [ioc_prefix, 'DeltaKicksCH-Mon']; % delta_kicks_cv_pv = [ioc_prefix, 'DeltaKicksCV-Mon']...
github
lnls-fac/MatlabMiddleLayer-master
orbit_correction_SOFB.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/orbit_correction_SOFB.m
8,073
utf_8
f79c22283630cdd64f60f5442b382651
function [machine_cell, hund_turns, count_turns, num_svd] = orbit_correction_SOFB(machine, n_mach, param, param_errors, svd_min, n_part, n_pulse, several_turns) sirius_commis.common.initializations(); if n_mach == 1 machine_cell = {machine}; param_cell = {param}; param_err_cell = {param...
github
lnls-fac/MatlabMiddleLayer-master
multiturn_correction_SOFB.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/multiturn_correction_SOFB.m
4,474
utf_8
49337d27682b1f8cef77a32a6a001552
function multiturn_correction_SOFB(n_sv, sum_lim, ring_size, closes_orbit) v_prefix = ''; % getenv('VACA_PREFIX'); ioc_prefix = [v_prefix, 'BO-Glob:AP-SOFB:']; % kicks_ch_pv = [ioc_prefix, 'KicksCH-Mon']; % kicks_cv_pv = [ioc_prefix, 'KicksCV-Mon']; % delta_kicks_ch_pv = [ioc_prefix, 'DeltaKicksCH-M...
github
lnls-fac/MatlabMiddleLayer-master
correct_orbit_bpm_matrix_SOFB.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/correct_orbit_bpm_matrix_SOFB.m
12,895
utf_8
b03357620003d555fb170bbbd642aad2
function ft_data = correct_orbit_bpm_matrix_SOFB(machine, param, param_errors, n_part, n_pulse, n_sv, r_bpm, int_bpm) % Increases the intensity of BPMs and adjusts the orbit by changing the % correctors based on BPMs measurements with a matrix approach % % INPUTS: % - machine: booster ring model with errors % - param...
github
lnls-fac/MatlabMiddleLayer-master
single_pulse_turn.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/single_pulse_turn.m
4,908
utf_8
75d5f3ca7052f274daa9ca052f174749
function r_out = single_pulse_turn(machine, param, param_errors, n_part, n_turns, c_prev) % Simulation of booster injection and turns around the ring for a single % pulse (for multiple pulses, see the function multiple_pulses_turns()) % % INPUTS: % - machine: booster ring model with errors % - n_mach: number of rando...
github
lnls-fac/MatlabMiddleLayer-master
correct_orbit_bpm_matrix.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/correct_orbit_bpm_matrix.m
11,854
utf_8
92cc4e33ac8785776b94828b240593a5
function ft_data = correct_orbit_bpm_matrix(machine, param, param_errors, m_corr, n_part, n_pulse, n_sv, r_bpm, int_bpm) % Increases the intensity of BPMs and adjusts the orbit by changing the % correctors based on BPMs measurements with a matrix approach % % INPUTS: % - machine: booster ring model with errors % - pa...
github
lnls-fac/MatlabMiddleLayer-master
closes_orbit_SOFB.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/closes_orbit_SOFB.m
8,588
utf_8
508de31990654561709252746ebfa5df
function [machine, count_turns] = closes_orbit_SOFB(machine, param, param_errors, n_part, n_pulse, n_sv, n_turns) % sirius_commis.common.initializations(); fam = sirius_bo_family_data(machine); ch = fam.CH.ATIndex; cv = fam.CV.ATIndex; bpm = fam.BPM.ATIndex; machine = setcellstruct(machine, 'PolynomB', fam.SD.ATInde...
github
lnls-fac/MatlabMiddleLayer-master
orbit_correction.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/orbit_correction.m
8,754
utf_8
98cce06b911308670f74a5fd24dc8c85
function [machine_cell, hund_turns, count_turns, num_svd] = orbit_correction(machine, n_mach, param, param_errors, respm, svd_min, n_part, n_pulse, several_turns) % Closed orbit correction algorithm % % INPUTS: % - machine: booster ring model with errors % - n_mach: number of random machines % - param: cell of struc...
github
lnls-fac/MatlabMiddleLayer-master
adjust_rf.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+bo/adjust_rf.m
12,974
utf_8
645cca2e9735aa2a105d8e8aec86bb0c
function [freq, phase, fail] = adjust_rf(machine, n_mach, param, param_errors, n_part, n_turns, n_pass) % Scanning process to adjust the RF parameters: frequency and phase. % % INPUTS: % - machine: booster ring model with errors % - n_mach: number of machines % - param: cell of structs with adjusted injection parame...
github
lnls-fac/MatlabMiddleLayer-master
plot_bba.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+si/plot_bba.m
11,097
utf_8
4689ccfe09bfd92e3cdd744b1bb068f9
function [bba_analy, bpmx_ok, bpmy_ok] = plot_bba(bba_data, n_mach, loop, plt, bpms_bba, bpm_cutoff) if loop for i = 1:n_mach bba_analy{i} = analy(bba_data, i, plt, bpms_bba, bpm_cutoff); bba_before(i, :) = bba_analy{i}.dif_nobba_std; bba_after(i, :) = bba_analy{i}.dif_bba_std; end ...
github
lnls-fac/MatlabMiddleLayer-master
closes_orbit_from_traj.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+si/closes_orbit_from_traj.m
7,838
utf_8
6e5c02588b40b9ac3623597b13ae119d
function ft_data = closes_orbit_from_traj(machine_in, n_mach, param, param_errors, m_corr, n_part, n_pulse, n_sv_in, n_turns) sirius_commis.common.initializations(); if n_mach == 1 machine_cell = {machine_in}; param_cell = {param}; % param_err_cell = {param_errors}; elseif n_mach > 1 machine_cell = ma...
github
lnls-fac/MatlabMiddleLayer-master
single_pulse_turn.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+si/single_pulse_turn.m
4,920
utf_8
b8d262afa9d261d408a02ba8af796716
function r_out = single_pulse_turn(machine, param, param_errors, n_part, n_turns, c_prev) % Simulation of storage ring injection and turns around the ring for a single % pulse (for multiple pulses, see the function multiple_pulses_turns()) % % INPUTS: % - machine: storage ring ring model with errors % - n_mach: numbe...
github
lnls-fac/MatlabMiddleLayer-master
correct_orbit_bpm_matrix.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+si/correct_orbit_bpm_matrix.m
12,586
utf_8
839a44fcf9889a968608cfb973aa1817
function ft_data = correct_orbit_bpm_matrix(machine, param, param_errors, m_corr, n_part, n_pulse, n_sv, r_bpm, int_bpm) % Increases the intensity of BPMs and adjusts the orbit by changing the % correctors based on BPMs measurements with a matrix approach % % INPUTS: % - machine: booster ring model with errors % - pa...
github
lnls-fac/MatlabMiddleLayer-master
bba_non_stored_beam.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+si/bba_non_stored_beam.m
23,390
utf_8
9a7b9b0575e2f6fd1f2dde98b628ed8d
function bba_data = bba_non_stored_beam(machine, n_mach, param, param_errors, n_part, n_pulse, m_corr, n_points, plane, data_bpm, data_input) mili = 1e-3; micro = 1e-6; bpm_stop = 200; % sirius_commis.common.initializations(); if n_mach == 1 machine_cell = {machine}; param_cell = {...
github
lnls-fac/MatlabMiddleLayer-master
orbit_correction.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+first_turns/+si/orbit_correction.m
15,557
utf_8
5aea72dbb8095f0ce002fb4f206e9843
function [machine, hund_turns, count_turns] = orbit_correction(machine, n_mach, param, param_errors, respm, n_sv, n_part, n_pulse, several_turns) % Closed orbit correction algorithm % % INPUTS: % - machine: storage ring model with errors % - n_mach: number of random machines % - param: cell of structs with adjusted ...
github
lnls-fac/MatlabMiddleLayer-master
set_machine.m
.m
MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+injection/+bo/set_machine.m
10,424
utf_8
931a4449c4bebd3c1fb6b5faf22d13aa
function machine_data = set_machine(bo_ring, n_mach) % Setting of random machines, nominal injection parameters (without errors), parameters with errors and the standard deviation to generate errors. % It includes random errors of excitation and alignment of magnets and also % adjustes the vacuum chamber at injection p...