diff --git a/bin/slurm_calibrate.sh b/bin/slurm_calibrate.sh index 44be0e93e511c491fe6171badb0e0f49c708d1f2..6b43b5065f23f4fdf0c4cbc0617a70de52cb1285 100755 --- a/bin/slurm_calibrate.sh +++ b/bin/slurm_calibrate.sh @@ -52,7 +52,7 @@ fi echo "Running script" -${jupyter_path} nbconvert --to rst --ExecutePreprocessor.timeout=36000 --ExecutePreprocessor.allow_errors=True --TemplateExporter.exclude_input=True --execute ${nb_path} +${jupyter_path} nbconvert --to rst --ExecutePreprocessor.timeout=86400 --ExecutePreprocessor.allow_errors=True --TemplateExporter.exclude_input=True --execute ${nb_path} # stop the cluster if requested if [ "${uuid}" != "NO_CLUSTER" ] diff --git a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb index d0c8b178e465972ce86aade7d26f3d8502732e70..d3832232a0956c87e676e2909479aefdd36b7552 100644 --- a/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb +++ b/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb @@ -23,13 +23,13 @@ "outputs": [], "source": [ "cluster_profile = \"noDB\"\n", - "in_folder = \"/gpfs/exfel/exp/MID/201931/p900107/raw\" # the folder to read data from, required\n", - "out_folder = \"/gpfs/exfel/data/scratch/ahmedk/test/AGIPD_Corr\" # the folder to output to, required\n", + "in_folder = \"/gpfs/exfel/exp/SPB/202030//p900119/raw\" # the folder to read data from, required\n", + "out_folder = \"/gpfs/exfel/data/scratch/ahmedk/test/AGIPD_SPB4\" # the folder to output to, required\n", "sequences = [-1] # sequences to correct, set to -1 for all, range allowed\n", "modules = [-1] # modules to correct, set to -1 for all, range allowed\n", - "run = 11 # runs to process, required\n", + "run = 80 # runs to process, required\n", "\n", - "karabo_id = \"MID_DET_AGIPD1M-1\" # karabo karabo_id\n", + "karabo_id = \"SPB_DET_AGIPD1M-1\" # karabo karabo_id\n", "karabo_da = ['-1'] # a list of data aggregators names, Default [-1] for selecting all data aggregators\n", "receiver_id = \"{}CH0\" # inset for receiver devices\n", "path_template = 'RAW-R{:04d}-{}-S{:05d}.h5' # the template to use to access data\n", @@ -37,7 +37,7 @@ "h5path_idx = 'INDEX/{}/DET/{}:xtdf/' # path in the HDF5 file to images\n", "h5path_ctrl = '/CONTROL/{}/MDL/FPGA_COMP_TEST' # path to control information\n", "karabo_id_control = \"SPB_IRU_AGIPD1M1\" # karabo-id for control device\n", - "karabo_da_control = 'DA02' # karabo DA for control infromation\n", + "karabo_da_control = 'AGIPD1MCTRL00' # karabo DA for control infromation\n", "\n", "use_dir_creation_date = True # use the creation data of the input dir for database queries\n", "cal_db_interface = \"tcp://max-exfl016:8015#8045\" # the database interface to use\n", @@ -204,7 +204,8 @@ "metadata": {}, "outputs": [], "source": [ - "control_fname = '{}/RAW-R{:04d}-{}-S00000.h5'.format(in_folder, run, karabo_da_control)\n", + "control_fname = f'{in_folder}/r{run:04d}/RAW-R{run:04d}-{karabo_da_control}-S00000.h5'\n", + "h5path_ctrl = h5path_ctrl.format(karabo_id_control)\n", "\n", "if gain_setting == 0.1:\n", " if creation_time.replace(tzinfo=None) < parser.parse('2020-01-31'):\n", @@ -234,8 +235,7 @@ " ', '.join([f\"Q{x // 4 + 1}M{x % 4 + 1}\" for x in modules]))\n", "\n", "h5path = h5path.format(karabo_id, receiver_id)\n", - "h5path_idx = h5path_idx.format(karabo_id, receiver_id)\n", - "h5path_ctrl = h5path_ctrl.format(karabo_id_control)" + "h5path_idx = h5path_idx.format(karabo_id, receiver_id)" ] }, { @@ -584,7 +584,7 @@ "while not done:\n", " dones = []\n", " first = True\n", - " for i in range(len(modules)):\n", + " for i in modules:\n", " qm = f\"Q{i//4+1}M{i%4+1}\"\n", " if qm in mapped_files and not mapped_files[qm].empty():\n", " fname_in = str(mapped_files[qm].get())\n", diff --git a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb index 13ebd016af104dc0ce815bd2ee8926d1ee606cc6..655182d2d13574fb14c4da0b1fe17889d4ef0b33 100644 --- a/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb +++ b/notebooks/AGIPD/AGIPD_Retrieve_Constants_Precorrection.ipynb @@ -23,18 +23,18 @@ "outputs": [], "source": [ "cluster_profile = \"noDB\"\n", - "in_folder = \"/gpfs/exfel/exp/MID/201931/p900107/raw\" # the folder to read data from, required\n", - "out_folder = \"/gpfs/exfel/data/scratch/ahmedk/test/AGIPD_Corr\" # the folder to output to, required\n", + "in_folder = \"/gpfs/exfel/exp/SPB/202030/p900119/raw\" # the folder to read data from, required\n", + "out_folder = \"/gpfs/exfel/data/scratch/ahmedk/test/AGIPD_\" # the folder to output to, required\n", "sequences = [-1] # sequences to correct, set to -1 for all, range allowed\n", "modules = [-1] # modules to correct, set to -1 for all, range allowed\n", - "run = 11 # runs to process, required\n", + "run = 80 # runs to process, required\n", "\n", - "karabo_id = \"MID_DET_AGIPD1M-1\" # karabo karabo_id\n", + "karabo_id = \"SPB_DET_AGIPD1M-1\" # karabo karabo_id\n", "karabo_da = ['-1'] # a list of data aggregators names, Default [-1] for selecting all data aggregators\n", "path_template = 'RAW-R{:04d}-{}-S{:05d}.h5' # the template to use to access data\n", "h5path_ctrl = '/CONTROL/{}/MDL/FPGA_COMP_TEST' # path to control information\n", "karabo_id_control = \"SPB_IRU_AGIPD1M1\" # karabo-id for control device\n", - "karabo_da_control = 'DA02' # karabo DA for control infromation\n", + "karabo_da_control = 'AGIPD1MCTRL00' # karabo DA for control infromation\n", "\n", "use_dir_creation_date = True # use the creation data of the input dir for database queries\n", "cal_db_interface = \"tcp://max-exfl016:8015#8045\" # the database interface to use\n", @@ -156,7 +156,8 @@ "metadata": {}, "outputs": [], "source": [ - "control_fname = f'{in_folder}/RAW-R{run:04d}-{karabo_da_control}-S00000.h5'\n", + "control_fname = f'{in_folder}/r{run:04d}/RAW-R{run:04d}-{karabo_da_control}-S00000.h5'\n", + "h5path_ctrl = h5path_ctrl.format(karabo_id_control)\n", "\n", "if gain_setting == 0.1:\n", " if creation_time.replace(tzinfo=None) < parser.parse('2020-01-31'):\n", @@ -178,8 +179,7 @@ "else:\n", " modules = [int(x[-2:]) for x in karabo_da]\n", "\n", - "\n", - "h5path_ctrl = h5path_ctrl.format(karabo_id_control)" + "\n" ] }, {