Changeset 8828 for trunk


Ignore:
Timestamp:
01/24/08 11:11:45 (17 years ago)
Author:
hoehne
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8807 r8828  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2008/01/24 Daniel Hoehne
     22
     23   * scripts/preparemc:
     24     - adapted to new rawfile/camera structure in /magic/montecarlo
     25
     26
    2027
    2128 2008/01/14 Thomas Bretz
  • trunk/MagicSoft/Mars/scripts/preparemc

    r8637 r8828  
    1818#
    1919#   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>
    2021#
    2122#   Copyright: MAGIC Software Development, 2000-2007
     
    3738# - zdmin    minimum zenith distance
    3839# - zdmax    maximum zenith distance
    39 # - psf      psf (at the moment mc with psf 14 and 20 is available)
    40 # - modes    observation mode
    41 #              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
    4243#              /magic/montecarlo/rawfiles/README.txt
    4344# - numruns  number  of runs, that are in the sequence file, which are used
     
    5556
    5657# to be set by the user
    57 path=/home/dorner/final_analysis
     58path=~
    5859# path where your mc sequence and dataset files are stored
    5960mcoutpath=$path/mc
     
    6263
    6364# 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" )
     65zdmin=7
     66zdmax=25
     67# additional spotsize (before camera) for the mcs. You can calculate it with Sqrt(psf(real data)*psf(real data) - 25)
     68psf=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
     76mode="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)
     79epos=( "MC_Old" )
    7180# number of runs which are in the sequence files used for training
    7281# please adjust this number such, that you use about 30000 Events for training
    73 numruns=1
     82numruns=2
    7483
    7584
     
    8089if ! [ -e $mcoutpath ]
    8190then
    82    echo "Your outpath for the mc $mcoutpathdoes not exist."
     91   echo "Your outpath for the mc $mcoutpath does not exist."
    8392   exit
    8493fi
     
    100109mcpath=/magic/montecarlo
    101110
     111
    102112zbinmin=`echo "scale=2 ; 100*(1 - c($zdmin*3.14/180))+1" | bc -l`
    103113zbinmax=`echo "scale=2 ; 100*(1 - c($zdmax*3.14/180))+1" | bc -l`
     
    108118echo "zd:   min: $zdmin max: $zdmax"
    109119echo "zbin: min: $zbinmin max: $zbinmax"
    110 echo "$numruns runs are classified as test the rest as train"
     120echo "$numruns runs are classified as test, the rest as train"
    111121
    112122j=0
    113 for mode in $modes
     123for epo in $epos
    114124do
    115125   for (( i=$zbinmin ; i < $zbinmax ; i++ ))
    116126   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
    117166      zbin=`printf %02d $i`
    118       path=$mcpath/rawfiles/19$zbin/$mode/$psf
    119       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" " "`)
    120169      if [ "$runs" = "" ]
    121170      then
Note: See TracChangeset for help on using the changeset viewer.