Skip to content
Snippets Groups Projects

feat [Jungfrau][Dark]: Update notebook to write and read ccvs without using calibrationDBRemote

Merged Karim Ahmed requested to merge feat/remove_calibrationDBRemote_usage into master
2 files
+ 17
6
Compare changes
  • Side-by-side
  • Inline
Files
2
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
import multiprocessing
import multiprocessing
import numpy as np
import numpy as np
 
import pasha as psh
import yaml
import yaml
from IPython.display import Markdown, display
from IPython.display import Markdown, display
from extra_data import RunDirectory
from extra_data import RunDirectory
import pasha as psh
from XFELDetAna.plotting.heatmap import heatmapPlot
from XFELDetAna.plotting.heatmap import heatmapPlot
from XFELDetAna.plotting.histogram import histPlot
from XFELDetAna.plotting.histogram import histPlot
from cal_tools.constants import inject_ccv, write_ccv
from cal_tools.constants import inject_ccv, write_ccv
from cal_tools.enums import BadPixels, JungfrauGainMode
from cal_tools.enums import BadPixels, JungfrauGainMode
from cal_tools.jungfrau import jungfraulib
from cal_tools.jungfrau import jungfraulib
from cal_tools.restful_config import calibration_client
from cal_tools.restful_config import (
 
calibration_client,
 
extra_calibration_client,
 
)
from cal_tools.tools import calcat_creation_time
from cal_tools.tools import calcat_creation_time
warnings.filterwarnings('ignore')
warnings.filterwarnings('ignore')
gain_setting=gain_setting,
gain_setting=gain_setting,
gain_mode=gain_mode,
gain_mode=gain_mode,
)
)
 
# This is useful to setup caldb_root from the loaded config.
 
# e.g. switch to test_calcat
 
extra_calibration_client()
cc = calibration_client()
cc = calibration_client()
for pdu in resp['data']:
for pdu in resp['data']:
if pdu['karabo_da'] in karabo_da: # exclude unselected das
if pdu['karabo_da'] in karabo_da: # exclude unselected das
da_to_pdu[pdu['karabo_da']] = pdu['physical_name']
da_to_pdu[pdu['karabo_da']] = pdu['physical_name']
pdu_to_uuid[pdu['physical_name']] = pdu['float_uuid']
pdu_to_uuid[pdu['physical_name']] = pdu['uuid']
first_pdu = resp['data'][0]
first_pdu = resp['data'][0]
detector_info = first_pdu['detector']
detector_info = first_pdu['detector']
Loading