diff --git a/src/py2dmat/solver/lib_make_convolution.py b/src/py2dmat/solver/lib_make_convolution.py index ae05e16a..51299029 100644 --- a/src/py2dmat/solver/lib_make_convolution.py +++ b/src/py2dmat/solver/lib_make_convolution.py @@ -1,7 +1,8 @@ import numpy as np import sys +import copy -def calc(RC_data_org, RC_data_cnv, number_of_beams, number_of_glancing_angles, omega, verbose_mode): +def calc(RC_data_org, number_of_beams, number_of_glancing_angles, omega, verbose_mode): sigma = 0.5 * omega / (np.sqrt(2.0*np.log(2.0))) @@ -10,12 +11,16 @@ def g(x): return g + RC_data_cnv = np.zeros((number_of_glancing_angles, number_of_beams+1)) + #copy glancing angle + RC_data_cnv[:,0] = copy.deepcopy(RC_data_org[:,0]) + angle_interval = RC_data_org[1,0] - RC_data_org[0,0] if verbose_mode: print("RC_data_org =\n",RC_data_org) print("RC_data_cnv =\n",RC_data_cnv) - print('angle_ interval=', angle_interval) + print('angle_interval=', angle_interval) for beam_index in range(number_of_beams): for index in range(number_of_glancing_angles): diff --git a/src/py2dmat/solver/sim_trhepd_rheed_mb_connect.py b/src/py2dmat/solver/sim_trhepd_rheed_mb_connect.py index 33bf6afc..65cdcf59 100644 --- a/src/py2dmat/solver/sim_trhepd_rheed_mb_connect.py +++ b/src/py2dmat/solver/sim_trhepd_rheed_mb_connect.py @@ -759,7 +759,6 @@ def _calc_I_from_file(self): # Define the array for the rocking curve data. # Note the components with (beam-index)=0 are the degree data RC_data_org = np.zeros((number_of_glancing_angles, number_of_beams+1)) - RC_data_cnv = np.zeros((number_of_glancing_angles, number_of_beams+1)) for g_angle_index in range(number_of_glancing_angles): line_index = number_of_header_lines + g_angle_index @@ -769,7 +768,6 @@ def _calc_I_from_file(self): data = line.split() # print(data) RC_data_org[g_angle_index,0]=float(data[0]) - RC_data_cnv[g_angle_index,0]=float(data[0]) for beam_index in range(number_of_beams): RC_data_org[g_angle_index, beam_index+1] = data[beam_index+1] @@ -780,7 +778,7 @@ def _calc_I_from_file(self): if self.log_mode : time_sta = time.perf_counter() verbose_mode = False data_convolution = lib_make_convolution.calc( - RC_data_org, RC_data_cnv, number_of_beams, number_of_glancing_angles, self.omega, verbose_mode + RC_data_org, number_of_beams, number_of_glancing_angles, self.omega, verbose_mode ) self.all_convolution_I_calculated_list_normalized = []