Useful commands and shell scripts in ~/binpls 20030901 T. Kato
1. making Q-magnet field
gradient data from trace input
selectBDLtermtrace infile
outputfile= DTQ1table (J, Qleng-mm, T/m)
2.
making DTQ current data using BDQleng at 400A excitation
mkDTQ1current
reuired file: DTQ1table and
bdcurrentinput.dat
output
file is DTQ1currenttable (No Qleng-mm BDTperm currentinA)
3. trace
output PLOT using gnuplot
plotbeta3d,
plotdxdy3d, plotdpdw3d, ploteta3d, plotxcyc3d,
plotdp3d, plotdxdyxcyc3d
4. chaneg error terms of the trace
input
replaceQXYerrtrace $1 $2 $3
$4 $5 $6
replaceQXYerrtrace.awk
# $1 begin segment number in
nt
# $2 end segment number in nt
# $3 new x-offset value with sign in mm
#
$4 new y-offset value with sign
in mm
# $5
flg of error 1 is const, -1 is random
# $6 input file name
5. select centroid terms from FT20 trace
output file
selectxcycFT20
$1
$1 output file name
6. change segment
number of trace-input data
replaceSEGNUMtrace $1 $2
$1 start segment number
$2
input file name
caution: if there were comment term in trace-data, use
replaceNTtrace
7. pre-stage trace data
first, do trace-run of through the linac by runparc for creating FT19 data
sumparaqmagtrace allnew.3d (typical input for all linac) makes tempqmagtable: allnew.3d is trace-data
for through the linac.
tableqmagbg.exe >
qmagtableMDSA
infiles:
FT19twissall and tempqmagtable
output: qmagtableMDSA: NSEG(J),BD(J),BG(K),BETA(K),LI(J)
transqmagtr3dnew.exe makes output file
= tempmodbgtr3ddat, then rename the output
8. DTL-1 energy phase simulation
shell script: rundtl1pw
sorting and making the output values:
shapewph.exe