Changeset 8828 for trunk/MagicSoft/Mars/scripts
- Timestamp:
- 01/24/08 11:11:45 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/scripts/preparemc
r8637 r8828 18 18 # 19 19 # Author(s): Daniela Dorner 05/2006 <mailto:dorner@astro.uni-wuerzburg.de> 20 # Author(s): Daniel Hoehne 11/2007 <mailto:hoehne@astro.uni-wuerzburg.de> 20 21 # 21 22 # Copyright: MAGIC Software Development, 2000-2007 … … 37 38 # - zdmin minimum zenith distance 38 39 # - zdmax maximum zenith distance 39 # - psf psf (at the moment mc with psf 14 and 20 is available)40 # - mode s observation mode41 # the explanation for the modes can be found in 40 # - psf add. spot size before camera 41 # - mode production mode of the mcs 42 # the explanation for the modes can be found in the text and in 42 43 # /magic/montecarlo/rawfiles/README.txt 43 44 # - numruns number of runs, that are in the sequence file, which are used … … 55 56 56 57 # to be set by the user 57 path= /home/dorner/final_analysis58 path=~ 58 59 # path where your mc sequence and dataset files are stored 59 60 mcoutpath=$path/mc … … 62 63 63 64 # zenith range of your data 64 zdmin=17 65 zdmax=36 66 # point spread function of your data 67 psf=14 68 # observation mode of your data 69 # for explanations see /magic/montecarlo/rawfiles/README.txt 70 modes=( "02" ) 65 zdmin=7 66 zdmax=25 67 # additional spotsize (before camera) for the mcs. You can calculate it with Sqrt(psf(real data)*psf(real data) - 25) 68 psf=15 69 # production mode of your data 70 # available observation modes: On (please leave modes empty: ""), Wobble ("W1", "W2"), Fake Wobble ("FW"), Diffuse ("Diff") 71 # you can combine these with: high energy (harder spectrum: "HE") 72 # particle type: "Muon", "Gamma" or "Proton" 73 # remark: first the particle, then the spectrum and the observation mode at the end: Examples mode="GammaHEFW" or "ProtonDiff" or "GammaW1" 74 # please have also a look into /magic/montecarlo/rawfiles/README.txt 75 # you can also use asterisks, e.g.: "GammaW*" for W1 and W2 76 mode="GammaW1" 77 # epoch for which the mc were produced 78 # available epochs: MC_old MC_April_May06 MC_post_June06 MC_MuxFADCs MCMuxFADCs_NEW (last one is for Mux data with reduced fadc slices number) 79 epos=( "MC_Old" ) 71 80 # number of runs which are in the sequence files used for training 72 81 # please adjust this number such, that you use about 30000 Events for training 73 numruns= 182 numruns=2 74 83 75 84 … … 80 89 if ! [ -e $mcoutpath ] 81 90 then 82 echo "Your outpath for the mc $mcoutpath does not exist."91 echo "Your outpath for the mc $mcoutpath does not exist." 83 92 exit 84 93 fi … … 100 109 mcpath=/magic/montecarlo 101 110 111 102 112 zbinmin=`echo "scale=2 ; 100*(1 - c($zdmin*3.14/180))+1" | bc -l` 103 113 zbinmax=`echo "scale=2 ; 100*(1 - c($zdmax*3.14/180))+1" | bc -l` … … 108 118 echo "zd: min: $zdmin max: $zdmax" 109 119 echo "zbin: min: $zbinmin max: $zbinmax" 110 echo "$numruns runs are classified as test the rest as train"120 echo "$numruns runs are classified as test, the rest as train" 111 121 112 122 j=0 113 for mode in $modes123 for epo in $epos 114 124 do 115 125 for (( i=$zbinmin ; i < $zbinmax ; i++ )) 116 126 do 127 #depending on the epoch you need different P and C runs and time codes 128 case "$epo" in 129 130 "MC_up_to_April06") 131 prun=272 132 crun=273 133 time="03" 134 ;; 135 "MC_old") 136 prun=4223 137 crun=4224 138 time="03" 139 ;; 140 "MC_April_May06") 141 prun=272 142 crun=273 143 time="02" 144 ;; 145 "MC_post_June06") 146 prun=1048 147 crun=1049 148 time="02" 149 ;; 150 "MC_MuxFADCs") 151 prun=3919 152 crun=3920 153 time="01" 154 ;; 155 "MC_MuxFADCs_NEW") 156 prun=270 157 crun=271 158 time="01" 159 ;; 160 *) 161 echo "Wrong epoch $epo , please specify a valid epoch" 162 continue 163 ;; 164 esac 165 117 166 zbin=`printf %02d $i` 118 path=$mcpath/rawfiles/19$zbin/$ mode/$psf119 runs=(`ls $path | grep Gamma | cut -d_ -f2 | sed-e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' | tr "\n" " "`)167 path=$mcpath/rawfiles/19$zbin/$time/$psf 168 runs=(`ls $path | grep $mode | cut -d_ -f2 | sed -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' -e 's/^0//g' | tr "\n" " "`) 120 169 if [ "$runs" = "" ] 121 170 then
Note:
See TracChangeset
for help on using the changeset viewer.