This commit is contained in:
Yingjie Wang 2024-02-12 18:30:25 -05:00
parent 319b2bc299
commit 919e812c56

View File

@ -182,8 +182,7 @@ logfile_creation = yes
csv_writer = csv.writer(mode_fp) csv_writer = csv.writer(mode_fp)
ind = 0 ind = 0
for r in self.rarray: for r in self.rarray:
l2norm = np.dot(self.rmodes, self.rmodes)+\ l2norm = 0
np.dot(self.imodes, self.imodes)
l2distance = 0 l2distance = 0
for l in range(1,9): for l in range(1,9):
for m in range(-l, l+1): for m in range(-l, l+1):
@ -199,6 +198,7 @@ logfile_creation = yes
imode_error = output_line[-1] - imode imode_error = output_line[-1] - imode
rmode_rel_error = 'nan' if rmode==0 else rmode_error/rmode rmode_rel_error = 'nan' if rmode==0 else rmode_error/rmode
imode_rel_error = 'nan' if imode==0 else imode_error/imode imode_rel_error = 'nan' if imode==0 else imode_error/imode
l2norm += rmode**2 + imode**2
l2distance += rmode_error**2 + imode_error**2 l2distance += rmode_error**2 + imode_error**2
output_line.extend([rmode, imode, rmode_error, imode_error, output_line.extend([rmode, imode, rmode_error, imode_error,
rmode_rel_error, imode_rel_error]) rmode_rel_error, imode_rel_error])