-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
33 lines (32 loc) · 1.06 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#export PATH="~/miniconda2/bin:$PATH";
export LD_LIBRARY_PATH="~/miniconda2/lib:$LD_LIBRARY_PATH"
export PATH="~/miniconda2/envs/myconda/bin:$PATH"
eval `$HOME/utils/ape/current/ape sh externals`
eval `~/aerie/install/bin/hawc-config --env-sh`
export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib:/data/disk01/software/hawc/ApeInstalled/x86_64/External/gsl/1.16/lib/:${LD_LIBRARY_PATH}
export CONFIG_HAWC=/data/disk01/home/jasonfan/config-hawc
input=$1
outdir=$2
inputfilename="${1##*/}"
python addvariable.py $1 $2
./add.exe $1 $2${inputfilename/.xcd/add.xcd} $2${inputfilename/.xcd/.csv}
rm $2${inputfilename/.xcd/.csv}
pre="Afterocut_%s_"
ppre="Afterocut_"
suf="_.xcd"
und="_"
outfile=$pre$inputfilename
outname=${inputfilename/.xcd/add.xcd}
aerie-apps-scrappy-cut-dataset --cuts /data/disk01/home/jasonfan/crab/ocut --outfileFormat $2$outfile < $2$outname
rm $2$outname
#for i in `find $test -name "Afterocut_*_$inputfilename" -type f`; do
for i in {0..119}
do
dir=$2$i
mv $2$ppre$i$und$inputfilename $dir
done
for i in {0..119}
do
dir=$test$i
mv $test$ppre$i$und$inputfilename $dir
done