Index of /~dlr/g-2/gm2/mytest/kicker_upgrade_evaluation/robyn/development9_linux/trains_xbsm_bpm

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[DIR]April2014/2019-08-29 12:25 -  
[DIR]April2015/2015-04-10 15:01 -  
[DIR]BPM/2014-12-12 14:14 -  
[TXT]CMakeLists.txt2015-02-16 15:33 156  
[DIR]December2014/2014-12-16 22:05 -  
[DIR]RD_18511/2014-12-12 14:39 -  
[DIR]RD_18512/2014-12-12 14:13 -  
[   ]RD_18585_bunch_001.dat2014-12-16 21:22 6.0K 
[   ]RD_18586_bunch_001.dat2014-12-16 21:22 6.0K 
[TXT]cbpm_anal.f902016-12-21 09:12 8.6K 
[TXT]cbpm_anal_ac.f902015-02-16 15:18 5.2K 
[   ]cmake.cbpm_anal2015-02-16 10:04 228  
[   ]cmake.cbpm_anal_ac2015-02-16 10:04 234  
[DIR]code/2014-04-24 12:26 -  
[   ]fort.732014-12-13 15:15 3.5M 
[   ]input.dat2015-02-16 20:45 209  
[   ]input_feedback.dat2014-04-25 21:16 167  
[DIR]plotting_scripts/2016-10-08 19:23 -  
[DIR]test/2014-05-29 20:01 -  
[   ]testinput.dat2014-05-29 19:59 462  
[DIR]wakefield_20151213/2019-08-29 12:20 -  

Instructions for contents of fft/

BPM data

The cbpm_anal.f90 code reads a list of tbt RD data files.
The list of RD files is in input.dat.

The output for each RD file, and then for each bunch and each bpm in that file is written to
RD/

OUTPUT: filename =  - RD_<RD#>_bunch_<bunch#>_BPM_<bpm#>
 There are (# RD-files)X(# bunches)X(# bpm) files created.

An example header from an output file RD_17949_bunch_055_BPM_044 here
        turn           x           y        fftx        ffty
#       bunch =         55         BPM =         44      nturns =       1024
#   average_x =  -1.2080E-04    average_y =  2.2891E-03
#       rms_x =   5.7540E-05        rms_y =  4.1960E-05
#Peaks in horizontal spectrum  9.9951E-01  5.1953E-01  5.5371E-01  7.2949E-01  7.2900E-01
#Peaks in vertical spectrum  9.9951E-01  6.5381E-01  6.4111E-01  5.0586E-01  6.4355E-01

         turn  X-disp	     y-disp	fftx	     ffty
           1 -1.2808E-05  1.6543E-05 -1.2370E-01  2.3440E+00


OUTPUT:  filename RD_<RD#>_<bunch#>.dat with <x> <y> <rms x> <rms y> for all bpms

BPM/
 OUTPUT: BPM_<bpm#>.dat


Plotting
In the subdirectory plotting_scrpts/
 Example 1: 
 BPM_rms_vs_bunch.gnu
 From fft/April2014/20140410
 gnuplot -e "filename='BPM/BPM_020'; current='1'; date='20140418'" ../../plotting_scripts/BPM_rms_vs_bunch.gnu
 writes to filename.ps
  (Refer to elog for the bunch current)

 Example 2:
 BPM_tune_vs_bunch.gnu
 From fft/April2014/20140410
 gnuplot -e "filename='BPM/BPM_020'; current='1'; date='20140418'" ../../plotting_scripts/BPM_tune_vs_bunch.gnu
 writes to filename.ps

 Example 3:
 spectra.gnu - plots spectra for bunch and BPM
 From fft/RD_18511
 gnuplot -e "filename='RD_18511_bunch_001_BPM_040''" ../../plotting_scripts/spectra.gnu
 writes to filename.ps

 Example 4:
 BPM_rms_vs_current.gnu - plots rms vs current
 From cesrta/ms/2014/december/ImpedanceData/
 gnuplot -e "filename='BPM/BPM_020'; bunch='1'; date='20141217'" ../../plotting_scripts/BPM_rms_vs_current.gnu
 writes to filename_current.ps

 Example 5:
 BPM_rms_vs_RD.gnu - plots rms vs RD number
 From cesrta/ms/2014/december/ImpedanceData/
 gnuplot -e "filename='BPM/BPM_020'; bunch='1'; date='20141217'" ../../plotting_scripts/BPM_rms_vs_RD.gnu
 writes to filename_RD.ps

 Example 6:
 BPM_tune_vs_current.gnu - plots tune vs current
 From cesrta/ms/2014/december/ImpedanceData/
 gnuplot -e "filename='BPM/BPM_020'; bunch='1'; date='20141217'" ../../plotting_scripts/BPM_tune_vs_current.gnu
 writes to filename_tune.ps

Note that the BPM_#.dat files include data for all of the runs listed in the input.dat file. To select specific runs 
probably easiest to rerun with a different list (or edit the BPM#.dat files.

xBSM data

The xbsm data is processed with XbsmRootFitter.
The input file is named <whatever.stg>
An example is "/home/dlr/development9_linux/fft/April2014/20140410/entire_train.stg"
>XbsmRootFitter entire_train.stg

Data is written to whatever.out and whatever.root
Read the .root files with 
Root -l
Root[0] "new TBrowser[]"

The .out files have all the relevant stuff. After scrolling down a ways you come to the header for (for example) ECWitness-feedbackoff_49563d-49651d.out

   ====== Fit results, averaged over 100 turns, for Run # 49563d  ======

 Run # I(mA)    Beam Size    Position    Amplitude       Bgd Con     ChiP      Area         RBM      RBS     Q      TS Beam Size FitName Timestamp
------ ----- --------------  --------- -------------- ------------  ----- ------------  -----------  ----- ------   ------------ ------- ---------

The file SizeFeedbackOff.dat comes from a .out file.
The bunch number (last column) was added by hand based on run number and elog notation. 

Some example gnu scripts for plotting data in .out files

BeamPosition.gnu
BeamSize.gnu
BunchSizeEntireTrain.gnu