def check_normalization( frame_num, q_list, imgsa, data_pixel ):
'''check the ROI intensity before and after normalization
Input:
frame_num: integer, the number of frame to be checked
q_list: list of integer, the list of q to be checked
imgsa: the raw data
data_pixel: the normalized data, caculated by fucntion Get_Pixel_Arrayc
Plot the intensities
'''
fig,ax=plt.subplots(2)
n=0
for q in q_list:
norm_data = data_pixel[frame_num][qind==q]
raw_data = np.ravel( np.array(imgsa[frame_num]) )[pixelist[qind==q]]
#print(raw_data.mean())
plot1D( raw_data,ax=ax[0], legend='q=%s'%(q), m=markers[n],
title='fra=%s_raw_data'%(frame_num))
#plot1D( raw_data/mean_int_sets_[frame_num][q-1], ax=ax[1], legend='q=%s'%(q), m=markers[n],
# xlabel='pixel',title='fra=%s_norm_data'%(frame_num))
#print( mean_int_sets_[frame_num][q-1] )
plot1D( norm_data, ax=ax[1], legend='q=%s'%(q), m=markers[n],
xlabel='pixel',title='fra=%s_norm_data'%(frame_num))
n +=1
评论列表
文章目录