diff --git a/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb b/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb index a731835cedaeabb937483308f7790ebe2e3bfdef..0017849f1bfd4cd6da1811505ed627db52a0b5ba 100644 --- a/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb +++ b/notebooks/FastCCD/CorrectionNotebook_NewDAQ_FastCCD_NBC.ipynb @@ -22,11 +22,11 @@ }, "outputs": [], "source": [ - "in_folder = \"/gpfs/exfel/exp/DETLAB/201931/p900104/raw/\" # input folder, required\n", - "out_folder = '/gpfs/exfel/data/scratch/ahmedk/test/fastccd' # output folder, required\n", + "in_folder = \"/gpfs/exfel/exp/SCS/201930/p900074/raw\" # input folder, required\n", + "out_folder = '/gpfs/exfel/data/scratch/karnem/test/fastccd' # output folder, required\n", "path_template = 'RAW-R{:04d}-{}-S{{:05d}}.h5' # path template in hdf5 file\n", - "path_inset = 'DA01'\n", - "run = 114 # run number\n", + "path_inset = 'DA05'\n", + "run = 453 # 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", "h5path_cntrl = '/RUN/SCS_CDIDET_FCCD2M/DET/FCCD' # path to control data\n", @@ -449,9 +449,9 @@ }, "outputs": [], "source": [ - "## relative gain\n", + "# relative gain\n", "if corr_bools.get('relgain'):\n", - " \n", + "\n", " relgain = Constants.CCD(DetectorTypes.fastCCD).RelativeGain()\n", "\n", " # set the operating condition\n", @@ -463,16 +463,20 @@ " photon_energy=photon_energy_gain_map)\n", "\n", " relgain, relgain_time = get_constant_from_db_and_time(device=Detectors.fastCCD1,\n", - " constant=relgain,\n", - " condition=condition,\n", - " empty_constant=None,\n", - " cal_db_interface=cal_db_interface, \n", - " creation_time=creation_time,\n", - " timeout=cal_db_timeout, print_once=False)\n", + " constant=relgain,\n", + " condition=condition,\n", + " empty_constant=None,\n", + " cal_db_interface=cal_db_interface,\n", + " creation_time=creation_time,\n", + " timeout=cal_db_timeout, print_once=False)\n", "\n", " # TODO: CHECK IF THIS FLIPPING IS CORRECT\n", - " relGain = relgain[::-1,...]\n", - " print('Relative Gain was taken with creation-date:', relgain_time)" + " if relgain is None:\n", + " corr_bools[\"relgain\"] = False\n", + " print('Relative Gain was not found. Proceed without Relative Gain correction.')\n", + " else:\n", + " relGain = relgain[::-1, ...]\n", + " print('Relative Gain was taken with creation-date:', relgain_time)" ] }, {