Skip to content

Fix the background output format issue #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion GSASII/GSASIIpwdGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,13 @@ def OnBackSave(event):
filename = os.path.splitext(filename)[0]+'.pwdrbck'
File = open(filename,'w')
File.write("#GSAS-II background parameter file; do not add/delete items!\n")
File.write(str(data[0])+'\n')
out_tmp = list()
for item in data[0]:
if isinstance(item, np.float64) or isinstance(item, float):
out_tmp.append(float(item))
else:
out_tmp.append(item)
File.write(str(out_tmp)+'\n')
for item in data[1]:
if item in ['nPeaks','background PWDR','nDebye'] or not len(data[1][item]):
File.write(item+':'+str(data[1][item])+'\n')
Expand Down
Loading