BPM Calibration Utilities

Beta

The functions in this script compute the calibration factors for the LHC BPMs using the beta method. The get_calibration_factors_from_beta is intended to be used with the script bpm_calibration.py.

pylhc.calibration.beta.get_calibration_factors_from_beta(ips: Sequence[int], input_path: Path) Dict[str, DataFrame][source]

This function is the main function to compute the calibration factors for the beta method. Given a list of IPs and the path containing the corresponding Tfs files, this function returns the calibration factors using both the beta from phase and its fitted values.

Parameters:
  • ips (Sequence[int]) -- IPs to compute the calibration factors for.

  • input_path (Path) -- Path of the directory containing the beta files.

Returns:

The returned DataFrame object contains the calibration factors for each BPM along with their error. Both the beta from phase and beta from phase fitted values are used, resulting in 6 columns:

  • NAME: BPM Name

  • S: Position

  • CALIBRATION: Calibration factors computed from beta from phase

  • ERROR_CALIBRATION: Associated error to the above calibration factors

  • CALIBRATION_FIT: Calibration factor computed from fitted beta from phase

  • ERROR_CALIBRATION_FIT: Associated error to the above calibration factors

Return type:

Dict[str, pd.DataFrame]

Dispersion

The functions in this script compute the calibration factors for the LHC BPMs using the dispersion method. The get_calibration_factors_from_dispersion is intended to be used with the script bpm_calibration.py.

pylhc.calibration.dispersion.get_calibration_factors_from_dispersion(ips: List[int], input_path: Path) Dict[str, DataFrame][source]

This function is the main function to compute the calibration factors for the dispersion method. Given an IP and a path containing the corresponding Tfs files, this function returns the calibration factors using both the dispersion and its fitted values. The calibration factors based on the dispersion are only computed for the X plane.

Parameters:
  • ips (List[int]) -- IPs to compute the calibration factors for.

  • input_path (Path) -- Path of the directory containing the beta files.

Returns:

The returned DataFrame object contains the calibration factors for each BPM along with their error. Both the dispersion and dispersion from fit values are used, resulting in 6 columns:

  • NAME: BPM Name

  • S: Position

  • CALIBRATION: Calibration factors computed from the dispersion

  • ERROR_CALIBRATION: Associated error to the above calibration factors

  • CALIBRATION_FIT: Calibration factors computed from the fitted dispersion

  • ERROR_CALIBRATION_FIT: Associated error to the above calibration factors

Return type:

Dict[str, pd.DataFrame]