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 | lnls-fac/MatlabMiddleLayer-master | multiple_pulse.m | .m | MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+injection/+bo/multiple_pulse.m | 8,759 | utf_8 | 26ce2fdc29e6a25431e8dc58496b9c9c | 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 | bpm_quality_bba.m | .m | MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+injection/+si/bpm_quality_bba.m | 2,534 | utf_8 | cd745bfdbdf9757250bca29f67f94385 | function data = bpm_quality_bba(stat_bba, n_mach)
bpm_bom_x = zeros(n_mach, 160);
bpm_bom_y = zeros(n_mach, 160);
bpm_ruim_x = zeros(n_mach, 160);
bpm_ruim_y = zeros(n_mach, 160);
for i = 1:n_mach
dcsv(i, :, :) = stat_bba{i}.decrease_value;
dcsvx(i, :) = dcsv(i, :, 1);
dcsvy(i, :) = dcsv(i, :, 2);
re... |
github | lnls-fac/MatlabMiddleLayer-master | set_machine.m | .m | MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+injection/+si/set_machine.m | 12,351 | utf_8 | 5ba0d6ff49a6b07d871bdfb3e494e54a | function machine_data = set_machine(si_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... |
github | lnls-fac/MatlabMiddleLayer-master | pso.m | .m | MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+injection/+si/pso.m | 2,540 | utf_8 | ae1e62124a5b649545f9dc8e228a0059 | function gbest = pso(dim, npart, niter, target, conv)
% sirius_commis.common.initializations();
w = 0.7984;
c1 = 1.49618;
c2 = c1;
lim = 1;
x = linspace(-lim, lim);
y = linspace(-lim, lim);
[X, Y] = meshgrid(x, y);
Z = X.^4 - X.^2 + Y.^4 - Y.^2;
% Z = (1.5 - X + X .* Y... |
github | lnls-fac/MatlabMiddleLayer-master | pso_run.m | .m | MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+injection/+si/pso_run.m | 4,724 | utf_8 | 52d910b4cbb70123485667bd214700d4 | function param = pso_run(machine, param, param_errors, n_part, n_pulse, nswarm, niter, target, conv)
w = 0.7984; % Inertial Weight
c1 = 1.49618; % Individual Weigth
c2 = c1; % Collective Weight
x_lim = 1e-3;
y_lim = 1e-3;
xl_lim = 10e-3;
yl_lim = 10e-3;
kckr_lim = 10e-3;
d... |
github | lnls-fac/MatlabMiddleLayer-master | multiple_pulse.m | .m | MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+injection/+si/multiple_pulse.m | 11,873 | utf_8 | dc856e01c4ce95adb107417339b9c7c4 | function r_particles_out = multiple_pulse(machine, param, param_errors, n_part, n_pulse, point, kckr, plt, diag, shape)
% Simulation of injection pulses in the storage ring. The starting point is the
% end of injection septum.
%
% INPUTS:
% - machine: cell with ring model which the first point is InjSeptF
% - param: st... |
github | lnls-fac/MatlabMiddleLayer-master | pso.m | .m | MatlabMiddleLayer-master/Release/applications/lnls/+sirius_commis/+linac/pso.m | 3,842 | utf_8 | 95c09d022285ad83d1fefe06183c729f | function [gbest, k, f_best] = pso(dim, npart, niter, X, Y, Z)
% sirius_commis.common.initializations();
w = 0.7984;
c1 = 1.49618;
c2 = c1;
self.c = 299792458; % [m/s]
self.E0 = 0.51099895e6; % [eV]
self.L0_drift = 615e-3; % [m]
self.f = 499.658e6; % [Hz]
self.lambda = self.c/s... |
github | lnls-fac/MatlabMiddleLayer-master | make_plots.m | .m | MatlabMiddleLayer-master/Release/applications/lnls/+multiobjective/make_plots.m | 4,182 | utf_8 | f13acddd2bad348383ae942c97a73380 | function make_plots(re, varargin)
for i=1:nargin-1
if iscell(varargin{i})
legs = varargin{i};
elseif isstruct(varargin{i})
resid_ref = varargin{i};
end
end
if ~exist('resid_ref', 'var')
resid_ref = struct();
end
if ~exist('legs', 'var')
... |
github | lnls-fac/MatlabMiddleLayer-master | naff_cc.m | .m | MatlabMiddleLayer-master/Release/applications/naff/nafflib/naff_cc.m | 699 | utf_8 | 24e7abf1f5853da2ab5cc54c8c32593c | function naff_cc
% cc_all - Compile nafflibrary for Matlab
%
% Modified by Laurent S. Nadolski
% April 6th, 2007
cd_old = pwd;
cd(fileparts(which('naff_cc')))
disp(['Compiling NAFF routines on ', computer,'.'])
% Object files
disp('Compiling: modnaff.c');
mex -I/usr/local/matlab/extern/include -O -c modnaff.c
disp... |
github | lnls-fac/MatlabMiddleLayer-master | showresongui.m | .m | MatlabMiddleLayer-master/Release/applications/naff/naffutils/showresongui.m | 19,645 | utf_8 | 56f681d62dabe2cbf145799f5ece289d | function varargout = showresongui(varargin)
% SHOWRESONGUI M-file for showresongui.fig
% Gui for plotting resonances in a given window
% Can be a standalone application or called from another gui
%
% If varargin is not void then it has to be a structure with a fieldname
% 'figure1' containing a handles to a figure... |
github | lnls-fac/MatlabMiddleLayer-master | datalabel.m | .m | MatlabMiddleLayer-master/Release/applications/naff/naffutils/datalabel.m | 7,096 | utf_8 | b01af591e908e68cc83e39b0c1f47dea | function datalabel(state,marker_color);
%datalabel Interactive labeling of data points on a plot
% datalabel with no arguments toggles the data tip state
% datalabel ON turns data tips on for the current figure
% datalabel OFF turns data tips off for the current figure
% datalabel('ON',S), where S is a ch... |
github | lnls-fac/MatlabMiddleLayer-master | reson.m | .m | MatlabMiddleLayer-master/Release/applications/naff/naffutils/reson.m | 2,955 | utf_8 | c3ccf9f207b6f591ffa660a24f85db1b | function [k, tab]=reson(ordre,period,fen,ax,Tag)
% reson(ordre, period, fen, ax, Tag)
% Recherche des droites de resonance a x + b y = c
% passant dans la fenetre [x1 x2 y1 y2]
% Ordre de la resonance |a| + |b|
% Critere de recherche c = period * entie
% eg:
% Soleil
% [k, tab] = reson(4,1,[18 19 10 11])
%
% ALS
% [k, ... |
github | lnls-fac/MatlabMiddleLayer-master | Calc_Tous.m | .m | MatlabMiddleLayer-master/Release/applications/naff/naffutils/touscheklifetime/Calc_Tous.m | 3,973 | utf_8 | 704ec3d70a7098f34f3d59fdfdf17be0 | %function [Tous,Tousp,Tousn]=Calc_Tous(file,linlat,sigmas)
%Calc_Tous - Compute Touschek liftetime based on the energy acceptance
%computed by Tracy2
%
% Integration method : Simpson (choix de BETA)
% NB : A modifier si variation rapide de la duree de vie.
%
% External function used: C(xi) standard function
%
% INP... |
github | lnls-fac/MatlabMiddleLayer-master | Calc_Tous4indus.m | .m | MatlabMiddleLayer-master/Release/applications/naff/naffutils/touscheklifetime/Calc_Tous4indus.m | 3,854 | utf_8 | 847d8fd4a3327b914fa2a7702178d6c2 | %function [Tous,Tousp,Tousn]=Calc_Tous(file,linlat,sigmas)
%Calc_Tous - Compute Touschek liftetime based on the energy acceptance
%computed by Tracy2
%
% Integration method : Simpson (choix de BETA)
% NB : A modifier si variation rapide de la duree de vie.
%
% External function used: C(xi) standard function
%
% INP... |
github | lnls-fac/MatlabMiddleLayer-master | view_ui.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/view_ui.m | 7,759 | utf_8 | 100afde361b6d6527a6adadc386cf1ae | function varargout = view_ui(action,figHandle)
% Used by XMLTREE/VIEW
% FORMAT varargout = view_ui(action)
%
% action - string
%_______________________________________________________________________
%
% Callback manager of xmltree-method view
%_______________________________________________________________________
% ... |
github | lnls-fac/MatlabMiddleLayer-master | struct2xml.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/struct2xml.m | 2,636 | utf_8 | a4523719ae21bb51ebd97214169cd7fc | function tree = struct2xml(s,rootname)
%STRUCT2XML Convert structure to an XML tree object and specify its root name
% TREE = STRUCT2XML(S,ROOTNAME) converts the structure S into an XML
% representation TREE (an XMLTree object) with ROOTNAME as the root tag, if
% provided. Only conventional objects (char, double,... |
github | lnls-fac/MatlabMiddleLayer-master | delete.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/@xmltree/delete.m | 1,062 | utf_8 | 3d4e3ea2ee3b6465070509309e6064c2 | function tree = delete(tree,uid)
% XMLTREE/DELETE Delete (delete a subtree given its UID)
%
% tree - XMLTree object
% uid - array of UID's of subtrees to be deleted
%_______________________________________________________________________
%
% Delete a subtree given its UID
% The tree parameter must be in inp... |
github | lnls-fac/MatlabMiddleLayer-master | save.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/@xmltree/save.m | 2,988 | utf_8 | dd13baf0542fc00299edcaaa03ddf719 | function save(tree, filename)
% XMLTREE/SAVE Save an XML tree in an XML file
% FORMAT save(tree,filename)
%
% tree - XMLTree
% filename - XML output filename
%_______________________________________________________________________
%
% Convert an XML tree into a well-formed XML string and write it into
% a file or d... |
github | lnls-fac/MatlabMiddleLayer-master | branch.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/@xmltree/branch.m | 1,465 | utf_8 | f9fcdbd88e225cdfc499733a2854dc93 | function subtree = branch(tree,uid)
% XMLTREE/BRANCH Branch Method
% FORMAT uid = parent(tree,uid)
%
% tree - XMLTree object
% uid - UID of the root element of the subtree
% subtree - XMLTree object (a subtree from tree)
%_______________________________________________________________________
%
% Return a subtr... |
github | lnls-fac/MatlabMiddleLayer-master | flush.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/@xmltree/flush.m | 1,271 | utf_8 | 96e2fc9e3b1f4af1a63337f8aaf4e40f | function tree = flush(tree,uid)
% XMLTREE/FLUSH Flush (Clear a subtree given its UID)
%
% tree - XMLTree object
% uid - array of UID's of subtrees to be cleared
% Default is root
%_______________________________________________________________________
%
% Clear a subtree given its UID (remove al... |
github | lnls-fac/MatlabMiddleLayer-master | copy.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/@xmltree/copy.m | 1,497 | utf_8 | 5afe1fb7338fdafff4202e08838794e1 | function tree = copy(tree,subuid,uid)
% XMLTREE/COPY Copy Method (copy a subtree in another branch)
% FORMAT tree = copy(tree,subuid,uid)
%
% tree - XMLTree object
% subuid - UID of the subtree to copy
% uid - UID of the element where the subtree must be duplicated
%______________________________________... |
github | lnls-fac/MatlabMiddleLayer-master | convert.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/@xmltree/convert.m | 3,929 | utf_8 | 6247f0512cca7b09eccc0414b0e4d93d | function s = convert(tree,uid)
% XMLTREE/CONVERT Converter an XML tree in a Matlab structure
%
% tree - XMLTree object
% uid - uid of the root of the subtree, if provided.
% Default is root
% s - converted structure
%_______________________________________________________________________... |
github | lnls-fac/MatlabMiddleLayer-master | find.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/@xmltree/find.m | 5,146 | utf_8 | 1e2038bcaac9fe80c3213b6c35c7ee5d | function list = find(varargin)
% XMLTREE/FIND Find elements in a tree with specified characteristics
% FORMAT list = find(varargin)
%
% tree - XMLTree object
% xpath - string path with specific grammar (XPath)
% uid - lists of root uid's
% parameter/value - pair of pattern
% list - list of uid's of matched elements... |
github | lnls-fac/MatlabMiddleLayer-master | view.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/@xmltree/view.m | 5,879 | utf_8 | b26972066a91937d42a5bb86239b92e4 | function view(tree)
% XMLTREE/VIEW View Method
% FORMAT view(tree)
%
% tree - XMLTree object
%_______________________________________________________________________
%
% Display an XML tree in a graphical interface
%_______________________________________________________________________
% @(#)view.m ... |
github | lnls-fac/MatlabMiddleLayer-master | xml_parser.m | .m | MatlabMiddleLayer-master/Release/applications/xml/xmltree/@xmltree/private/xml_parser.m | 14,539 | utf_8 | ec515d60b28f97efaffd2fdfc31b42d4 | function tree = xml_parser(filename)
% XML (eXtensible Markup Language) Processor
% FORMAT tree = xml_parser(filename)
%
% filename - XML file to parse
% tree - tree structure corresponding to the XML file
%_______________________________________________________________________
%
% xml_parser.m is an XML 1.0 (http:... |
github | lnls-fac/MatlabMiddleLayer-master | xml_tests.m | .m | MatlabMiddleLayer-master/Release/applications/xml/geodise/xml_tests.m | 8,250 | utf_8 | a8ad7086277fb0c0f6b29f87b512680a | function toolbox_test
% function toolbox_test
%
% This function is used to test the XML Toolbox for Matlab.
%
% Copyright (C) 2002-2005, University of Southampton
% Author: Dr Marc Molinari <m.molinari@soton.ac.uk>
% $Revision: 1.8 $ $Date: 2005/04/29 18:05:03 $ $Tag$
INFO = ver('Matlab');
VER = str2num(I... |
github | lnls-fac/MatlabMiddleLayer-master | mml2edm.m | .m | MatlabMiddleLayer-master/Release/applications/EDM/mml2edm.m | 17,706 | utf_8 | 6e43fbed903cc092c435c7b2f10241a6 | function [xmax, ymax, TitleBar]= mml2edm(Family, varargin)
if nargin < 1
error('Family input must exist');
end
% Initialize
OnSleepTime = .1;
xBorder = 3;
yBorder = 2;
yHeight = 20;
BMWidth = 30;
BCWidth = 70;
MonitorWidth = 70;
ControlWidth = 70;
CommonNameWidth = [];
% Inputs and defaults... |
github | lnls-fac/MatlabMiddleLayer-master | zoomfixticks.m | .m | MatlabMiddleLayer-master/Release/applications/common/zoomfixticks.m | 4,026 | utf_8 | 6a0dbad1ad3d8c7730d9450a15772737 | function zoomfixticks(fig,method,varargin)
%ZOOMFIXTICKS - Allows zoom to work on a figure whose AXES tick labels are manually set
% ZOOMFIXTICKS(FIG) operates on the figure with handle FIG.
% ZOOMFIXTICKS(AX) operates on the figure with child AXES handle AX.
% ZOOMFIXTICKS with no arguments operates on the c... |
github | lnls-fac/MatlabMiddleLayer-master | screensizecm.m | .m | MatlabMiddleLayer-master/Release/applications/common/screensizecm.m | 438 | utf_8 | ed9ca7162b7f2286c04ffc24fbea9f54 | %==========================================================
function varargout = screensizecm
%SCREENSIZECM - Determines size of user screen in units of cm
%
% Written by J. Corbett
h = findobj('Type', 'root');
units=get(h,'Units');
set(h, 'Units', 'centimeters');
screen_position = get(findobj('Type', 'roo... |
github | lnls-fac/MatlabMiddleLayer-master | magnify.m | .m | MatlabMiddleLayer-master/Release/applications/common/magnify.m | 4,227 | utf_8 | c93a006bd459d9bc34cdfe344f31ad71 | function magnify(f1)
%
%magnify(f1)
%
% Figure creates a magnification box when under the mouse
% position when a button is pressed. Press '+'/'-' while
% button pressed to increase/decrease magnification. Press
% '>'/'<' while button pressed to increase/decrease box size.
% Hold 'Ctrl' while clicking to ... |
github | lnls-fac/MatlabMiddleLayer-master | getdates.m | .m | MatlabMiddleLayer-master/Release/applications/common/getdates.m | 22,206 | utf_8 | 10d558d626a43cadd6745637507769be | function [varargout] = getdates(startdate, enddate, varargin)
% 'GETDATES' RETURNS THE DAYS BETWEEN TWO DATES USING THE GREGORIAN
% CALENDAR SYSTEM AND CAN FILTER RESULTS BASED ON DAY AND DATE INCLUSION OR
% EXCLUSION CRITERIA.
%
% VARARGOUT = getdates(STARTDATE, ENDDATE, VARARGIN)
%
% STARTDATE input may be ... |
github | lnls-fac/MatlabMiddleLayer-master | tablegui.m | .m | MatlabMiddleLayer-master/Release/applications/common/tablegui.m | 18,676 | utf_8 | 2979516ad816c6490e23bf087c001921 | function out = tableGUI(varargin)
% TABLEGUI - Spreadsheet like display and edition of a generic 2D array. By generic it is
% mean that the array can be a numeric MxN matrix or a MxN cell array (with mixed
% number and text strings). This function imitates the table cells with edit boxes
% which may become ... |
github | lnls-fac/MatlabMiddleLayer-master | datalabel.m | .m | MatlabMiddleLayer-master/Release/applications/common/datalabel.m | 7,308 | utf_8 | 7fc0b95b390d2d04823e7abee014152d | function datalabel(state,marker_color);
%DATALABEL - Interactive labeling of data points on a plot
% datalabel with no arguments toggles the data tip state
% datalabel ON turns data tips on for the current figure
% datalabel OFF turns data tips off for the current figure
% datalabel('ON',S), where S is a c... |
github | lnls-fac/MatlabMiddleLayer-master | axisfn.m | .m | MatlabMiddleLayer-master/Release/applications/common/axisfn.m | 12,362 | utf_8 | fd62ca29fc6e9c7cb82a7bb8cdf98e37 | function Err = axisfn(action, AxesHandle, ResizeFigHandle)
%AXISFN - Switchyard function for axisgui
% Error = axisfn(action, AxesHandle, ResizeFigHandle)
%
% Calls:
% Called by: axisgui, axismenu, payoff
%
% Written by Greg Portmann (May 1997)
Err = 0;
if nargin < 2
AxesHandle = get(gcbf,'User... |
github | lnls-fac/MatlabMiddleLayer-master | randraw.m | .m | MatlabMiddleLayer-master/Release/applications/common/randraw.m | 214,966 | utf_8 | 87e6f3cabd98d33e12f5180d12b6f189 | function varargout = randraw(distribName, distribParams, varargin)
%RANDRAW - EFFICIENT RANDOM VARIATES GENERATOR
%
% See alphabetical list of the supported distributions below (over 50 distributions)
%
% 1) randraw
% presents general help.
% 2) randraw( distribName )
% presents help f... |
github | lnls-fac/MatlabMiddleLayer-master | logindlg.m | .m | MatlabMiddleLayer-master/Release/applications/common/logindlg.m | 5,452 | utf_8 | e019e878ce575ac55a43beb82c95ddf3 | function [varargout]=logindlg(Title, LoginName)
%LOGINDLG - Get the login name and password from a dialog box
% [Login, Password] = logindlg(Title)
%
% Author: Jeremy Smith
% Date: September 24, 2005
% Version: 1.1
% Tested on: Matlab 7.0.4.365 (R14) Service Pack 2
% Description: custom login dialog because Matla... |
github | lnls-fac/MatlabMiddleLayer-master | gtrack.m | .m | MatlabMiddleLayer-master/Release/applications/common/gtrack.m | 2,834 | utf_8 | a934e1f3b1419aaa920b6ce2daf395f0 | function gtrack(select)
%GTRACK Track mouse position and show coordinates in figure title.
%
% GTRACK Activates GTRACK. Once it is active the mouse position is
% constantly tracked and printed on the figure title. A left-click will
% print the coordinates in the command line and store them in clickData.
% GTRACK OFF or... |
github | lnls-fac/MatlabMiddleLayer-master | look4.m | .m | MatlabMiddleLayer-master/Release/applications/common/look4.m | 62,864 | utf_8 | abf4795f556b6e8476e35e31409497a6 | function varargout = look4(varargin)
%LOOK4 Quick-search M-files with keywords using a database.
% LOOK4 ABC XYZ ... looks through a database of help files (H1 lines
% in m-files) for keywords ABC, XYZ, ... There can be as many keywords
% as desired. For all files in which a match occurs, the H1 line is
% ... |
github | lnls-fac/MatlabMiddleLayer-master | subfuns.m | .m | MatlabMiddleLayer-master/Release/applications/common/subfuns.m | 5,418 | utf_8 | 7811e7a151898ce03691254aafaa5b16 | function SubFuns(mFile)
%SUBFUNS lists all function declaration lines in specified MFILE.
% SUBFUNS(MFILE) displays list to Command Window.
%
%Example:
% SubFuns SubFuns
%
%Note:
% This utility uses both subfunctions and a nested function, both of
% which are supported.
%
%See also FUNCTION.
% C... |
github | lnls-fac/MatlabMiddleLayer-master | curlim.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/curlim.m | 956 | utf_8 | 56cafa560171b28244d7cd6e6f0d124b | %==========================================================
function varargout = curlim(varargin)
%==========================================================
%check to see if element values are within limit
%varargin contains arrays
%1. delta (change in currents) COMPRESSED
%2 act (actual... |
github | lnls-fac/MatlabMiddleLayer-master | bpminit_orb.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/bpminit_orb.m | 2,042 | utf_8 | 51d028042da4bd4f8359558f7ff1c618 | %=============================================================
function [varargout] = BPMInit_Orb(varargin)
%=============================================================
%Initialize electron BPM data
%BPM=BPMInit_Orb(BPM);
BPM=varargin{1};
%horizontal plane ***
BPM(1).AOFamily='BPMx';
ntbpm=size(BPM(1).nam... |
github | lnls-fac/MatlabMiddleLayer-master | getcornames.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/getcornames.m | 393 | utf_8 | 1a006bfaef021016def5b4f513c67775 | %=============================================================
function [varargout] = getcornames
%=============================================================
%Return COR names in varargout{1}
families={'HCM'; 'VCM'};
for k=1:2
family=families{k};
cor(k).name=getfamilydata(family,'CommonNames');
... |
github | lnls-fac/MatlabMiddleLayer-master | screensizecm.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/screensizecm.m | 450 | utf_8 | e361be6d2fc0785c328a974ab06b09bc | %==========================================================
function varargout = screensizecm
%==========================================================
%determine size of user screen in units of cm
h = findobj('Type', 'root');
units=get(h,'Units');
set(h, 'Units', 'centimeters');
screen_position = get(findobj(... |
github | lnls-fac/MatlabMiddleLayer-master | rload.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/rload.m | 7,335 | utf_8 | 5688525ae6dff98f585af88a3830b766 | function varargout = rload(action, varargin)
%enter real numbers into field of input structure
switch action
%...GenFig//ExecPar
%...DelFigure
%...getWord//GetElement//num
%=============================================================
case 'GenFig'
%=============================================================
%... |
github | lnls-fac/MatlabMiddleLayer-master | blinit_orb.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/blinit_orb.m | 2,086 | utf_8 | 70eb22529cd138399b1b2919a994cfa7 | %=============================================================
function [varargout] = BLInit_Orb(varargin)
%=============================================================
%Append fields to input structure for ORBIT program
%Initialize photon beamline data
%BL=BLInit_Orb(BL);
BL=varargin{1};
%horizontal
BL(1).i... |
github | lnls-fac/MatlabMiddleLayer-master | getbpmnames.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/getbpmnames.m | 398 | utf_8 | 15cc9c60a62bc7135343f821833b5569 | %=============================================================
function [varargout] = getbpmnames
%=============================================================
%Return BPM names in varargout{1}
families={'BPMx'; 'BPMy'};
for k=1:2
family=families{k};
bpm(k).name=getfamilydata(family,'CommonNames');
... |
github | lnls-fac/MatlabMiddleLayer-master | bpmgui.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/bpmgui.m | 29,768 | utf_8 | 69ae6a01ac4f52d2eedf012a5a4845df | %=============================================================
function varargout = bpmgui(action, varargin)
%=============================================================
% bpmgui controls orbit manipulation and plotting
%graphics handles
global BPM BL COR RSP SYS
orbfig = findobj(0,'tag','orbfig');
plane=SYS.... |
github | lnls-fac/MatlabMiddleLayer-master | respgui.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/respgui.m | 24,520 | utf_8 | af5b29a851dc52dd309a576c35b4180f | %=============================================================
function varargout = respgui(action, varargin)
%=============================================================
%globals
global BPM BL COR RSP SYS
orbfig = findobj(0,'tag','orbfig');
plane=SYS.plane;
%RSP=getappdata(0,'RSP');
%...PlotSVD_Init//Plo... |
github | lnls-fac/MatlabMiddleLayer-master | toggle.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/toggle.m | 8,216 | utf_8 | a46f9c5ab7cae6988cfca7abc7cb8357 | function varargout = toggle(action, varargin)
switch action
%toggle(''GenFig'',names,istatus,iavail,ifit,title,templisttag];
%=============================================================
case 'GenFig'
%=============================================================
% Generates the figure which holds
% Radio buttons f... |
github | lnls-fac/MatlabMiddleLayer-master | sortbpms.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/sortbpms.m | 3,599 | utf_8 | ded43ed7347c74afb0a356ea22d0d47d | function varargout=SortBPMss(varargin)
% SortBPMss compares vectors for:
%(1) available electronically (BPM.status)
%(2) available in reference orbit (BPM.iref)
%(3) available in response matrix (RSP.ib)
%*** BPM.avail requires reference, response matrix, status
BPM=varargin{1};
RSP=varargin{2};
% [C,IA,IB... |
github | lnls-fac/MatlabMiddleLayer-master | readwrite.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/readwrite.m | 11,908 | utf_8 | 5aefc5ebba49c4a14efa875773c226e0 | %=============================================================
function varargout = readwrite(action, varargin)
%=============================================================
% readwrite supplies a switchyard of routines
% to read and write data files in SPEAR formats
%WriteReference
%ReadDispersion
%ReadBRespon... |
github | lnls-fac/MatlabMiddleLayer-master | readreference.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/readreference.m | 845 | utf_8 | 76ca2a28633b9a6c328de57cbe40c973 | %=============================================================
function varargout=ReadReference(varargin)
%=============================================================
%reads a reference orbit from file in VSPEAR11 format
filename=varargin(1); filename=char(filename);
auto =varargin(2); auto=char(auto);
... |
github | lnls-fac/MatlabMiddleLayer-master | writereference.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/writereference.m | 1,096 | utf_8 | fe74ba5b1ca673ff5fd3da3e8f88d607 | %=============================================================
function varargout=WriteReference(varargin)
%=============================================================
% write reference orbit file in format of spear orbit program
filename=varargin(1); filename=char(filename);
comment =varargin(2); comment=ch... |
github | lnls-fac/MatlabMiddleLayer-master | reforb2zero.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/reforb2zero.m | 616 | utf_8 | 175fc8cf613a83006b2b6a05c998e114 | %=============================================================
function varargout=RefOrb2Zero(varargin)
%=============================================================
%load zeros into reference orbit and associated fields
bpm =varargin{1};
for ii=1:2 %horizontal and vertical
ntbpm=lengt... |
github | lnls-fac/MatlabMiddleLayer-master | orbgui.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/orbgui.m | 80,626 | utf_8 | e3cde36ee99799989d91a9fe49bf862d | %=============================================================
function varargout = orbgui(action, varargin)
%=============================================================
% orbgui contains routines to set up the main orbit control panel
% for the 'orbit' program
%'case' routines contained in orbgui switchyard a... |
github | lnls-fac/MatlabMiddleLayer-master | corinit_orb.m | .m | MatlabMiddleLayer-master/Release/applications/orbit/lib/corinit_orb.m | 2,618 | utf_8 | e0620fc87e81d34349d3b0e5d37817f6 | %=============================================================
function [varargout] = CORInit_Orb(varargin)
%=============================================================
%Initialize COR structure for SPEAR ORBIT program
%COR=CORInit_Orb(COR);
COR=varargin{1};
%horizontal
COR(1).AOFamily='HCM';
ntxcor=siz... |
github | lnls-fac/MatlabMiddleLayer-master | tbwrite.m | .m | MatlabMiddleLayer-master/Release/applications/database/mym/utilities/tbwrite.m | 7,008 | utf_8 | 1152b72b6abc4a0ab2e99e658fade6b0 | function tbwrite(table_tbwrite,vecs_tbwrite,varargin)
% TBWRITE Write to a MySQL table
% INPUTS : TABLE - table name, string
% VECS - list of input vectors, (m x 1) or (1 x m) cell array
% COLS - list of output columns, (m x 1) or (1 x m) cell array
% (optional, ... |
github | lnls-fac/MatlabMiddleLayer-master | tbread.m | .m | MatlabMiddleLayer-master/Release/applications/database/mym/utilities/tbread.m | 4,716 | utf_8 | 02a308948ddf839d9fd512f0a104a611 | function tbread(table_tbread,varargin)
% TBREAD Read from a MySQL table
% INPUTS : TABLE - table name, string
% VECS - list of output vectors, (m x 1) or (1 x m) cell array
% (optional, COLS converted to lower case if VECS = {} or omitted
% but COLS is specifie... |
github | lnls-fac/MatlabMiddleLayer-master | itemNew.m | .m | MatlabMiddleLayer-master/Release/applications/database/mym/dbm/@FilteredDB/itemNew.m | 622 | utf_8 | 3e6ef1b66d94246f01cddbe8886657bb | function id = itemNew(a_f, a_item, a_tag, a_parent, a_fct)
if numel(a_parent)~=nParents(a_f)
error(['there should have ' num2str(nParents(a_f)) ' parents'])
end
if ~isempty(a_item)
error('the input ''item'' should be empty')
end
if nargin==4
fct = @(item, img, varargin)composeFcts(varargin, img);
else
fct = @... |
github | lnls-fac/MatlabMiddleLayer-master | setorbitbumpgui.m | .m | MatlabMiddleLayer-master/Release/mml/setorbitbumpgui.m | 27,500 | utf_8 | e77821ef0c8cde7eb21cc8771249b173 | function varargout = setorbitbumpgui(varargin)
%SETORBITBUMPGUI M-file for setorbitbumpgui.fig
% SETORBITBUMPGUI, by itself, creates a new SETORBITBUMPGUI or raises the existing
% singleton*.
%
% H = SETORBITBUMPGUI returns the handle to a new SETORBITBUMPGUI or the handle to
% the existing si... |
github | lnls-fac/MatlabMiddleLayer-master | setpathmml.m | .m | MatlabMiddleLayer-master/Release/mml/setpathmml.m | 14,541 | utf_8 | 05e3a9e5a07d4fdc64493d0116ff8410 | function [MachineName, SubMachineName, LinkFlag, MMLROOT] = setpathmml(varargin)
%SETPATHMML - Initialize the Matlab MiddleLayer (MML) path
% [MachineName, SubMachineName, OnlineLinkMethod, MMLROOT] = setpathmml(MachineName, SubMachineName, MachineType, OnlineLinkMethod, MMLROOT)
%
% INPUTS
% 1. MachineName -... |
github | lnls-fac/MatlabMiddleLayer-master | setorbitgui.m | .m | MatlabMiddleLayer-master/Release/mml/setorbitgui.m | 56,271 | utf_8 | bf2e462e76ee0e6d1ce9e99d7e6bea56 | function varargout = setorbitgui(varargin)
%SETORBITGUI - Orbit correction GUI
%
% See also setorbit, orbitcorrectionmethods, setorbitdefault, setorbitbump
% Written by Jacob Pachikara and Greg Portmann
% To do:
% Stop blinking of legends during orbit feedback
% Add ID tune feedforward, etc to setorbit? (OCS.PreC... |
github | lnls-fac/MatlabMiddleLayer-master | mmlviewer.m | .m | MatlabMiddleLayer-master/Release/mml/mmlviewer.m | 29,364 | utf_8 | bd3dc89abe73dc5931322498b1db22a4 | function varargout = mmlviewer(varargin)
% MMLVIEWER M-file for mmlviewer.fig
% MMLVIEWER, by itself, creates a new MMLVIEWER or raises the existing
% singleton*.
%
% H = MMLVIEWER returns the handle to a new MMLVIEWER or the handle to
% the existing singleton*.
%
% MMLVIEWER('CALLBACK'... |
github | lnls-fac/MatlabMiddleLayer-master | viewfamily.m | .m | MatlabMiddleLayer-master/Release/mml/viewfamily.m | 12,772 | utf_8 | 07b132a3db73144afb3c88b804c6bd2a | function viewfamily(varargin)
%VEIWFAMILY - View all the fields for a family
%
% viewfamily
% viewfamily(Family)
%
% See also plotfamily, machineconfig
% Written by Greg Portmann
% Run initialization if it has not been run (like standalone)
checkforao;
for i = length(varargin):-1:1
if isstr... |
github | lnls-fac/MatlabMiddleLayer-master | machineconfig.m | .m | MatlabMiddleLayer-master/Release/mml/machineconfig.m | 29,937 | utf_8 | dc8a85cace570af9cc7a4023c9d14c56 | function machineconfig(varargin)
%MACHINECONFIG - GUI for setmachineconfig
%
% See also plotfamily, viewfamily
% Written by Greg Portmann
% Run initialization if it has not been run (like standalone)
checkforao;
FileName = 'Golden';
for i = length(varargin):-1:1
if isstruct(varargin{i})
... |
github | lnls-fac/MatlabMiddleLayer-master | getphysdata.m | .m | MatlabMiddleLayer-master/Release/mml/getphysdata.m | 7,261 | utf_8 | c36cbd873ba4c535ba0d9dbd58123c86 | function [Data, iNotFound] = getphysdata(Family, Field, DeviceList)
%GETPHYSDATA - Gets physics data
% Data = getphysdata(Family, Field, DeviceList)
% Data = getphysdata(Family, Field)
% Data = getphysdata(DataStruct, Field)
% Data = getphysdata(Family)
% Data = getphysdata
%
% INPUTS
% 1. Family = Fami... |
github | lnls-fac/MatlabMiddleLayer-master | getmachineconfig.m | .m | MatlabMiddleLayer-master/Release/mml/getmachineconfig.m | 14,033 | utf_8 | 0fa2e5f26491c657a69195ac0cb59ca6 | function [ConfigSetpoint, ConfigMonitor, FileName, MachineConfigStructure] = getmachineconfig(varargin)
%GETMACHINECONFIG - Returns or saves to file the present storage ring setpoints and monitors
% [ConfigSetpoint, ConfigMonitor, FileName, MachineConfig] = getmachineconfig(Family, FileName, ExtraInputs ...)
% [C... |
github | lnls-fac/MatlabMiddleLayer-master | getpv.m | .m | MatlabMiddleLayer-master/Release/mml/getpv.m | 60,114 | utf_8 | 954bfe7e4a87e1b5a78dfd4493f559f4 | function [AM, tout, DataTime, ErrorFlag] = getpv(varargin)
%GETPV - Returns a variable from the online system or the model
%
% FamilyName/DeviceList Method
% [AM, tout, DataTime] = getpv(Family, Field, DeviceList, t, FreshDataFlag, TimeOutPeriod)
%
% Data Structure
% [AM, tout, DataTime] = getpv(DataStructur... |
github | lnls-fac/MatlabMiddleLayer-master | setorbit.m | .m | MatlabMiddleLayer-master/Release/mml/setorbit.m | 61,532 | utf_8 | a432a94d61f6e6cbf86031952a4ffe5b | function [OCS, OCS0, V, S, ErrorFlag] = setorbit(varargin)
%SETORBIT - Orbit correction function
% Family/DeviceList method:
% [CM, OCS0, V, Svalues] = setorbit(GoalOrbit, BPMFamily, BPMDevList, CMFamily, CMDevList, NIter, SVDIndex, BPMWeight);
%
% Data structure method:
% [CM, OCS0, V, Svalues] = setorbit(GoalOrbi... |
github | lnls-fac/MatlabMiddleLayer-master | getenergy.m | .m | MatlabMiddleLayer-master/Release/mml/getenergy.m | 2,972 | utf_8 | e1b03d587ca2985e8fc1d93048c3ad71 | function [Energy, HCMEnergy] = getenergy(varargin)
%GETENERGY - Returns the beam energy base on the bend magnet
% [Energy, HCMEnergy] = getenergy(Keyword)
%
% Keyword can be:
% 'Production' - Energy of the production lattice
% 'Injection' - Energy of the injection lattice
% 'Model' or Simul... |
github | lnls-fac/MatlabMiddleLayer-master | quadcenter.m | .m | MatlabMiddleLayer-master/Release/mml/quadcenter.m | 38,241 | utf_8 | 2d9444028fc450dba8895d22cb0df3df | function [QMS1, QMS2] = quadcenter(QuadFamily, QuadDev, XYPlane, FigureHandle)
%QUADCENTER - Measure the magnet center of a quadrupole magnet
% [QMS1, QMS2] = quadcenter(QuadFamily, QuadDev, XYPlane, FigureHandle)
% or
% [QMS1, QMS2] = quadcenter(QMSstructure, FigureHandle)
%
% Finds the ce... |
github | lnls-fac/MatlabMiddleLayer-master | plotfamily.m | .m | MatlabMiddleLayer-master/Release/mml/plotfamily.m | 136,089 | utf_8 | 602d5cf2c0bab154638e7bec7d742313 | function varargout = plotfamily(varargin)
%PLOTFAMILY - Plots by middle layer family name
%
% To restrict the families to certain MemberOf group use:
% plotfamily MemberName
%
% FACTS
% 1. Clicking on a data point in the plot will select the device in the
% listbox. Clicking in the listbox will allow f... |
github | lnls-fac/MatlabMiddleLayer-master | monbpmpsd.m | .m | MatlabMiddleLayer-master/Release/mml/monbpmpsd.m | 7,229 | utf_8 | 3bb0e9f1f260b924023930453e70b465 | function [Pdd, f, Drms, Pdd_int] = monbpmpsd(varargin)
%BPM_PSD - Computes the power spectral density of orbit data
% [Pdd, f, Drms, Pdd_int] = monbpmpsd(Data, DeviceList, LineColor)
%
% INPUTS
% 1. Data
% 2. DeviceList
% 3. LineColor - {Default: 'b'}
% If input 2 exists or no output exists, then data ... |
github | lnls-fac/MatlabMiddleLayer-master | setpv.m | .m | MatlabMiddleLayer-master/Release/mml/setpv.m | 50,529 | utf_8 | 2284f9ad07882b33dad6dedc7fc673c5 | function ErrorFlag = setpv(varargin)
%SETPV - Setpoint change of the online system or model
%
% FamilyName Method
% ErrorFlag = setpv(Family, Field, NewSP, DeviceList, WaitFlag)
%
% Data Structure
% ErrorFlag = setpv(DataStructure, WaitFlag)
%
% ChannelName Method
% ErrorFlag = setpv(ChannelName, NewSP,... |
github | lnls-fac/MatlabMiddleLayer-master | loadorbit.m | .m | MatlabMiddleLayer-master/Release/mml/loadorbit.m | 7,588 | utf_8 | 0b9872aa08231982daf183f4a0ccf624 | function varargout = loadorbit(varargin)
%LOADORBIT - Loads orbit by file/directory specification - or - Golden %orbit by default
%[X,Y] = loadorbit(BPMxList,BPMyList,DirSpec,FileName,<'x'/'z'/'b'>,<'struct'>,<'auto'>,)
%
% Inputs:
% 1a. varargin = If varargin contains keyword 'struct' return entire m... |
github | lnls-fac/MatlabMiddleLayer-master | quadcenterfit.m | .m | MatlabMiddleLayer-master/Release/mml/quadcenterfit.m | 13,284 | utf_8 | 23ffcee7456d33ad68a372baa1313678 | function [XOffset, YOffset] = quadcenterfit(varargin)
%QUADCENTERFIT OR BBASEARCH - Model search method to find a quarupole center
%
% This function is under development (Greg Portmann)
% Written by Greg Portmann
global THERING
BPMxFamily = gethbpmfamily;
BPMyFamily = getvbpmfamily;
% Planes to fit
XFlag = 1;
Y... |
github | lnls-fac/MatlabMiddleLayer-master | setphysdata.m | .m | MatlabMiddleLayer-master/Release/mml/setphysdata.m | 10,934 | utf_8 | d35133b8609543db8164f68f8f4e8d18 | function setphysdata(varargin)
%SETPHYSDATA - Set physics data
% For vector inputs:
% setphysdata(Family, Field, Data, DeviceList)
% setphysdata(Family, Field, Data)
%
% For structure inputs:
% setphysdata(DataStruct, Field) % Family, Data, and DeviceList are in DataStruct
% setphysdata(Family, DataStru... |
github | lnls-fac/MatlabMiddleLayer-master | getfamilydata.m | .m | MatlabMiddleLayer-master/Release/mml/getfamilydata.m | 10,471 | utf_8 | 75250cb015a01fb196c426af19611a65 | function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)
%GETFAMILYDATA - Gets data associated with the accelerator control
%
% When getting data from the accelerator object (AO):
% [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)
% [Data, ErrorFlag] = getfamilydata(F... |
github | lnls-fac/MatlabMiddleLayer-master | subsref.m | .m | MatlabMiddleLayer-master/Release/mml/@AccObj/subsref.m | 2,555 | utf_8 | eb7b17a597f4c331441ebeff4552c800 | function d = subsref(DataObj, index)
% SUBSREF - Define field name indexing for AccObj objects
%
% Written by Greg Portmann
if any(size(DataObj) > 1)
% AccObj array
d = DataObj(index.subs{:});
else
d = DataObj;
for i = 1:length(index)
d = subsreflocal(d, index(i));
end
end
... |
github | lnls-fac/MatlabMiddleLayer-master | getpvonline.m | .m | MatlabMiddleLayer-master/Release/mml/links/lnls_link/sirius_link/getpvonline.m | 5,328 | utf_8 | 1334973a3352d9b3e759cf420411aadb | function [AM, tout, DataTime, ErrorFlag] = getpvonline(ChannelNames, varargin)
%GETPVONLINE - Get the online value via EPICS channel access
%
% For DateType = 'Double' or 'Scalar'
% [AM, tout, DataTime, ErrorFlag] = getpvonline(ChannelNames, t)
%
% For DateType = 'String', 'Vector', 'Matrix'
% [AM, tout, DataTime, ... |
github | lnls-fac/MatlabMiddleLayer-master | getpvonline.m | .m | MatlabMiddleLayer-master/Release/mml/links/lnls_link/lnls1_link/getpvonline.m | 5,427 | utf_8 | 45452ebd813058ab7718d75c06f78366 | function [AM, tout, DataTime, ErrorFlag] = getpvonline(ChannelNames, varargin)
%GETPVONLINE - Get the online value via EPICS channel access
%
% For DateType = 'Double' or 'Scalar'
% [AM, tout, DataTime, ErrorFlag] = getpvonline(ChannelNames, t)
%
% For DateType = 'String', 'Vector', 'Matrix'
% [AM, tout, DataTime, ... |
github | lnls-fac/MatlabMiddleLayer-master | getpvonline.m | .m | MatlabMiddleLayer-master/Release/mml/links/lnls_link/ca_matlab/getpvonline.m | 5,475 | utf_8 | 3466439c981543a9af20d328222e6f93 | function [AM, tout, DataTime, ErrorFlag] = getpvonline(ChannelNames, varargin)
%GETPVONLINE - Get the online value via EPICS channel access
%
% For DateType = 'Double' or 'Scalar'
% [AM, tout, DataTime, ErrorFlag] = getpvonline(ChannelNames, t)
%
% For DateType = 'String', 'Vector', 'Matrix'
% [AM, tout, DataTime, ... |
github | lnls-fac/MatlabMiddleLayer-master | ringpara.m | .m | MatlabMiddleLayer-master/Release/mml/at/ringpara.m | 9,594 | utf_8 | 27ec00c33e544ce2fcf9348b2c81e2eb | function rp = ringpara(THERING,varargin)
%rp = ringpara, use global THERING
%rp = ringpara(THERING)
%rp = ringpara(THERING,U0), supply total radiation loss in MeV
%calculate various ring parameters
%(1) The calculation of emittance, mcf, momentum spread, bunch length, damping time, etc
%is more accurate than ats... |
github | lnls-fac/MatlabMiddleLayer-master | drawlattice.m | .m | MatlabMiddleLayer-master/Release/mml/at/drawlattice.m | 15,262 | utf_8 | a93268a89b300533435eaa5bb78b3ba2 | function h = drawlattice(Offset, Scaling, hAxes, Ldraw)
%DRAWLATTICE - Draws the AT lattice to a figure
% h = drawlattice(Offset {0}, Scaling {1}, hAxes {gca}, Ldraw)
%
% h - handle to each element drawn
%
% Programmers Notes
% 1. The AT index is stored in the Userdata of each symbol.
% get(h(i),'Userdata')
% ... |
github | lnls-fac/MatlabMiddleLayer-master | tracy2at.m | .m | MatlabMiddleLayer-master/Release/mml/at/tracy2at.m | 9,018 | utf_8 | 3656e988785634f6f5068fd7aee0bd30 | function FileNameOutput = tracy2at(FileNameInput)
%TRACY2AT - Reads at Tracy lattice file and converts it to AT
if nargin < 1
FileNameInput = uigetfile('*.lat', 'Tracy input file');
end
[fidinput, errmsg] = fopen(FileNameInput,'r');
if fidinput==-1
error('Could not open input file');
end
FileNam... |
github | lnls-fac/MatlabMiddleLayer-master | readmad.m | .m | MatlabMiddleLayer-master/Release/mml/at/readmad.m | 10,240 | utf_8 | 16a8ecac31c6b96323a48592dabc762c | function [ATLATTICE, Twiss] = readmad(FILENAME)
%READMAD reads the file output of MAD commands
% TWISS, STRUCTURE, SURVEY.
%
% READMAD reads the MAD file header to determine the number of elements
% in the lattice, symmetry flag, the number of supperperiods etc.
%
% Then it interprets the entry for each element ... |
github | lnls-fac/MatlabMiddleLayer-master | TuneMovePanel.m | .m | MatlabMiddleLayer-master/Release/mml/at/TuneMovePanel.m | 17,500 | utf_8 | 8590013b822f050f2a91f533553d8a53 | function varargout = TuneMovePanel(varargin)
% TUNEMOVEPANEL M-file for TuneMovePanel.fig
% TUNEMOVEPANEL, by itself, creates a new TUNEMOVEPANEL or raises the existing
% singleton*.
%
% H = TUNEMOVEPANEL returns the handle to a new TUNEMOVEPANEL or the handle to
% the existing singleton*.
%
... |
github | lnls-fac/MatlabMiddleLayer-master | drawlattice2d.m | .m | MatlabMiddleLayer-master/Release/mml/at/drawlattice2d.m | 18,666 | utf_8 | 9b8425434d21fd6c6889db4396e8025a | function h = drawlattice2d(Offset, Scaling, hAxes, Ldraw)
%DRAWLATTICE2D - Draws the AT lattice to a figure
% h = drawlattice2d(Offset {0}, Scaling {1}, hAxes {gca}, Ldraw)
%
% h - handle to each element drawn
%
% Programmers Notes
% 1. The AT index is stored in the Userdata of each symbol.
% get(h(i),'Userdata... |
github | lnls-fac/MatlabMiddleLayer-master | lnls_create_waitbar.m | .m | MatlabMiddleLayer-master/Release/lnls/startup_scripts/lnls_create_waitbar.m | 2,285 | utf_8 | bd6b0d8c203aab8c062956eb51df2450 | function lnls_create_waitbar(label, period, nr_points)
mywaitbar.title = label;
mywaitbar.P = 0;
mywaitbar.nr_points = nr_points;
mywaitbar.C = { ...
'|o-o-o-Oooo----------|'; ...
'|-o-o-o-Oooo---------|'; ...
'|--o-o-o-Oooo--------|'; ...
'|---o-o-o-Oooo-------|'; ...
'|----o-o-o-Oooo---... |
github | lnls-fac/MatlabMiddleLayer-master | symplectic_runge_kutta2.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/misc/symplectic_runge_kutta2.m | 2,980 | utf_8 | bec8c3c5ba5dda99391da1044989426e | function symplectic_runge_kutta2(h);
r.handle = h;
r.betay0 = 3;
r.alfy0 = 0;
r.max_k = 3.0;
r.dipole_rho = 5.003640424877480;
r.dipole_length = 1.7*3^(1/3);
r.line_length = 2.5;
r.nr_elements = 7;
r.length_vector = (r.line_length/r.nr_elements) * ones(1,r.nr_e... |
github | lnls-fac/MatlabMiddleLayer-master | galgomin.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/misc/galgomin.m | 4,812 | utf_8 | 471a221593a6f1b2a49d6550477d7f68 | function galgomin
population1 = create_adam;
population1 = free_expansion(population1, pop_size);
hf1 = figure;
hg1 = figure;
generation = 0;
while true
pause(0);
drawnow;
best1 = get_member(population1, 1);
all_fitness1 = get_all_fitness(population1);
all... |
github | lnls-fac/MatlabMiddleLayer-master | symplectic_runge_kutta3.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/misc/symplectic_runge_kutta3.m | 9,665 | utf_8 | c065529dd166d4e68ee9d255eee15352 | function symplectic_runge_kutta2
r.dipole_length = 1.0;
r.line_length = 3.0;
r.nr_elements = 20;
r.length_vector = (r.line_length/r.nr_elements) * ones(1,r.nr_elements);
r.strength_vector = 0 * ones(1, r.nr_elements);
r.transfer_matrix = calc_line_transfer_matrix(r);
r.chi2
... |
github | lnls-fac/MatlabMiddleLayer-master | symplectic_runge_kutta.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/misc/symplectic_runge_kutta.m | 1,755 | utf_8 | 7101b34fbbb55385a35aa7cb3690c943 | function symplectic_runge_kutta
Lb = 0.5;
L = Lb + 3.5;
npts = 100;
g = 0*ones(1,npts);
k = 0*ones(1,npts);
chi_old = calc_chi(L,npts,k,g);
for i=1:2000000
k_new = new_optics(L,npts,k);
chi_new = calc_chi(L,npts,k_new);
if (chi_new <= chi_old) && optics_is_ok(L,npts,k_new)
... |
github | lnls-fac/MatlabMiddleLayer-master | orbit_correlation_matrix.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/misc/orbit_correlation_matrix.m | 4,338 | utf_8 | db94f9799c774cbc0939372528d862bc | function p = orbit_correlation_matrix(fh_ring, inp)
% LATTICE_ERRORS_ANALYSIS
% Authors: Liu Lin and Ximenes R. Resende @ LNLS
% Date : 2009-12-18
%% Initializations
p = inp;
global THERING;
%% Loads lattice model
fprintf('Loading lattice model ...\n');
THERING = fh_ring();
setradiation('Off');
se... |
github | lnls-fac/MatlabMiddleLayer-master | lnls1_epu_radiation.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/uvx/uvx_epu/lnls1_epu_radiation.m | 1,841 | utf_8 | 0aec3a801a0fdb46b3a73910b3ec946b | function rad = lnls1_epu_radiation(epu, energy)
const = lnls_constants;
% flux density
Np = 56;
echarge = abs(const.q0);
alpha = const.alpha;
dW_W = 0.1/100;
e0 = const.E0/1000;
gamma = energy / e0;
i0 = 0.1;
period = 50;
amplitudes = lnls1_epu_field_amplitude(epu, period);
... |
github | lnls-fac/MatlabMiddleLayer-master | lnls1_epu_calc_field_parameters.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/uvx/uvx_epu/aux_scripts/lnls1_epu_calc_field_parameters.m | 2,554 | utf_8 | 19045773838df1ea3406ac887326f0f2 | function epu_field_data = lnls1_epu_calc_field_parameters
epu_field_data = getappdata(0, 'EPU_FIELD_DATA');
if isempty(epu_field_data) || ~isfield(epu_field_data, 'ring_ref_system')
epu_field_data = lnls1_epu_transf_field_from_bench_to_ring;
end
for i=1:length(epu_field_data)
epu_field_data(i).bx = ... |
github | lnls-fac/MatlabMiddleLayer-master | lnlsasciidb_save_query_data_to_file.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/uvx/LNLSAscIIDB/lnlsasciidb_save_query_data_to_file.m | 1,917 | utf_8 | efe9f5079fc914b3223051c7d6e69d7a | function lnlsasciidb_save_query_data_to_file(query_data_, dbdata)
query_data = query_data_;
if ~isfield(query_data, 'data_file_name'), query_data.data_file_name = 'DATA.m'; end;
if ~isfield(query_data, 'variable_name'), query_data.variable_name = 'DATA'; end;
%fprintf([datestr(now) ': saving query data for db... |
github | lnls-fac/MatlabMiddleLayer-master | lnlsasciidb_query.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/uvx/LNLSAscIIDB/lnlsasciidb_query.m | 5,819 | utf_8 | 6b1ef25abe5ddb592f23670a743dcef3 | function data = lnlsasciidb_query(query_data_)
query_data = query_data_;
def_parms = lnlsasciidb_load_default_parameters;
second_in_datenum = datenum([2010 10 13 0 0 1]) - datenum([2010 10 13 0 0 0]);
% default query parameters and processes query input arguments
if ~isfield(query_data, 'initi_datetime'), ... |
github | lnls-fac/MatlabMiddleLayer-master | lnlsasciidb_get_cast_type.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/uvx/LNLSAscIIDB/lnlsasciidb_get_cast_type.m | 670 | utf_8 | cddf113541799ec68a269c2fa2b0979f | function r = lnlsasciidb_get_cast_type(data, varargin)
def_parms = lnlsasciidb_load_default_parameters;
idx1 = get_value_type_index(data);
if ~isempty(varargin)
idx2 = get_value_type_index(varargin{1});
r = def_parms.value_types{min([idx1 idx2])};
else
r = def_parms.value_types{idx1};
end
... |
github | lnls-fac/MatlabMiddleLayer-master | lnlsasciidb_backup_db_file.m | .m | MatlabMiddleLayer-master/Release/lnls/fac_scripts/uvx/LNLSAscIIDB/lnlsasciidb_backup_db_file.m | 801 | utf_8 | 7963050c900da97179efe820fa8efc40 |
function lnlsasciidb_backup_db_file(db_name)
def_parms = lnlsasciidb_load_default_parameters;
if ~exist(def_parms.ascii_db_backup_path, 'dir'), mkdir(def_parms.ascii_db_backup_path); end
db_file_name = [db_name def_parms.db_ascii_file_ext];
old_path = fullfile(def_parms.ascii_db_path, db_file_name);
new_pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.