diff --git a/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb b/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb index 3401a39b86ab21ce34ab066d60202ba0cb5051bc..8a1212ac54115779e07716a49fa8ca22e0756dd7 100644 --- a/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb +++ b/notebooks/Jungfrau/Jungfrau_dark_analysis_all_gains_burst_mode_NBC.ipynb @@ -18,23 +18,23 @@ "outputs": [], "source": [ "cluster_profile = 'noDB' # the ipcluster profile name\n", - "in_folder = '/gpfs/exfel/exp/FXE/201931/p900089/raw/' # folder under which runs are located, required\n", - "out_folder = '/gpfs/exfel/data/scratch/karnem/test_dark/' # path to place reports at, required\n", + "in_folder = '/gpfs/exfel/exp/FXE/202030/p900121/raw/' # folder under which runs are located, required\n", + "out_folder = '/gpfs/exfel/exp/HSLAB/201831/p900053/proc/proc_data/FXE/p900121/test_dark/' # path to place reports at, required\n", "sequences = 1 # number of sequence files in that run\n", - "run_high = 86 # run number for G0 dark run, required\n", - "run_med = 87 # run number for G1 dark run, required\n", - "run_low = 88 # run number for G2 dark run, required\n", + "run_high = 130 # run number for G0 dark run, required\n", + "run_med = 131 # run number for G1 dark run, required\n", + "run_low = 132 # run number for G2 dark run, required\n", "\n", - "karabo_da = ['JNGFR01'] # list of data aggregators, which corresponds to different JF modules\n", - "karabo_id = \"FXE_XAD_JF1M\" # bla karabo prefix of Jungfrau devices\n", + "karabo_da = ['JNGFR03'] # list of data aggregators, which corresponds to different JF modules\n", + "karabo_id = \"FXE_XAD_JF500K\" # bla karabo prefix of Jungfrau devices\n", "karabo_id_control = \"\" # if control is on a different ID, set to empty string if it is the same a karabo-id\n", - "receiver_id = 'RECEIVER-{}' # inset for receiver devices\n", + "receiver_id = 'JNGFR{:02d}' # inset for receiver devices\n", "receiver_control_id = \"CONTROL\" # inset for control devices\n", "path_template = 'RAW-R{:04d}-{}-S{{:05d}}.h5' # template to use for file name, double escape sequence number\n", "h5path = '/INSTRUMENT/{}/DET/{}:daqOutput/data' # path in H5 file under which images are located\n", "h5path_run = '/RUN/{}/DET/{}' # path to run data\n", "h5path_cntrl = '/CONTROL/{}/DET/{}' # path to control data\n", - "karabo_da_control = \"JNGFR01\" # file inset for control data\n", + "karabo_da_control = \"JNGFRCTRL00\" # file inset for control data\n", "\n", "use_dir_creation_date = True # use dir creation date\n", "cal_db_interface = 'tcp://max-exfl016:8016' # calibrate db interface to connect to\n", @@ -44,7 +44,7 @@ "\n", "integration_time = 1000 # integration time in us, will be overwritten by value in file\n", "bias_voltage = 90 # sensor bias voltage in V, will be overwritten by value in file\n", - "badpixel_threshold_sigma = 20. # bad pixels defined by values outside n times this std from median\n", + "badpixel_threshold_sigma = 5. # bad pixels defined by values outside n times this std from median\n", "offset_abs_threshold_low = [1000, 10000, 10000] # absolute bad pixel threshold in terms of offset, lower values\n", "offset_abs_threshold_high = [8000, 15000, 15000] # absolute bad pixel threshold in terms of offset, upper values\n", "chunkSize = 10 # iteration chunk size, needs to match or be less than number of images in a sequence file\n", @@ -83,7 +83,7 @@ "from XFELDetAna.detectors.jungfrau import readerPSI as jfreaderPSI\n", "from XFELDetAna.detectors.jungfrau import reader as jfreader\n", "from XFELDetAna.detectors.jungfrau.jf_chunk_reader import JFChunkReader\n", - "from XFELDetAna.detectors.jungfrau.util import non_empty_trains, count_n_files, rollout_data, sanitize_data_cellid\n", + "from XFELDetAna.detectors.jungfrau.util import count_n_files, rollout_data, sanitize_data_cellid\n", "import glob\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline\n", @@ -236,7 +236,7 @@ " \n", " \n", " \n", - " idxs = non_empty_trains(trainId)\n", + " idxs = np.nonzero(trainId)[0]\n", " images = images[..., idxs]\n", " gainmaps = gainmaps[..., idxs]\n", " fr_num = fr_num[..., idxs]\n", @@ -409,8 +409,8 @@ "bad_pixels_map = np.zeros(noise_map.shape, np.uint32)\n", "def eval_bpidx(d):\n", "\n", - " mdn = np.nanmedian(d, axis=(0, 1, 2))[None, None, None, :]\n", - " std = np.nanstd(d, axis=(0, 1, 2))[None, None, None, :] \n", + " mdn = np.nanmedian(d, axis=(0, 1))[None, None, :, :]\n", + " std = np.nanstd(d, axis=(0, 1))[None, None, :, :] \n", " idx = (d > badpixel_threshold_sigma*std+mdn) | (d < (-badpixel_threshold_sigma)*std+mdn)\n", " \n", " return idx\n", @@ -516,7 +516,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.6.7" } }, "nbformat": 4,