Commit 8f71d118 authored by PENGUEN Julien's avatar PENGUEN Julien
Browse files

ajout fichier de sortie contenant les informations sur le run

parent ba65a553
......@@ -467,6 +467,8 @@ fi
#------------------------------------#
#check options presents
#to manage '--select' and '--no_select'
#options
tempo_arg_weight=( ${tab_arg_weight// / } )
tempo_arg_keys=( ${tab_arg_keys// / } )
......@@ -618,7 +620,7 @@ case $taille in
esac
#---------------------#
#--------------------------#
# sort the arrays arguments
# call function_sort_tab
......@@ -866,6 +868,8 @@ case ${sort_arg_keys[0]} in
images_folder[$k]=${area_folder[$k]}"/images"
montages_folder[$k]=${area_folder[$k]}"/montages"
area_ajs[$k]=${tempo_folder[$k]}"/area_"${list_zone[$k]}".ajs"
log_aladin_file[$k]=${area_folder[$k]}"/"${list_zone[$k]}".log"
infos_file[$k]=${area_folder[$k]}"/infos_"${list_zone[$k]}".txt"
#------------------------#
if [ -d ${area_folder[$k]} ]; then
......@@ -904,6 +908,9 @@ case ${sort_arg_keys[0]} in
echo "=> construction of ${area_ajs[$k]} OK"
rm -rf ${images_folder[$k]}
rm -rf ${montages_folder[$k]}
rm ${infos_file[$k]}
rm ${log_aladin_file[$k]}
fi
#---------------------------#
......@@ -948,6 +955,16 @@ case ${sort_arg_keys[0]} in
mkdir ${images_folder[$k]}
mkdir ${montages_folder[$k]}
rm ${area_ajs[$k]}
rm ${infos_file[$k]}
rm ${log_aladin_file[$k]}
echo "=> construction of ${area_ajs[$k]} in progress ..."
function_create_ajs_file ${INPUT_FILE_SURVEYS} ${area_ajs[$k]} ${list_zone[$k]} ${list_ra[k]} ${list_dec[k]} ${images_folder[$k]}
echo "=> construction of ${area_ajs[$k]} OK"
state="RUN"
if [ $force == 'FALSE' ]; then
......@@ -961,6 +978,7 @@ case ${sort_arg_keys[0]} in
mkdir ${images_folder[$k]}
mkdir ${montages_folder[$k]}
state="RUN"
fi
......@@ -975,15 +993,60 @@ case ${sort_arg_keys[0]} in
script_images[$k]="macro "${area_ajs[$k]}
script_montages[$k]="montage -geometry 500x500 -tile ${NB_TILE_BY_LINE}x${NB_TILE_BY_COL} ${images_folder[$k]}/*jpg ${montages_folder[$k]}/${list_zone[$k]}.png"
sudo docker run --name photos_montage_aladin --rm -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME:$HOME --network host -e DISPLAY=$DISPLAY -e USER=$USER -e HOME=$HOME image_photos_montage_aladin-${version} /bin/bash -c "java -jar /var/aladin/Aladin-${version}.jar -nogui -trace -script=${script_images[$k]};${script_montages[$k]} " > ${area_folder[$k]}"/"${list_zone[$k]}".log" 2>&1
sudo docker run --name photos_montage_aladin --rm -v /tmp/.X11-unix:/tmp/.X11-unix -v $HOME:$HOME --network host -e DISPLAY=$DISPLAY -e USER=$USER -e HOME=$HOME image_photos_montage_aladin-${version} /bin/bash -c "java -jar /var/aladin/Aladin-${version}.jar -nogui -trace -script=${script_images[$k]};${script_montages[$k]} " > ${log_aladin_file[$k]} 2>&1
echo "=> Construction OK"
#----------------------------------------#
echo ""
echo "=> For more informations about the construction please see:"
echo ${area_folder[$k]}"/"${list_zone[$k]}".log"
echo ${log_aladin_file[$k]}
echo ""
#----------------------------------------#
#construction of infos_file[$k]
echo "===============================================" > ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "Infos construction of ${list_zone[$k]} " >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo " $(date +'%Y-%m-%d %H-%M-%S') " >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "===============================================" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "--------------------" >> ${infos_file[$k]}
echo "--- Aladin infos ---" >> ${infos_file[$k]}
echo "--------------------" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "Aladin version: $ALADIN_VERSION" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "--------------------------" >> ${infos_file[$k]}
echo "--- Image magick infos ---" >> ${infos_file[$k]}
echo "--------------------------" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "Tile dimension: $NB_TILE_BY_LINE x $NB_TILE_BY_COL" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "-----------------------------------" >> ${infos_file[$k]}
echo "--- photos_montage_aladin infos ---" >> ${infos_file[$k]}
echo "-----------------------------------" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "OPTIONS: $@" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "Input surveys file: $INPUT_FILE_SURVEYS" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "Input areas file: $INPUT_FILE_AREAS" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "Images folder: ${images_folder[$k]}" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "Montages folder: ${montages_folder[$k]}" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "AJS file: ${area_ajs[$k]}" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "log aladin file: ${log_aladin_file[$k]}" >> ${infos_file[$k]}
echo "" >> ${infos_file[$k]}
echo "===============================================" >> ${infos_file[$k]}
#----------------------------------------#
else
echo -e "=> \033[32mINFOS\033[0m : Nothing to do for ${area_folder[$k]} all files are present"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment