"User guide for the HKR Strahldiagnose Toolkit Version November Author"
User guide for the HKR Strahldiagnose Toolkit Version 1.0 26th November 2004 Author: Markus Kirk, GSI INTRODUCTION This software product requires the commercial product Interactive Data Language IDL™ to compile and run. A suite of functions have been written to read and process binary 8- bit data files which contain digitized signal recorded by a LeCroy LC500 series oscilloscope (e.g. LC574AL). There is also a main program HKRSDKIT.pro which provides a very simple user interface to some of these functions. This main program reads user input data from an ASCII format file. The name of this file is specified in HKRSDKIT.pro under the variables ParametersFilePath and ParametersFilename. The binary LeCroy data file is of course also read by the main program. INSTALLATION These installation instructions assume that the user has a computer with the Linux operating system running on it. The IDL product is also available for Windows, Unix and VMS. The source code (with example input datasets) for HKSDKIT.pro can be downloaded from the author’s homepage: http://www-linux.gsi.de/~kirk where this user guide also resides. There you should find a file called HKRSDKIT.tgz. To decompress and un-tar this file first change to the directory in which you wish to install all the files and make sure that there is no directory which already exists inside that directory called hkrsdkit (type sensitive!). Then enter the following at the Linux prompt: tar –xzvf HKRSDKIT.tgz This will produce the following files: Be sure to place the following line in your Linux .profile file located in your home directory: export IDL=/u/kirk/codes/idlc/draft 1 The above line assumes that you are in the korn shell (execute ksh). For the c shell (execute csh) write instead: setenv IDL /u/kirk/codes/idlc/draft into your .cshrc file which is also located in your root directory. HOW TO RUN HKRSDKIT Enter at the Linux prompt: idlde to run IDL’s development environment. Then select: File Open Project… and choose HKRSDKIT.prj. This loads all the source files. Now select: Project Build It may be (due to a bug in IDL perhaps) that you will receive the something like the following compliant inside the IDL Development Environment (main) window, perhaps repeated a few times: At: /u/kirk/codes/idlc/draft/HKRSDKIT.pro, Line 1544 Status = LC_GenerateTomoDataVec (dataVecVolts, headerinfo, dataVecVolts2, toffset, polyWindowPts, poldeg, bunchespertrace, !FREQRAMPED, 0.0, tstart, tstop, numrevs, tomodata, !NOBASELINE, framelen) % Only 8 subscripts allowed. This is nonsense. Just do the following to make this go away. Inside the Idlde-Project Window open the source folder and compile LC_GenerateTomoDataVec.pro. This can be done by simply clicking on this file with the right mouse button and selecting compile. Now compile the HKRSDKIR.pro file and then select: Run Run HKRSDKIT or press the F5 key. SHORT TUTORIAL This isn’t going to be much of a tutorial, more like a demonstration. Firstly edit the 2 neighbouring lines of code in HKRSDKIT.pro. These should look something like: 2 ParametersFilePath = ‘path name’ ParametersFilename = ‘file name’ Make sure that ‘path name’ becomes ‘./input/’ and ‘file name’ becomes ‘HKRSDKIT001.params’ and save the contents of HKRSDKIT.pro. This should already have been done for you, actually. Running the programm should produce first of all two plots in one window. The top one is a recording of the sum signal from a Beam Position Monitor (BPM) and the lower plot contains the RF gap-voltage signal. Then the programm should proceed to produce an FFT of the BPM signal. There you should be able to identify a large peak in the middle, which is the h=4th harmonic of the beam revolution frequency f0. To the left and to the right of this peak one can just make out the sychrotron side bands which have frequencies at approximately hf0 ± fs, where fs the synchrotron frequency is of the order of 1 kHz. The program then automatically goes on to produce, amongst other things, a waterfall plot of the BPM signal –and- a plot of the mean phase of the bunch with respect to the synchronous phase verses time. In the latter you should be able to identify not only the damping of the coherent motion of the bunch, just after total RF amplitude was suddenly increased from zero to 20 kV, but also a bit of recoherence (i.e. the 2nd bump in the evelope of this plot). If you wish1 you may increase the Resolution Band Width (RBW) of the frequency spectrum by changing the line in HKRSDKIT001.params from: Fourier Transform Type [Discrete:0 or Fast:1] = 1 to: Fourier Transform Type [Discrete:0 or Fast:1] = 0 By doing so we use all the available data points of the BPM signal, and not just fewer as is the case with the FFT approach since it takes only the first 2N points which fit into the maximum available time span of the digitized signal. Now let’s move onto the 2nd demonstration dataset HKRSDKIT002.params. Remember to change those 2 lines of code in the main program and save, as was described above. Every thing should be set up so just compile and run the IDL code. What you should now see is the analysis of a different dataset than before. The signals of the BPM and the RF gap are again plotted. Following that a waterfall plot is produced as well as a plot of the mean phase of the bunch. An ASCII file is also written to the output directory called tomodata.dat. One can use the CERN Tomography program2 to a produce longitudinal phasespace density plot of the beam etc. from the contents of tomodata.dat. The program then carries on and analyses the RF gap-signal in detail. What you should get finally are several plots, and their corresponding ASCII and .bmp files, showing the RF frequency, kinetic energy per nucleon, RF amplitude, sychronous phase, and the synchrotron period. 1 Warning. At least on my computer the discrete Fourier transform never completes! I tried it however on one of the computers in the HKR and it worked. 2 You can download this from http://t.home.cern.ch/t/tomograp/www/ 3 This last one is calculated from the other plots using an analytical expression (see [CHAO] for example). FINAL WORD There are a lot more functions written by the author of this document than are included at present in the .tgz file. For example I did not include (so far) any of the analysis functions for the .IQ data files written by the Sony Tektronix 3066 Real Time Fourier Spectrum Analyser, nor those produced by the Rhode & Schwarz FSA. These routines do fitting to Schottky noise bands and there is also one routine that derives a set of phasespace coordinates of macroparticles for use in a longitudinal tracking code3 from a longitudinal Schottky band, by employing a Montecarlo method. IDL SUPPORT firstname.lastname@example.org Perhaps quote the GSI IDL-installation No.: 82271 REFERENCES [CHAO] Handbook of Accelerator Physics and Engineering. Edited by Alexander Wu Chao, and Maury Tigner, p. 51 (1999) 3 E.g. ESME, LONG1D or even my code, though that’s rather limited in what output it gives. 4