Files
ap/scripts/prepare.sh
2023-08-14 12:52:08 +02:00

49 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
SRC=/sf/jungfrau/applications/sf-dap/sfx/processing
chmod g+w `pwd`
for d in CELL output
do
if [ ! -d ${d} ]
then
mkdir ${d}
fi
done
for f in env_setup.sh run_index.sh
do
if [ ! -e $f ]
then
cp ${SRC}/$f $f
fi
done
echo "Edit file env_setup.sh with correct information (PGROUP, DETECTOR_NAME, BEAMLINE, THRESHOLD, LOGBOOK_URL)"
echo "Put proper geom file as <DETECTOR_NAME>.geom (e.g. JF17T16V01.geom)"
echo "Copy cell files to CELL/ directory (example : lyso.cell, hewl.cell....)"
echo "Make files credentials.json, credentials-*.json (e.g. credentials-1.json, credentials-2.json) with the api key to access logbook"
if [ ! -e DETECTOR_DISTANCE.txt ]
then
echo "DEFAULT 0.09369" > DETECTOR_DISTANCE.txt
echo Make some good guess for detector distance in DETECTOR_DISTANCE.txt file
fi
if [ ! -e BEAM_ENERGY.txt ]
then
echo "DEFAULT 11330.0" > BEAM_ENERGY.txt
echo Make proper beam energy in BEAM_ENERGY.txt file
fi
for f in env_setup.sh run_index.sh DETECTOR_DISTANCE.txt BEAM_ENERGY.txt
do
chmod g+w $f
done
chmod -R g+w CELL