A Matlab Middle Layer (MML) for Accelerator Control
A Matlab Middle Layer (MML) for Accelerator Control is a software designed to sit between high-level accelerator control applications in Matlab and the low-level accelerator control System.
The Matlab Middle Layer (MML) software came out of a collaborative effort between Jeff Corbett, Andrei Terebilo, and myself at Spear3. The roots of the middle layer software start at the ALS where Dave Robin and myself (and later Winni Decking, Christoph Steier, Tom Scarvie, Laurent Nadolski) wrote many of the basic physics functions. Well, Dave actually didn't write much code but he did influence and majorly supported ($) the entire software package. Now that the MML is running on many accelerators world wide, there are many authors of the new MML. Many thanks to all the people who have made suggestions, written new functions, and fixed bugs. I look forward more collaborations and I'm curious to see how things morph and improve as we move forward.
If you find any bugs in the software please contact me. I'm trying to make the software as bug free as possible. Also, if you write a new function that would be useful for other accelerators please send it to Jeff Corbett or myself to be included in future releases.
Thanks, Greg and Jeff
Greg Portmann email@example.com 1-510-486-4105
Jeff Corbett firstname.lastname@example.org
List Of MML And LOCO Users
The basic list of MML and LOCO users include for following.
Accelerators distributed with this release (13):
ALBA, ALS, ASP, CLS, Elettra, ELSA, MLS, NSLS2, PLS, Soleil, Spear3, SPS, UMER
Other accelerators that have an MML setup, but not distributed with this release (14):
ASTRID2, BESSY2, Diamond, DSR, CAMD, Indus2, LNLS1, MaxIV, PlS2, Sesame, Sirius, Solaris, SSRF, TPS You will have to contact these machines directly to get their machine directory.
For educational and historical purposes we distribute the MML setup for machines that no longer exist (6):
SLAC B-factor (HER & LER), VUV & Xray (Brookhaven), PLS, TLS
Experimenting with LOCO and/or the MML (2):
Orsay (ThomX), ELI-NP facility in Romania
- The top level MML directory tree is the following.
Matlab MiddelLayer Toolbox (MML) <MMLROOT>\mml <MMLROOT>\mml\online <MMLROOT>\mml\simulators <MMLROOT>\mml\simulators\at <MMLROOT>\mml\simulators\elegant <MMLROOT>\mml\simulators\tracy Machine Directories (using ALS as an example) <MMLROOT>\machine\ALS\Booster <MMLROOT>\machine\ALS\BoosterData <MMLROOT>\machine\ALS\BoosterOpsData <MMLROOT>\machine\ALS\BTS <MMLROOT>\machine\ALS\BTSData <MMLROOT>\machine\ALS\BTSOpsData <MMLROOT>\machine\ALS\LTB <MMLROOT>\machine\ALS\LTBData <MMLROOT>\machine\ALS\LTBOpsData <MMLROOT>\machine\ALS\Ring <MMLROOT>\machine\ALS\RingData <MMLROOT>\machine\ALS\RingOpsData Matlab to control system link libraries <MMLROOT>\online\epics <MMLROOT>\online\mca <MMLROOT>\online\labca <MMLROOT>\online\labca3_5 <MMLROOT>\online\sca <MMLROOT>\online\ucode <MMLROOT>\online\tango Applications <MMLROOT>\applications\common <MMLROOT>\applications\loco <MMLROOT>\applications\orbit <MMLROOT>\applications\database\mym <MMLROOT>\applications\m2html (maybe more) AT - Accelerator Toolbox <MMLROOT>\simulators <MMLROOT>\simulators\at1.3 <MMLROOT>\simulators\at1.3mod <MMLROOT>\simulators\at1.4.1 <MMLROOT>\simulators\at2.0
Run the appropriate set path function.
>> run <ROOT>mml\setpathmml
Or for a specific facility, like ALS,
>> run <ROOT>mml\setpathals
As long as the MML subdirectory layout is not changed, the entire tree can be moved anywhere. The path is set by the location of the setpathmml or setpath function. A good test is to run plotfamily. Try getting an orbit, adding the lattice drawing to the plot, etc. There are about 15 rings presently simulated. Look in the machine directory to see which accelerators you have. Usually the ALS, ASP, Spear3, PLS, XRay, VUV, SPS are the accelerators distributed with the release. If you want the setup files for another accelerator it's best to contact them directly. I don't give out the setup software for other accelerators without their consent.
You might need to change which Matlab-to-control system link to use. Look in the acceleratorlink directory to see what's available. These packages are written by various people. See the respective authors for the lastest release. The middle layer has been linked to other control systems besides EPICS -- ucode & tango. Contact me if you want help connecting the Matlab Middle Layer to an unsupported system (it's usually not that difficult to do). Changes to the Matlab path are handled in
setpathmml. A list of control system links are:
- MCA (EPICS) - Andrei Terebilo at SLAC/SSRL
- MCA_ASP (EPICS) - Australian Light Source
- LabCA (EPICS) - Till Straumann at SLAC
- SCAIII (EPICS) - Greg Portmann at ALS
- Tango - Laurent Nadolski at Soleil (not in the distribution)
- UCODE - Just for Brookhaven ational Laboratory
- SLC - Just for SLAC (not in the distribution)
Note: For EPICS users:
- MCA or MCA_ASP does not need any additions to environment variables.
- If using labCA (labca_3_5 is need for 2007b onward) or SCA the library path will need to be changed. For example:
The AT simulator and LOCO are not needed for the middle layer but it's very nice to have them working. I include them in the distribution. The AT version is the one I use and have tested with the Middle Layer and LOCO. For the latest AT release and important information about changes to AT see (https://github.com/atcollab/at). The matlab version of LOCO was a collaborative effort between James SaFranek, Andrei Terebilo, and myself. I distribute the latest version with the MML.
Setting Up a New Accelerator
Look at the ALS or a simpler ring like vuv for an example. Since the setup is not well documented feel free to contact Jeff Corbett or myself for more help. The basics tasks are the following.
- Write a setpath file in the mml directory.
- Create new accelerator directories under the machine directory.
- Write a new aoinit, setoperationalmode, and updateatindex files as well as an AT lattice definition file (deck). This process usually takes a couple days to get correct. Look in the MiddleLayerManual.doc in the docs directory for some guidance.
I mainly use Matlab 7.2.0 (R2006a) on the Solaris (sol2), Linux (glnx86), and Windows XP (pcwin). I also use Matlab 6.5 on Windows XP. I recommend using Matlab 7.2. Applications written in Matlab 7.2 can also run in standalone mode with minimal effort (except that the toolbox to create standalone application is an expensive add-on to Matlab).
Note: The new AT does not work on linux when using a Matlab version less than 7. I'm not sure why, but I prefer to upgrade Matlab or use an older AT version than to figure it out. The setpath function will select the proper version. However, if using an older AT, then the environmental variable ATROOT needs to be defined. ATROOT = /at_old The new AT does not require an environmental variable ATROOT.
- Jim Sebek fixed LabCA (EPICS) to work with changes introduced with Matlab 2017b. It's in the labca_3_5 directory and presently is only compiled for Windows-x64. Jim's epics\R3.15.5 windows compile is also included in the link directory.
- I added a number of AT versions.
Note: AT has not been compiled for all the operating systems and all versions of Matlab.
- AT1.3 is an old AT that has run at the ALS for many years
- AT1.3mod is AT1.3 with some small AT changes required for Matlab 2017b (provided by Xiaobiao Huang at Spear3).
- at1.4.1 -> Jul 31, 2017 from https://github.com/atcollab/at/tags).
- at2.0 -> Aug 25, 2017 from https://github.com/atcollab/at/tags).
AT2.0 compiled using Matlab2017b on Windows and MacOS.
I had trouble compiling on Linux with Matlab2017b & Matlab2016b.
It appears to be a link issue. The error I get is AperturePass not found.
It doesn't seem to be in the global scope. If you know how to fix this let me know! I was hoping to make the default AT in setpathmml AT2.0 for Matlab2017b and later. But for now, the Linux default is AT1.3mod for Matlab2017b and AT1.3 for earlier versions. Use setpathat to quickly change between versions, like,
- I made an attempt to change all legend commands with the 0 option to the 2017b compatible 'Location','Best' input.
Thanks again to Jim Sebek for pointing out that Mathworks dropped this backward compatibility with 2017b.
- Small bug fixes, changed the directory structure so that online and simulate are more symmetric and ready to add other simulators
- Small bug fixes
2015 - I finally got around to debugging all the problems that Matlab_2014b caused. (v3.0)
First some comments about graph colors. If you like the old color order for lines, then you have to change the axes ColorOrder property to the old one. I put the following in my startup.m file.
co = [0 0 1; 0 0.5 0; 1 0 0; 0 0.75 0.75; 0.75 0 0.75; 0.75 0.75 0; 0.25 0.25 0.25]; set(groot,'defaultAxesColorOrder',co);
If you need to change what is the next color
ax = gca; ax.ColorOrderIndex = 1;
(Note: I find the old nxtcolor function still helpful.)
I'm not sure how to change the default colormap back to jet (from the new parula).
"colormap jet" will do the current axes.
Since I've been using integer handles for figure since mid 1990's, when I needed muliple figures I would sometimes do integer math on handles. Like,
h = figure; % Next figure figure(h+1); % Next figure after the last one
This now errors! The new and "improved" way is,
figure(h.Number + 1);
I made an attempt to correct these errors in this release. Please email me where I have missed!
LOCO developed some graphical errors since the 2014b release. Jim Sebek and the SSRL guys have cleaned them up and I am including the release here.
Expanded the uses of cell arrays in the AO setup for Channelnames and Commonnames. This touched a lot of functions. Hopefully I got them all. As usual, let me know.
- As always, minor improvements and bug fixes are continuously done.
- Added the Indus2 storage ring to the release
- Extra function calls in setmachineconfig and getmachineconfig changed!
ExtraSetFunction = getfamilydata('setmachineconfigfunction'); feval(ExtraSetFunction, FileName, WaitFlag, InputFlags);
ExtraGetFunction = getfamilydata('getmachineconfigfunction'); feval(ExtraGetFunction, FileName, ArchiveFlag, InputFlags);
- Many thanks to Jim Sebek (SLAC/SSRL) for compiling LabCA for Windows64!
- Added the NSLS-II accelerator
- As always, a couple of minor bug fixes.
- Added the Sirius and Elettra accelerators
- Change the way time zones are accounted for.
New function linktime2datenum added to all the ...\mml\link directories. Basically,
all the link methods have a different sense of time (local, UTC) and different pivot years
(like time from 1970 or 1900), linktime2datenum converts to Matlab datenum time.
You will need to add variable AD.TimeZone to the MML setup (typically in setoperationalmode).
It's the time in hours from UTC. At ALS I use function gettimezone.m to automatically account for seasonal time changes but it only works for labca. I also changed the simulator to work in UTC time if AD.TimeZone is set.
- Family subfields can now have their own DeviceList, ElementList, and Status.
2010 - October to December (v2.16.3)
- Major bug fix in setpv when using cell arrays in incremental mode or steppv (found by Laurent Nadolski).
The delta change was being applied twice if the WaitFlag was being used (not zero). 2010 - February to September (v2.16.2)
- Minor bug fixes 2010 - January (v2.16.1)
- A sizable change was made to the save/restore method. It should be backward compatible. Basically, separated the save from the retore. Use 'Save/Restore' in the .MemberOf field for a save and restore. Use 'Save' in the .MemberOf field to only save. To restore a family it must be in the save file but it also must be a member of 'Save/Restore'. The machineconfig GUI function was substancially improved.
2009 - October (v2.16)
- AT Changes a. Included Xiaobiao Huang new pass methods BndMPoleSymplectic4E2Pass.c and BndMPoleSymplectic4E2RadPass.c b. Jinhyuk Choi fixed a bug in BendLinear.pass (checked by Xiaobiao Huang) c. Recompiled for 32-bit Windows, 64-bit Linux, 64-bit Solaris. Since Matlab stopped supporting sol2, I'm no longer compiling AT for sol2. When I get access to a 32-bit Linux workstation, I'll recopile AT on it. atmexall should compile AT for your platform.
- LNLS1 (Brazil) added to the distribution
- For machines running EPICS there is mml2edm converter for GUI development.
- Many minor other changes.
2009 - March (v2.15.5)
- Bug fix in setorbitgui when changing the number of BPMs and using the RF frequency.
- Updated the TLS machine directory
- measrespmat - upstream elements zeroed for transport lines
- Improved getlattice
2009 - February (v2.15.4)
- viewfamily GUI
- machineconfig GUI
- getunits, getmode, family2channel made more robust when the field input is empty. New findfirstfield function.
2009 - January (v2.15.3)
- Mostly small changes added in the last couple months. I'm start to add more functionality for transport line.
- Added TLS, BESSY2, MLS and ELSA rings to the MML release.
2008 - September (v2.15.2)
- Added ALBA to the distribution (setpathalba to try it)
- Added the MLS accelerator (Bessy) to the distribution
2008 - July (v2.15.1)
- Added Laurent's reson to /mml directory
- Added Marc's TuneMovePanel to /mml/at directory (presently model only)
- monbpm changed to pre-allocate memory
- New function: [MachineName, MachineType] = whereami
2008 - June (v2.15)
- measlocodata and monbpm changed to allow a 'model' input flag (as well as 'online' & 'simulator'). This is useful for rapid testing of LOCO on the model.
- modeldisp fixed when no RF cavity is present.
2008 - March (v2.14)
- Changed measrespmat when using physics units to convert the .DeltaRespMat about the present setpoint. This should help with nonlinearities in hardware-to-physics conversions.
- Added an attempt at a MML.gif and MML_Matlab.gif. Any help here welcome.
- New functions: getbrhoinv, concatenaterings, drawlattice2d, ismachine, monbpmpsd (still needs some work)
- Added a handle output to drawlattice and drawlattice2d
- xaxesposition, yaxesposition changes to handled linked positions (like with plotyy)
- getpvmodel & setpvmodel updated to make it easier to set fields typically not needed in
a model but nice to have for code checking. For instances, the run flag for an HCM is usually
not needed for modelly but some code you write may want to see it. You could nowe set/get it with
2008 - January (v2.13)
- Small bug in mmlview when devices status is zero.
- LocoMeasData.DeltaAmps got changed to physics units at some point, now is back to hardware units.
2007 - December (v2.12)
- Small improvements to plotmemberof, hw2physics, physics2hw, getrunflag
- Energy scaling of response matrices improved getpv, getpvonline, setpv, setpvonline handled strings better
- New ringpara function from Xiaobiao Huang (Spear) � like atsummary but it compares much better to MAD
2007 - October (v2.11)
- Small improvements to plotmemberof, hw2physics, physics2hw, getrunflag
- More LOCO fixes
- Improved the plotting in modeltwiss, modeleta, modeldisp, etc.
- New labca with a memory leak fix for lcaPutNoWait.
2007 - September (v2.10)
- setorbitbumpgui - added more general editing of corrector magnets lists and removing a bump now can be done in steps.
- AT - 64-bit linux binaries added
- New LOCO code with new scaled Levenburg-Marquardt method (more to come)
2007 - August (v2.9)
- getsigma('Physics') had a bug when the offset orbit was nonzero.
- getdata and getrespmat check for default units and call hw2physics or physics2hw, if necessary.
- AT no longer comes with .dll extensions. If you need them they�re in \at\simulator\element\obsolete\dlls. .mexw32 is the newer PC extension.
2007 - July (v2.8)
- findmemberof has an optional flag to return after the first family found. This was added to speed up functions like gethbpmfamily.
- gethbpmfamily, getvbpmfamily, gethcmfamily, getvcmfamily will error if it cannot find the memberof field. Mandatory MemberOf Fields: 'HBPM', 'VBPM', 'HCM', 'VCM', 'Tune Corrector', 'Chromaticity Corrector', 'Dispersion Corrector' MemberOf Fields sometimes used: 'BPM', 'COR', 'QUAD', 'SEXT', 'BEND', 'Magnet'
- common2dev � Family output will only be one row if they are all the same
- plotfamily � new bar graph, auto-scale is based only on the data visible in the plot, menu to disable setpoint changes, and resize now changes the whole figure (normalized).
- New functions: plotmemberof, plotquad, cdmachine
- I added linkaxis(handle, 'x') a lot of places
2007 - June (v2.7)
- Improved LOCO, plotfamily, getrespmat, incavityon, and a few more
- XML "toolbox" added to the release
- For EPICS users, a new labca (3.0) is available.
- Standalone compile example in .../machine/ALS/StorageRing/Compile/StandAlone
- 64-bit Solaris compiles included for AT and mysql toolboxes.
2007 - May (v2.6)
- New LOCO files with parameter weighting.
- The labca setpv default changed from lcaPutNoWait to lcaPut
- setrf default device list changed to  instead of [1 1]
2007 - April (v2.5)
- Beam based alignment of quadrupoles a. bpm2quad, quad2bpm now has a 'Upstream' and 'Downstream' flag b. quadcenter now works on transfer lines using downstream BPMs
- getbpmaverages needs a DeviceList input. It can return all devices or 1 if empty.
This required small changes to setpv, getbpmsigma, monbpm, measlocodata, and quadcenter. To save cpu time, getbpmaverages often return only 1 device by default.
- orbitcorrection methods changed to use gethbpmfamily, and new outputs added.
- drawlattice changed for combined function sextupoles and correctors (like at ASP)
- setrf changed for multiple cavities (needed for simulator).
- changed measdisp for [1 1] ->  for RF
- Added AD.Directory.QMS = [AD.Directory.DataRoot, 'QMS', filesep]; to setmmldirectories (Eugene Tan)
- Changed the default units for the chromaticity functions, measchro, setchro, stepchro, to physics units.
Most people prefer physics units some people really don't like hardware units. Note that the golden has always been stored in physics units. If you use the common menu of plotfamily for chromaticity setting, you should update plotfamily.
- Small changes and bug fixes to plotfamily.
- Output OCS. Incremental always is 0 in the output 1 of setorbit. That way, OCS=setorbit('NoSetPV') can be use to check what will be changed then directly use to correct the orbit (setorbit(OCS) or setorbit(OCS,'NoGetPV')). This worked before for absolute change but not incremental changes.
- New mml/at functions written by ASP: machine_at, ffttunedisp2, printlattice, plottwiss
- New mml function: getnumberofsectors
2007 - March (v2.5)
- New functions: a. bpmresp2loco - to convert an MML response to LOCO units b. rmgolden, reoffset - to more easily remove the a golden or offset value
- Made a same change to locodata when exporting response matrices to divide by the total magnitude of the kick and not just the in-plane kick strength.
- getpv/setpv: a. SP-AM error printout b. Empty Family or cell inputs return without error.
- setorbit - added a tolerance check to limit the number of iterations.
OCS.NCorrections is the actual number of corrections done. - option to step the correctors & RF in multiple steps (also added to setorbitbumpgui. - OCS.IncrementalFlag (yes/no) changed to OCS.Incremental (1/0)
- orbitcorrectionsmethods � added column weights 6 steprf now uses setpv with an �incremental� flag
2007 - February (v2.5)
- Made "help mml" more interesting. Hypertext in the command window is often helpful (also see alsinfo)
- New application: setorbitbumpgui (like always, there is a menu in plotfamily to it)
- checklimits and setorbit updated for checking limits when maxsp<minsp. Yes, this can happen when working in physics units.
- Added a 'DrawLattice' flag to modeltwiss to draw the lattice on the plot.
- Added a few sound functions: soundtada, sounderror, souddchord, soundquestion
- Labca help files moved off the path since it interfered with compiling in standalone on unix.
- meastuneresp did not have the proper delay (2.2*getfamilydata('TuneDelay')) after setting a quadupole family.
- monmags made more time efficient by always getting data in hardware units and including an option to exclude BPM data. I also added a flag to plot after a raw2real is done. In the future I plan to exclude a raw2real in getrunflag so that gain/offset difference between the setpoint & monitor can be removed and the .Tolerance field does not have to be increased.
2007 - January (v2.4)
- plotfamily, mmlviewer, setorbitgui, drawlattice -> made small improvements like removed the visibility of the handles.
- modeltwiss - bug fix when Twiss parameters inputs are not in the AT model.
- setpv - Added an Ignor condition for ErrorWarningLevel = -2 and a beep if the dialog box appears.
- Added ErrorWarningLevel = -2 to quadcenter. It's gets reset on exit. The default ErrorWarningLevel is usually set in setoperationalmode.
- LabCA - Changed setpvonline to use lcaPutNoWait. It's much faster.
If anyone wants to use lcaPut as the default I could make it a setup flag. To speed up lcaGet, I would advise setting, lcaSetRetryCount(1000); lcaSetTimeout(.005); I usually set this in setoperationalmode.
- For EPICS users, I changed the LabCA distribution to the 2_1_beta release.
- Bug fix in setorbitbump when the goal BPMs are the first or last BPMs in the ring.
- New mysql database toolbox (this one handles BLOBs).
- Changed setpv to wait 2.2*AD.TuneDelay on WaitFlag=-3 to be consistent with BPM delay. Usually, this variable is set in the setoperationalmode file.
2006 - December (v2.3)
- plotfamily - Bug with reseting a setpoint change when selecting from list box #2.
2006 - October (v2.2)
- mmlviewer - a GUI for viewing the MML setup and lattice files.
- Calccoupling � Calculate and plot couple of in the AT model (written by James Safranek).
It is often run on a model that has been calibrated with LOCO.
- Transfer lines � functions like getpvmodel, setpvmodel, getbpmresp, modeltwiss were updated to handle transfer lines. Add MML varable AD.MachineType = �Transfer� to make them work. The default is AD.MachineType = �StorageRing�. getpvmodel, setpvmodel changed to get/set the TwissData variable. This is needed (Removed the old LaunchVector variable.) If you have a transfer line function to contribute to the MML release send it to me.
- isstoragering, istransfer, isbooster
- copychicaneresp copied to mml directory since a number of laboratories use it.
- Removed AT .dll�s, the new windows mex file extension is mexw32.
- getpv/setpv can now change variables in the MML setup structure (AO/AD) like setfamilydata and getfamilydata.
- setorbitbump: fixed for units override, change the output arguments, change the definition of OCS.CM.Data when using the 'NoSetSP' flag (see help setorbit, note #4 for more details).
- I converted many conditional statements that had "|" or "&" to "||" or "&&". This caused a couple bugs. I hope there are not more. As always, let me know if you find anything wrong with any function.
- When using structures there was a problem with some function getting the units from the input structure.
Like, AM1 = getx('Physics','Struct') is physics units. AM2 = getx(AM1) is also physics units. But, getgolden, getoffset, getgain, ... needed to be fixed to return the proper units.
2006 - September (v2.1)
- setorbitgui - a GUI for running the setorbit program. Use setorbitsetup to custumize the setting for a particular accelerator.
- Added a check for special functions to getpv/setpv when an 'online' input override is done.
- Removed labca default changes from switch2online. Put it in setoperationalmode if you need it.
- Matlab release 2006b does not alow pack from within a function so it was removed from loco. Other small changes were made to locogui.
- Added buildlocoinput to the loco directory. buildlocoinput is all the accelerator independent stuff. It will call buildlocofitparameters to get the accelerator dependent stuff.
- Added a 'MinimumBeamCurrent' flag to measbpmresp and measrespmat.
For instance, measbpmresp('MinimumBeamCurrent', 32.1)
will pause at a beam current of 32.1 and prompt for a refill.
2006 - August (v2.0) I've made lots of changes to the matlab middle layer software this month! The main thing is you can't install it over an old installation!!! This one has a whole new directory layout. One way to do the installation is: A. Rename the old middle layer root directory. B. unzip MiddleLayerRelease.zip in the middle layer root directory C. Rename your data directory to the new MML directory. For the ALS storage ring I would rename ALSData to /machine/ALS/StorageRingData D. "run mml\setpathmml" to select an accelerator or "run mml\setpath" for your machine E. I find plotfamily is a good program to test the new software. F. If you need to copy old files in the the machine specific directory to the new location (machine<NAME>) be careful not of overwrite files: aoinit, setoperationmode, plotfamilystartup, and maybe updateatindex.
We (Eugene Tan and I) made it hopefully easier to have multiple accelerators running at at the same time. There are many ways to do it so we will present 2 of them in with this release so that they can be experiemented with.
a. Treat each accelerator independently: AO, AD, AT deck ASP example: LTB, Booster, BTS, StorageRing Comments:
- The same families names can be used in each MML. Like, BPMx, BPMy, BEND, QF, QD etc. This makes it easier to use the same function, like setorbit, work on different types of accelerators.
- It's easier on functions like plotfamily and setmachineconfig to know what to do.
b. Combine mulitple accelerators in one AO, AD, but switch the AT deck depending on the MML family. ASP example: Injector (combines the LTB, Booster, & BTS) Comments:
- Functions that use say the Booster and BTS can be written without changing the MML. but it requires different family names. This could make it more difficult to to write machine independent applications.
- Saving the entire injector configuation can be done together (or not).
- The default plotfamily is the booster, use "plotfamily LTB" or "plotfamily BTS" to plot the LTB or BTS.
- Fast switching of the AT model is done with a new AO field (ATModel) and prefilling global variable THERINGCELL with all the models.
plotfamily can be called with an input. For example, plotfamily BTS will only plot families where BTS was a MemberOf that family.
New directory tree! Look in the Install section below to see the new tree. Note: machine directories aoinit, setoperationalmode, and updateatindex were likely changed for the new MML release.
plotfamilystart - added a sector menu
BPMx, BPMy, HCM, VCM must be a MemberOf some family in order for defaults to work properly!
Added HTML help files (directory, \doc_html). Files are automatically generated using m2html which is freeware on MatlabCentral. I think it's a good way to find functions without having to look through directories. This program takes the Matlab function help lines (the comments at the top of the file) and turns them into HTML. It also shows dependences. (Thanks to Laurent for introducing me to this application.)
I added more accelerators to the release (and more to come).
getrespmat had an error when replacing NaN's for missing actuators with limit checking when the DeviceList is empty.
Common names can now be used instead of family names. I also improved the speed of the functions that manipulate common names.
Improved the help at the top of many files.
2006 - July (v1.5)
- steppv - bug fix when changing the mode as a keyword. For instance, when working online, stepsp('HCM','Simulator') would get the present setpoint from online and not the model.
- setorbit - small changes to the graphics.
2006 - June (v1.4)
- plotfamily - Added a slider and editbox to change setpoints. Click on a lattice element to enable. Click on a drift or BPM to turn off.
- Bug fix in inputparsingffd for structure inputs.
- Bug fix in LOCO when fitting energy shifts at correctors with noralization on.
2006 - May (v1.3)
- New functions: gethbpmfamily,getvbpmfamily, gethcmfamily, getvcmfamily Use these function to get default family names.
- getbpmresp/measbpmresp now uses MemberOf field to find default families. If anyone finds a function that does not use defaults properly, let me know.
- Fixed some bugs with measbpmresp and measrespmat (found by Diamond Light source, thanks).
- Better limit checks added to measrespmat.
- getturns, multiturnfft changed and improved.
- plotfamily lattice location changed and callbacks added if clicked on. Note: horizontal correctors on above the axis and vertical below.
2006 - March (v1.2)
setmachineconfig - option to interatively select what to set by using the 'Display' input.
mkparamgroup is distributed with AT. Another, slightly different, version was distributed with with the middlelayer now it's part of LOCO.
Expanded the Field input getpvmodel and setpvmodel to handle common model functions, like magnet tilts and setting multipole components.
'K','Quad','Quadrupole' 'K2','Sext','Sextupole' 'K3','Octupole' 'KS1','SkewQuad','Skew' 'Roll','Tilt'
getpvmodel also handles single turn data and tranport lines: 'xturns', 'Pxturns', 'yturns', 'Pyturns', 'dpTurns', 'dLturns' See help setpvmodel and help getpvmodel for more d tails.
2006 - January (v1.1)
- Fixed an error in plotfamily when changing the device list.
- Added Christoph's function for analyzing single turn data: findfreq and calcphase
2005 - December (v1.0)
- When using fuction handles in hw2physics and physics2hw (HW2PhysicsFcn and Physics2HWFcn) the energy input in passed as a vector instead of looping. This allows for faster execution times because vectorized math can now be done in the HW2PhysicsFcn and Physics2HWFcn functions. This may require users to add vectorized math to the lower level functions like amp2k and k2amp.
- Updated the AccObj directory. See MiddleLayerObjects.doc for infomation about objects. Using objects is just a fun experimental side-show of mine.