From a895bee049818d92016ff7f5127ba0334a28d57a Mon Sep 17 00:00:00 2001 From: Karim Ahmed <karim.ahmed@xfel.eu> Date: Thu, 26 Sep 2019 08:54:57 +0200 Subject: [PATCH] change correction and characterization nbs --- ...rize_Darks_NewDAQ_FastCCD_NBC_New_Common_Mode.ipynb | 4 ++-- .../CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/notebooks/FastCCD/Characterize_Darks_NewDAQ_FastCCD_NBC_New_Common_Mode.ipynb b/notebooks/FastCCD/Characterize_Darks_NewDAQ_FastCCD_NBC_New_Common_Mode.ipynb index 90d658952..97c2f4106 100644 --- a/notebooks/FastCCD/Characterize_Darks_NewDAQ_FastCCD_NBC_New_Common_Mode.ipynb +++ b/notebooks/FastCCD/Characterize_Darks_NewDAQ_FastCCD_NBC_New_Common_Mode.ipynb @@ -29,7 +29,7 @@ "in_folder = \"/gpfs/exfel/exp/SCS/201930/p900074/raw\" # input folder, required\n", "out_folder = '/gpfs/exfel/data/scratch/setoodeh/DarkRuns' # output folder, required\n", "path_template = 'RAW-R{:04d}-{}-S{{:05d}}.h5' # the template to use to access data\n", - "inset = 'DA05'\n", + "path_inset = 'DA05'\n", "run = 351 # which run to read data from, required\n", "number_dark_frames = 0 # number of images to be used, if set to 0 all available images are used\n", "cluster_profile = \"noDB\" # ipcluster profile to use\n", @@ -146,7 +146,7 @@ " print('\\nYou are analyzing data in FF mode.')\n", " \n", "ped_dir = \"{}/r{:04d}\".format(in_folder, run)\n", - "fp_name = path_template.format(run, inset)\n", + "fp_name = path_template.format(run, path_inset)\n", "fp_path = '{}/{}'.format(ped_dir, fp_name)\n", "filename = fp_path.format(sequence)\n", "\n", diff --git a/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb b/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb index 96326a390..c80d17a47 100644 --- a/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb +++ b/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb @@ -26,7 +26,7 @@ "in_folder = \"/gpfs/exfel/exp/SCS/201802/p002170/raw/\" # input folder, required\n", "out_folder = '/gpfs/exfel/data/scratch/xcal/test/' # output folder, required\n", "path_template = 'RAW-R{:04d}-{}-S{{:05d}}.h5' # path template in hdf5 file\n", - "inset = 'DA05'\n", + "path_inset = 'DA05'\n", "run = 277 # run number\n", "h5path = '/INSTRUMENT/SCS_CDIDET_FCCD2M/DAQ/FCCD:daqOutput/data/image' # path in HDF5 file\n", "h5path_t = '/CONTROL/SCS_CDIDET_FCCD2M/CTRL/LSLAN/inputA/crdg/value' # temperature path in HDF5 file\n", @@ -58,7 +58,7 @@ " import re\n", " import numpy as np\n", " if sequences[0] == -1:\n", - " sequence_files = glob.glob(\"{}/r{:04d}/*DA05-S*.h5\".format(in_folder, run))\n", + " sequence_files = glob.glob(\"{}/r{:04d}/*{}-S*.h5\".format(in_folder, run, path_inset))\n", " seq_nums = set()\n", " for sf in sequence_files:\n", " seqnum = re.findall(r\".*-S([0-9]*).h5\", sf)[0]\n", @@ -156,7 +156,7 @@ " \n", "ped_dir = \"{}/r{:04d}\".format(in_folder, run)\n", "out_folder = \"{}/r{:04d}\".format(out_folder, run)\n", - "fp_name = path_template.format(run, inset)\n", + "fp_name = path_template.format(run, path_inset)\n", "fp_path = '{}/{}'.format(ped_dir, fp_name)\n", "\n", "print(\"Reading data from: {}\\n\".format(fp_path))\n", @@ -245,14 +245,14 @@ " if sequences is None:\n", " for seq in range(len(dirlist)):\n", " \n", - " if path_template.format(run).format(seq) in abs_entry:\n", + " if path_template.format(run, path_inset).format(seq) in abs_entry:\n", " file_list.append(abs_entry)\n", " total_sequences += 1\n", " fsequences.append(seq)\n", " else:\n", " for seq in sequences:\n", " \n", - " if path_template.format(run).format(seq) in abs_entry:\n", + " if path_template.format(run, path_inset).format(seq) in abs_entry:\n", " file_list.append(os.path.abspath(abs_entry))\n", " total_sequences += 1\n", " fsequences.append(seq)\n", -- GitLab