diff --git a/omc3/check_corrections.py b/omc3/check_corrections.py index f12e7e99c..a3b5ed615 100644 --- a/omc3/check_corrections.py +++ b/omc3/check_corrections.py @@ -109,7 +109,7 @@ Filepattern to use to find correction files in folders (as regex). - default: ``^changeparameters*?\.madx$`` + default: ``^changeparameters*?\\.madx$`` - **individual_to_input**: diff --git a/omc3/correction/sequence_evaluation.py b/omc3/correction/sequence_evaluation.py index bc20bd7aa..13a327fa3 100644 --- a/omc3/correction/sequence_evaluation.py +++ b/omc3/correction/sequence_evaluation.py @@ -234,7 +234,7 @@ def _create_basic_job(accel_inst: Accelerator, k_values: List[str], variables: S # create a survey and save it to a temporary file job_content += ( "select, flag=survey, clear;\n" - f"select, flag=survey, pattern='^M.*\.B{accel_inst.beam:d}$', COLUMN=NAME, L;\n" + f"select, flag=survey, pattern='^M.*\\.B{accel_inst.beam:d}$', COLUMN=NAME, L;\n" "survey, file='%(TEMPFILE)s';\n" "readmytable, file='%(TEMPFILE)s', table=mytable;\n" "n_elem = table(mytable, tablelength);\n" diff --git a/omc3/definitions/optics.py b/omc3/definitions/optics.py index 14c76c37e..b6a7502d8 100644 --- a/omc3/definitions/optics.py +++ b/omc3/definitions/optics.py @@ -183,8 +183,8 @@ def delta_label(self): return self._delta_label if self.label.startswith("$"): - return f"$\Delta {self.label[1:]}" - return f"$\Delta$ {self.label}" + return fr"$\Delta {self.label[1:]}" + return fr"$\Delta$ {self.label}" # Defined Columns -------------------------------------------------------------- @@ -195,7 +195,7 @@ def delta_label(self): NORM_DISPERSION_COLUMN = ColumnsAndLabels(NORM_DISPERSION, _label=ylabels['norm_dispersion'], _text_label='normalized dispersion') PHASE_COLUMN = ColumnsAndLabels(PHASE, _label=ylabels['phase'], _text_label='phase') TOTAL_PHASE_COLUMN = ColumnsAndLabels(PHASE, _label=ylabels['phase'], _text_label='total phase') -PHASE_ADVANCE_COLUMN = ColumnsAndLabels(f'{PHASE_ADV}{{0}}{MDL}', _label='Phase Advance [$2 \pi$]', _text_label='phase advance') +PHASE_ADVANCE_COLUMN = ColumnsAndLabels(f'{PHASE_ADV}{{0}}{MDL}', _label=r'Phase Advance [$2 \pi$]', _text_label='phase advance') S_COLUMN = ColumnsAndLabels(S, _label='Location [m]', _text_label='longitudinal location', needs_plane=False) RDT_AMPLITUDE_COLUMN = ColumnsAndLabels(AMPLITUDE, _label=ylabels['absolute'], _text_label='amplitude', needs_plane=False) # label needs rdt diff --git a/omc3/plotting/plot_optics_measurements.py b/omc3/plotting/plot_optics_measurements.py index 488608e45..5ed3aaaed 100644 --- a/omc3/plotting/plot_optics_measurements.py +++ b/omc3/plotting/plot_optics_measurements.py @@ -52,7 +52,7 @@ - **ip_search_pattern**: In case your IPs have a weird name. Specify regex pattern. - Default: ``IP\d$`` + Default: ``IP\\d$`` - **lines_manual** *(DictAsString)*: List of manual lines to plot. Need to contain arguments for axvline, and may contain the additional keys "text" and "loc" which is one of ['bottom', 'top', 'line bottom', 'line top'] diff --git a/omc3/scripts/merge_kmod_results.py b/omc3/scripts/merge_kmod_results.py index b2d0b0d14..3b081d885 100644 --- a/omc3/scripts/merge_kmod_results.py +++ b/omc3/scripts/merge_kmod_results.py @@ -146,7 +146,7 @@ def get_lumi_imbalance(data_frame: tfs.TfsDataFrame) -> Tuple[UFloat, UFloat, UF .. math:: \\sigma_{\\frac{L_{IP1}}{L_{IP5}}} = \\frac{1}{2}\\frac{L_{IP1}}{L_{IP5}} - \\cdot \\sqrt{\\sum_{\substack{z \\in (x,y) \\\\ i \\in (IP1, IP5) }} + \\cdot \\sqrt{\\sum_{\\substack{z \\in (x,y) \\\\ i \\in (IP1, IP5) }} {\\frac{\\sigma^2_{\\beta_{z1,i}} + \\sigma^2_{\\beta_{z2,i}}} {(\\beta_{z1,i}+\\beta_{z2,i})^2}}} Args: diff --git a/omc3/tune_analysis/constants.py b/omc3/tune_analysis/constants.py index ff8a4ae32..f1696fb00 100644 --- a/omc3/tune_analysis/constants.py +++ b/omc3/tune_analysis/constants.py @@ -187,7 +187,7 @@ def get_tune_label(plane: str, scale: int = None) -> str: """ Tune label for the action/tune plots. """ unit = "" if scale: - unit = f" \quad [10^{{{scale:d}}}]" + unit = fr" \quad [10^{{{scale:d}}}]" return fr"$\Delta Q_{plane.lower():s}{unit}$"