Skip to content

Commit

Permalink
delete 'RC_data_cnv' in sim_trhepd_rheed_mb_connect.py
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Iwamoto-research committed Sep 20, 2023
1 parent 976feb1 commit 3755365
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/py2dmat/solver/lib_make_convolution.py
Original file line number Diff line number Diff line change
@@ -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)))

Expand All @@ -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):
Expand Down
4 changes: 1 addition & 3 deletions src/py2dmat/solver/sim_trhepd_rheed_mb_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]

Expand All @@ -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 = []
Expand Down

0 comments on commit 3755365

Please sign in to comment.