Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alice Donini
lst-analysis
Commits
7bce02b3
Commit
7bce02b3
authored
Feb 25, 2022
by
Alice Donini
Browse files
add script to merge real file
parent
f68de067
Changes
1
Hide whitespace changes
Inline
Side-by-side
bash_scripts/merge_file.sh
0 → 100644
View file @
7bce02b3
#!/bin/bash
#Script to merge real data.
#Change paths according to your system
#DATES=( 20201118 20201119 20201120 )
DATES
=(
20201120
)
VERSION
=
"v0.9.2"
#SUFFIX="_tuned_main_island"
CLEANING
=
"tailcut84"
INDIR
=
/fefs/aswg/workspace/alice.donini/Analysis/data/DL2/
SCRIPT
=
"/fefs/aswg/workspace/alice.donini/Software/cta-lstchain/lstchain/scripts/lstchain_merge_hdf5_files.py"
for
date
in
"
${
DATES
[@]
}
"
do
DIR
=
$INDIR
/
$date
/
$VERSION
/
$CLEANING
/
mkdir
-p
${
DIR
}
/merged
FILES
=
`
ls
$DIR
/dl2
*
.h5
`
current_run
=
0000
for
f
in
$FILES
do
b
=
$(
basename
$f
)
run
=
${
b
:14:-8
}
if
[
"
$run
"
-eq
"
$current_run
"
]
then
continue
else
current_run
=
$run
echo
$run
OUTNAME
=
${
DIR
}
/merged/
'dl2_LST-1.Run0'
$run
'.h5'
if
[
!
-f
$OUTNAME
]
then
srun
-p
long
-o
$DIR
/run_
${
run
}
_merge.log python
$SCRIPT
-d
$DIR
-o
$OUTNAME
-r
$run
--smart
False &
fi
fi
done
done
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment