diff --git a/README b/README index c6abaff1cf5cf3832d2ce4583e97df6afb5357af..c41f74ce289a447cbcb1449fe3c26272f60ec15a 100644 --- a/README +++ b/README @@ -25,6 +25,9 @@ Additionally, make sure to run in the docker-launch-msplots.sh script with envir whatever you defined for PYAUTOPLOT_TAG). Therefore copy the default inspection-plots-observations.sh script and modify the --export=TAG=latest line, e.g: + +Also in docker/Dockerfile checkout the right branch. TODO: Automate this + ---------------------------------------------------- #!/bin/bash diff --git a/docker/Dockerfile b/docker/Dockerfile index 6040a61c186154f753b051f0241034e4804d8224..ef6b0f0d8a5bae5cdff117a541501af29d16bc33 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -186,7 +186,7 @@ RUN apt-get update -y && \ RUN A=$CX; git clone https://git.astron.nl/ao/sdco/pyautoplot.git ${INSTALLDIR}/pyautoplot && \ cd ${INSTALLDIR}/pyautoplot && \ - git checkout tmss && \ + git checkout master && \ python3 setup.py install diff --git a/launch/dynspec-observation-quick.sh b/launch/dynspec-observation-quick.sh new file mode 100755 index 0000000000000000000000000000000000000000..2156791e771fac98c180a86b1f3477a4db195124 --- /dev/null +++ b/launch/dynspec-observation-quick.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +function remote_parset_lookup() { + parset_host=$1 + sas_id=$2 + parset_key=$3 + + ssh $parset_host "grep $parset_key /localhome/lofarsystem/parsets/rtcp-$sas_id.parset" 2>/dev/null; +} + + +function sas_id_project() { + sas_id=$1 + remote_parset_lookup lofarsys@cbm001 $sas_id 'Observation.Campaign.name'|sed -e's/=/ /g' -e 's/"/ /g'|awk '{ print $2 }'; +} + +OBSID=$1 +PROJECT=`sas_id_project ${OBSID}` + +if [ ! -d /data/dynspec/${PROJECT} ]; then mkdir /data/dynspec/${PROJECT}; fi + +exec sbatch \ + --partition=cpu \ + --ntasks=1 --cpus-per-task=1 \ + --job-name="dynspec-quick-$OBSID" \ + --output=/data/log/dynspec-quick-$OBSID.log \ + --export=TAG=latest \ + /data/home/lofarsys/dynspec/scripts/docker-dynspec-quick.sh "${OBSID}" "${PROJECT}" diff --git a/launch/dynspec-observation-rebin.sh b/launch/dynspec-observation-rebin.sh new file mode 100755 index 0000000000000000000000000000000000000000..36f0e0c1c1a843dbe4f7ffe33d5d9f3981013933 --- /dev/null +++ b/launch/dynspec-observation-rebin.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +function remote_parset_lookup() { + parset_host=$1 + sas_id=$2 + parset_key=$3 + + ssh $parset_host "grep $parset_key /localhome/lofarsystem/parsets/rtcp-$sas_id.parset" 2>/dev/null; +} + + +function sas_id_project() { + sas_id=$1 + remote_parset_lookup lofarsys@cbm001 $sas_id 'Observation.Campaign.name'|sed -e's/=/ /g' -e 's/"/ /g'|awk '{ print $2 }'; +} + +OBSID=$1 +PROJECT=`sas_id_project ${OBSID}` + +if [ ! -d /data/dynspec/${PROJECT} ]; then mkdir /data/dynspec/${PROJECT}; fi + +exec sbatch \ + --partition=cpu \ + --ntasks=1 --cpus-per-task=1 \ + --job-name="dynspec-rebin-$OBSID" \ + --output=/data/log/dynspec-rebin-$OBSID.log \ + --export=TAG=latest \ + /data/home/lofarsys/dynspec/scripts/docker-dynspec-rebin.sh "${OBSID}" "${PROJECT}" diff --git a/launch/inspection-dynspec-observation.sh b/launch/inspection-dynspec-observation.sh new file mode 100755 index 0000000000000000000000000000000000000000..3e530a4d8d06f20bca4cc4e5c1d40a8ac905e6da --- /dev/null +++ b/launch/inspection-dynspec-observation.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Launching Pyautoplot..." +/usr/local/bin/inspection-plots-observation.sh $@ + +echo "Launching QuickLook..." +/data/home/lofarsys/dynspec/scripts/dynspec-observation-quick.sh $@ + +echo "Launching Rebin..." +/data/home/lofarsys/dynspec/scripts/dynspec-observation-rebin.sh $@ diff --git a/launch/inspection-plots-observation.sh b/launch/inspection-plots-observation.sh new file mode 100755 index 0000000000000000000000000000000000000000..21ce76a103055322e4e9a1d539e7e17756a6525e --- /dev/null +++ b/launch/inspection-plots-observation.sh @@ -0,0 +1,13 @@ +#!/bin/bash +OBSID=$1 + +exec sbatch \ + --partition=cpu \ + --nice=500 --time=1-0 \ + --qos=inspectionplots \ + --ntasks=49 --cpus-per-task=2 \ + --ntasks-per-node=7 \ + --job-name="inspection-$OBSID" \ + --output=/data/log/inspection-plots-$OBSID.log \ + --export=TAG=latest \ + docker-launch-msplots.sh "$@" diff --git a/scripts/launch-msplots.sh b/scripts/launch-msplots.sh index 30de50744e3718a6c29d04c12922c17f51724f75..7812bb056f211542f8dc5c68844f068d79b8ab95 100755 --- a/scripts/launch-msplots.sh +++ b/scripts/launch-msplots.sh @@ -13,12 +13,11 @@ # depending on the TAG environment variable (if it exists and doesn't say 'latest'). For normal use, leave TESTLINE an # empty string (""). Note that TESTLINE doesn't necessarily propagate to programs/scripts called from within this one. #TESTLINE="-test" -TESTLINE="-tmss" -#TESTLINE="" +TESTLINE="" # Normally, one would want to use pyautoplot:latest (PYAUTOPLOT_TAG=latest). This can be overriden however -PYAUTOPLOT_TAG=tmss -#PYAUTOPLOT_TAG=latest +#PYAUTOPLOT_TAG=test +PYAUTOPLOT_TAG=latest HOSTNAME=`hostname` PATH="$PATH:/opt/cep/pyautoplot/bin"