#!/bin/bash

RUN=$1
RUNTYPE=$2

if [ $RUN ] && [ $RUNTYPE ]
    then 
        echo processing run $RUN
#         module load exfel
#         module load exfel_anaconda3/1.1
        sbatch ./start_job_single.sh $RUN '0 1 2 3' $RUNTYPE
        sbatch ./start_job_single.sh $RUN '4 5 6 7' $RUNTYPE
        sbatch ./start_job_single.sh $RUN '8 9 10 11' $RUNTYPE
        sbatch ./start_job_single.sh $RUN '12 13 14 15' $RUNTYPE
    else
        echo please specify a run number and type
        echo available runtypes:
        echo energyscan, energyscan_pumped, static, static_IR, delayscan, timescan
fi