@@ -57,21 +57,21 @@ def read_tbt(file_path: Union[str, Path], remove_trailing_bpm_plane: bool = True
5757 bpm_names = np .array (sdds_file .values [BPM_NAMES ])
5858 bpm_planes = np .array (sdds_file .values [BPM_PLANES ]).astype (bool )
5959
60- ver_bpms = bpm_names [bpm_planes ]
61- hor_bpms = bpm_names [~ bpm_planes ]
60+ bpm_names_y = bpm_names [bpm_planes ]
61+ bpm_names_x = bpm_names [~ bpm_planes ]
6262
63- tbt_data_x = [sdds_file .values [bpm ] for bpm in hor_bpms ]
64- tbt_data_y = [sdds_file .values [bpm ] for bpm in ver_bpms ]
63+ tbt_data_x = [sdds_file .values [bpm ] for bpm in bpm_names_x ]
64+ tbt_data_y = [sdds_file .values [bpm ] for bpm in bpm_names_y ]
6565
6666 if remove_trailing_bpm_plane :
6767 pattern = re .compile ("\.[HV]$" , flags = re .IGNORECASE )
68- hor_bpms = [pattern .sub ("" , bpm ) for bpm in hor_bpms ]
69- ver_bpms = [pattern .sub ("" , bpm ) for bpm in ver_bpms ]
68+ bpm_names_x = [pattern .sub ("" , bpm ) for bpm in bpm_names_x ]
69+ bpm_names_y = [pattern .sub ("" , bpm ) for bpm in bpm_names_y ]
7070
7171 matrices = [
7272 TransverseData (
73- X = pd .DataFrame (index = hor_bpms , data = tbt_data_x , dtype = float ),
74- Y = pd .DataFrame (index = ver_bpms , data = tbt_data_y , dtype = float ),
73+ X = pd .DataFrame (index = bpm_names_x , data = tbt_data_x , dtype = float ),
74+ Y = pd .DataFrame (index = bpm_names_y , data = tbt_data_y , dtype = float ),
7575 )
7676 ]
7777
0 commit comments