From f5ddf6832a04fb9c36c085703f1d000302b7ff4c Mon Sep 17 00:00:00 2001 From: fscarlier Date: Thu, 17 Aug 2023 16:58:03 +0200 Subject: [PATCH] added phases to output spectra files, untested --- omc3/harpy/constants.py | 1 + omc3/harpy/handler.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/omc3/harpy/constants.py b/omc3/harpy/constants.py index f7244f8c5..d44b32103 100644 --- a/omc3/harpy/constants.py +++ b/omc3/harpy/constants.py @@ -6,6 +6,7 @@ """ # Output Fileextensions -------------------------------------------------------- +FILE_PHASES_EXT = ".phases{plane}" FILE_AMPS_EXT = ".amps{plane}" FILE_FREQS_EXT = ".freqs{plane}" FILE_LIN_EXT = ".lin{plane}" diff --git a/omc3/harpy/handler.py b/omc3/harpy/handler.py index ffc54cd39..0f5a90e59 100644 --- a/omc3/harpy/handler.py +++ b/omc3/harpy/handler.py @@ -16,7 +16,7 @@ from omc3.definitions import formats from omc3.definitions.constants import PLANES, PLANE_TO_NUM as P2N from omc3.harpy import clean, frequency, kicker -from omc3.harpy.constants import (FILE_AMPS_EXT, FILE_FREQS_EXT, FILE_LIN_EXT, +from omc3.harpy.constants import (FILE_PHASES_EXT, FILE_AMPS_EXT, FILE_FREQS_EXT, FILE_LIN_EXT, COL_NAME, COL_TUNE, COL_AMP, COL_MU, COL_NATTUNE, COL_NATAMP, COL_PHASE, COL_ERR) from omc3.utils import logging_tools @@ -173,6 +173,7 @@ def _write_bad_bpms(output_path_without_suffix, plane, bad_bpms_with_reasons): def _write_spectrum(output_path_without_suffix, plane, spectra): tfs.write(f"{output_path_without_suffix}{FILE_AMPS_EXT.format(plane=plane.lower())}", spectra["COEFFS"].abs().T) + tfs.write(f"{output_path_without_suffix}{FILE_PHASES_EXT.format(plane=plane.lower())}", spectra["PHASES"].angle().T) tfs.write(f"{output_path_without_suffix}{FILE_FREQS_EXT.format(plane=plane.lower())}", spectra["FREQS"].T)