"""
Module tune_analysis.constants
----------------------------------
"""
import pytz
# Global 'Parameters' for easy editing #########################################
[docs]def get_planes():
""" Names for the planes."""
return "XY"
[docs]def get_experiment_timezone():
""" Get time zone for measurement data. """
return pytz.timezone("Europe/Zurich")
[docs]def get_timber_bbq_key(plane, beam):
""" Key to extract bbq from timber. """
return 'lhc.bofsu:eigen_freq_{:d}_b{:d}'.format({"X": 1, "Y": 2}[plane], beam)
# Kickac Headers ###############################################################
[docs]def get_tstart_head():
""" Label for fill start time from header. """
return "START_TIME"
[docs]def get_tend_head():
""" Label for fill end time from header. """
return "END_TIME"
# Kickac Columns ###############################################################
[docs]def get_time_col():
""" Label for the TIME column."""
return "TIME"
[docs]def get_bbq_col(plane):
""" Label for the BBQ column """
return 'BBQ{:s}'.format(plane.upper())
[docs]def get_mav_col(plane):
""" Label for the moving average BBQ column. """
return "{:s}MAV".format(get_bbq_col(plane))
[docs]def get_used_in_mav_col(plane):
""" Label for the column showing if BBQ value was used in moving average. """
return "{:s}INMAV".format(get_bbq_col(plane))
[docs]def get_mav_std_col(plane):
""" Label for the standard deviation of the moving average data. """
return "{:s}MAVSTD".format(get_bbq_col(plane))
[docs]def get_total_natq_std_col(plane):
""" Return the total standard deviation for the natural tune. """
return "{:s}TOTSTD".format(get_natq_col(plane))
[docs]def get_natq_col(plane):
""" Label for the natural tune column. """
return 'NATQ{:s}'.format(plane.upper())
[docs]def get_natq_corr_col(plane):
""" Label for the corrected natural tune column. """
return "{:s}CORR".format(get_natq_col(plane))
[docs]def get_natq_err_col(plane):
""" Label for the natural tune error column. """
return "{:s}RMS".format(get_natq_col(plane))
[docs]def get_action_col(plane):
""" Label for the action column. """
return "2J{:s}RES".format(plane.upper())
[docs]def get_action_err_col(plane):
""" Label for the action error column. """
return get_action_col("{:s}STD".format(plane))
# Plotting #####################################################################
[docs]def get_paired_lables(action_plane, tune_plane):
""" Labels for the action/tune plots. """
return (r'$2J_{:s} \quad [\mu m]$'.format(action_plane.lower()),
r'$\Delta Q_{:s}$'.format(tune_plane.lower()))