pytimber.LoggingDB.get_interval_by_lhc_modes
- LoggingDB.get_interval_by_lhc_modes(t1: Union[str, datetime, datetime64, timedelta, int, int64], t2: Union[str, datetime, datetime64, timedelta, int, int64], mode1: str, mode2: str, mode1time: str = 'startTime', mode2time: str = 'endTime', mode1idx: int = 0, mode2idx: int = -1) List[FillInterval]
Returns a list of FillInterval objects for the given time window and two LHC beam modes
The optional parameters ‘mode[12]time’ can take ‘startTime’ or ‘endTime’ and select which time to use for the given mode. The optional parameter ‘mode[12]idx’ selects which mode should be used in case of multiple occurrence of the given mode.
- Parameters:
t1 – The start time of the interval. Can be a string, datetime object, datetime64 object or int.
t2 – The end time of the interval. Can be a string, datetime object, datetime64 object or int.
mode1 – The name of the first beam mode (“SETUP”, STABLE” etc…).
mode2 – The name of the second beam mode.
mode1time – The attribute name (“startTime” or “endTime”) of the time for mode1, defaults to “startTime”.
mode2time – The attribute name (“startTime” or “endTime”) of the time for mode2, defaults to “endTime”.
mode1idx – The index of the occurrence of the first beam mode to use. Defaults to 0.
mode2idx – The index of the occurrence of the second beam mode to use. Defaults to -1.
- Returns:
A list of FillInterval objects containing the fill number and the start and end times for mode1 and mode2.