@@ -31,14 +31,14 @@ def get_low_dim_basis(inf_matrix: InfluenceMatrix, compression: str = 'wavelet')
3131 """
3232 low_dim_basis = {}
3333 num_of_beams = len (inf_matrix .beamlets_dict )
34- num_of_beamlets = inf_matrix .beamlets_dict [num_of_beams - 1 ]['end_beamlet ' ] + 1
34+ num_of_beamlets = inf_matrix .beamlets_dict [num_of_beams - 1 ]['end_beamlet_idx ' ] + 1
3535 beam_id = [inf_matrix .beamlets_dict [i ]['beam_id' ] for i in range (num_of_beams )]
3636 beamlets = inf_matrix .get_bev_2d_grid (beam_id = beam_id )
3737 index_position = list ()
3838 for ind in range (num_of_beams ):
3939 low_dim_basis [beam_id [ind ]] = []
40- for i in range (inf_matrix .beamlets_dict [ind ]['start_beamlet ' ],
41- inf_matrix .beamlets_dict [ind ]['end_beamlet ' ] + 1 ):
40+ for i in range (inf_matrix .beamlets_dict [ind ]['start_beamlet_idx ' ],
41+ inf_matrix .beamlets_dict [ind ]['end_beamlet_idx ' ] + 1 ):
4242 index_position .append ((np .where (beamlets [ind ] == i )[0 ][0 ], np .where (beamlets [ind ] == i )[1 ][0 ]))
4343 if compression == 'wavelet' :
4444 max_dim_0 = np .max ([beamlets [ind ].shape [0 ] for ind in range (num_of_beams )])
@@ -61,8 +61,8 @@ def get_low_dim_basis(inf_matrix: InfluenceMatrix, compression: str = 'wavelet')
6161 beamlets [b ][2 * row ][2 * col ] != - 1 )):
6262 approximation = np .zeros (num_of_beamlets )
6363 horizontal = np .zeros (num_of_beamlets )
64- for ind in range (inf_matrix .beamlets_dict [b ]['start_beamlet ' ],
65- inf_matrix .beamlets_dict [b ]['end_beamlet ' ] + 1 ):
64+ for ind in range (inf_matrix .beamlets_dict [b ]['start_beamlet_idx ' ],
65+ inf_matrix .beamlets_dict [b ]['end_beamlet_idx ' ] + 1 ):
6666 approximation [ind ] = approximation_coeffs [index_position [ind ]]
6767 horizontal [ind ] = horizontal_coeffs [index_position [ind ]]
6868 low_dim_basis [beam_id [b ]].append (np .transpose (np .stack ([approximation , horizontal ])))
0 commit comments