|
21 | 21 | import zipfile |
22 | 22 | import pandas as pd |
23 | 23 | import tfs |
| 24 | +from numpy.exceptions import ComplexWarning |
24 | 25 | from optics_functions.coupling import coupling_via_cmatrix |
25 | 26 |
|
26 | 27 | import omc3.madx_wrapper as madx_wrapper |
27 | 28 | from omc3.optics_measurements.constants import (BETA, DISPERSION, F1001, F1010, |
28 | | - NORM_DISPERSION, PHASE_ADV, TUNE) |
| 29 | + NORM_DISPERSION, PHASE_ADV, TUNE) |
29 | 30 | from omc3.correction.constants import INCR |
30 | 31 | from omc3.model.accelerators.accelerator import Accelerator, AccElementTypes |
31 | 32 | from omc3.utils import logging_tools |
@@ -154,7 +155,7 @@ def _clean_up(temp_dir: Path, num_proc: int) -> None: |
154 | 155 |
|
155 | 156 | def _load_madx_results( |
156 | 157 | variables: List[str], |
157 | | - process_pool: multiprocessing.Pool, |
| 158 | + process_pool, |
158 | 159 | incr_dict: dict, |
159 | 160 | temp_dir: Path |
160 | 161 | ) -> Dict[str, tfs.TfsDataFrame]: |
@@ -213,7 +214,7 @@ def _create_fullresponse_from_dict(var_to_twiss: Dict[str, tfs.TfsDataFrame]) -> |
213 | 214 | resp = np.divide(resp,resp[columns.index(f"{INCR}")]) |
214 | 215 | Q_arr = np.column_stack((resp[columns.index(f"{TUNE}1"), 0, :], resp[columns.index(f"{TUNE}2"), 0, :])).T |
215 | 216 |
|
216 | | - with suppress_warnings(np.ComplexWarning): # raised as everything is complex-type now |
| 217 | + with suppress_warnings(ComplexWarning): # raised as everything is complex-type now |
217 | 218 | return { |
218 | 219 | f"{PHASE_ADV}X": pd.DataFrame(data=resp[columns.index(f"{PHASE_ADV}X")], index=bpms, columns=keys).astype(np.float64), |
219 | 220 | f"{PHASE_ADV}Y": pd.DataFrame(data=resp[columns.index(f"{PHASE_ADV}Y")], index=bpms, columns=keys).astype(np.float64), |
|
0 commit comments