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 a6ecc6cbcab011f984e6c0af461bf23efd50070d..97c2f4106c9e8118118f917eec2e409e4ad83f46 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 @@ -28,7 +28,8 @@ "\n", "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}-DA05-S{{:05d}}.h5' # the template to use to access data\n", + "path_template = 'RAW-R{:04d}-{}-S{{:05d}}.h5' # the template to use to access data\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", @@ -145,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)\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 78bd8d21a2c06d28d9267bee763ad0c923e11e4f..c80d17a473346ec052092086a50245488adcca1a 100644 --- a/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb +++ b/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb @@ -25,7 +25,8 @@ "source": [ "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}-DA05-S{{:05d}}.h5' # path template in hdf5 file\n", + "path_template = 'RAW-R{:04d}-{}-S{{:05d}}.h5' # path template in hdf5 file\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", @@ -57,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", @@ -80,8 +81,7 @@ "ExecuteTime": { "end_time": "2018-12-06T15:54:23.455376Z", "start_time": "2018-12-06T15:54:23.413579Z" - }, - "collapsed": false + } }, "outputs": [], "source": [ @@ -141,8 +141,7 @@ "ExecuteTime": { "end_time": "2018-12-06T15:54:23.679069Z", "start_time": "2018-12-06T15:54:23.662821Z" - }, - "collapsed": false + } }, "outputs": [], "source": [ @@ -157,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)\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", @@ -181,8 +180,7 @@ "ExecuteTime": { "end_time": "2018-12-06T15:54:23.913269Z", "start_time": "2018-12-06T15:54:23.868910Z" - }, - "collapsed": false + } }, "outputs": [], "source": [ @@ -247,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", @@ -268,8 +266,7 @@ "ExecuteTime": { "end_time": "2018-12-06T18:43:39.776018Z", "start_time": "2018-12-06T18:43:39.759185Z" - }, - "collapsed": false + } }, "outputs": [], "source": [ @@ -300,8 +297,7 @@ "ExecuteTime": { "end_time": "2018-12-06T15:54:28.254544Z", "start_time": "2018-12-06T15:54:24.709521Z" - }, - "collapsed": false + } }, "outputs": [], "source": [ @@ -1258,7 +1254,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.6" + "version": "3.6.7" }, "latex_envs": { "LaTeX_envs_menu_present": true,