def check_measurement_weightings(wv, nphi, number_of_measurements):
if wv is None:
wv = np.ones((nphi, number_of_measurements))
wv = np.atleast_2d(wv)
if wv.shape == (number_of_measurements, nphi):
wv = wv.T
if not wv.shape == (nphi, number_of_measurements):
raise ValueError( \
"Measurement weightings provided by user have wrong dimension.")
return wv
评论列表
文章目录