Skip to content
Snippets Groups Projects
Commit 0aa29adf authored by Karim Ahmed's avatar Karim Ahmed Committed by Thomas Kluyver
Browse files

fix: handle CCVAlreadyInject case using a warning

parent 64c32ff7
No related branches found
No related tags found
1 merge request!1026Feat[Jungfrau]: Inject CCVs using RESTful API
......@@ -102,18 +102,9 @@
"from cal_tools.enums import BadPixels, JungfrauGainMode\n",
"from cal_tools.jungfrau import jungfraulib\n",
"from cal_tools.restful_config import (\n",
<<<<<<< HEAD
" extra_calibration_client,\n",
")\n",
"from cal_tools.tools import calcat_creation_time, pdus_by_detector_id\n",
=======
" calibration_client,\n",
" extra_calibration_client,\n",
")\n",
"from cal_tools.tools import calcat_creation_time\n",
"\n",
"warnings.filterwarnings('ignore')\n",
>>>>>>> a4ce232f (fix: small fixes after testing part of injecting ccvs)
"\n",
"matplotlib.use('agg')\n",
"%matplotlib inline"
......
<<<<<<< HEAD
import binascii
import time
=======
import binascii
import time
import warnings
from datetime import datetime, timezone
>>>>>>> 055e516a (fix: handle CCVAlreadyInject case using a warning)
from hashlib import md5
from pathlib import Path
from shutil import copyfile
from struct import pack, unpack
<<<<<<< HEAD
from typing import List, Optional, Union
=======
>>>>>>> 055e516a (fix: handle CCVAlreadyInject case using a warning)
import h5py
import numpy as np
......@@ -15,6 +26,12 @@ from cal_tools.calcat_interface2 import (
get_default_caldb_root,
)
from cal_tools.restful_config import calibration_client
from cal_tools.tools import run_prop_seq_from_path
class CCVAlreadyInjected(UserWarning):
"""Exception when same CCV was already injected."""
pass
CONDITION_NAME_MAX_LENGTH = 60
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment