<!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
Hi everyone, I have problems retrieving the global scale factor ': 0: Scale' in GSASIIScriptable to calculate the wt% from the phase scale factors. The standard bit: import os,sys sys. path. insert(0,'/Users/Superuser/gsas2full/GSASII') import
</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>
<!--[if ((ie)|(mso))]>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
<table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
<table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
<tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
This Message Is From an External Sender
</td></tr>
<tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
This message came from outside your organization.
</td></tr>
</table>
</td></tr></table>
</td></tr></table>
<![endif]-->
<![if !((ie)|(mso))]>
<div dir="ltr" id="pfptBannerwharl9y" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
<div id="pfptBannerwharl9y" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBannerwharl9y" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
This Message Is From an External Sender
</div>
<div id="pfptBannerwharl9y" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
</div>
</div>
<div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
</div>
<![endif]>
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<html>
<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBannerwharl9y { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButtonwharl9y:hover, .pfptPrimaryButtonwharl9y:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButtonwharl9y:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<div style="margin: 0px; padding-top: 3pt; border-top: 1pt solid rgb(225, 225, 225);">
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;">Hi everyone,</span></p>
</div>
</div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;"></div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;"> </span></p>
</div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;">I have problems retrieving the global scale factor ':0:Scale' in GSASIIScriptable to calculate the wt% from the phase scale factors. </span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;">The standard bit:</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">import os,sys</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;"><br>
</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">sys.path.insert(0,'/Users/<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">Superuser/gsas2full/GSASII')</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;"><br>
</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">import GSASIIscriptable as G2sc</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;"><br>
</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">workdir = "./"</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;"><br>
</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">datadir = "./"</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">gpx = G2sc.G2Project(filename=f'./<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">output/refinements/test/test.<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">gpx') </span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">hist = gpx.add_powder_histogram(os.<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">path.join(datadir,"./Data/test.csv"),<br>
os.path.join(datadir,"./<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">Instrument/IPF.<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">instprm"))</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">phase = gpx.add_phase(os.path.join(<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">datadir,f'./cif/Phase.cif'),<br>
phasename="Phase",<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">fmthint='CIF',<br>
histograms=[hist1])</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">hist.set_refinements({"<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">Background":
{"no. coeffs": 3, "refine": False, "coeffs":(5,10,10) },<br>
'Sample Parameters': ['Scale'],<br>
"Limits": [10, 50]})</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">gpx.refine()</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"><b>Now the important part:</b></span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">'gpx.get_<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;text-align:left;background-color:rgb(255, 255, 255)">VaryList()'
retrieves </span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">[':0:Scale']</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"> confirming
I have refined the global scale factor </span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"> </span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">however, when I want to retrieve the value of the global scale
factor: gpx.get_Variable(</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">':0:Scale'
</span><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">)</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">the following error message shows up:</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"> test = gpx.get_Variable(':0:Scale')<br>
File "C:\Users/Superuser/gsas2full/<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">GSASII\GSASIIscriptable.py", line 2800, in get_Variable<br>
if var not in self['Covariance']['data']['<wbr style="color:rgb(34, 34, 34);font-family:Arial, Helvetica, sans-serif;font-size:small;background-color:rgb(255, 255, 255)">parmDict']:<br>
KeyError: 'parmDict'</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">Thanks in advance for your help and fantastic work on GSASII
and the scriptable python interface!</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);">All the best,</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px;"><span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"><br>
</span></p>
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;">Johannes</span></p>
</div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;"></div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;"></div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;"></div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;"></div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;">___________________________________________________________</span></p>
</div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;">Johannes Meusburger, Ph.D.</span></p>
</div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;">NASA Postdoctoral Program Fellow</span></p>
</div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;">Exobiology Branch</span></p>
</div>
<div style="background-color: rgb(255, 255, 255); margin: 0px;">
<p style="text-align: left; text-indent: 0px; margin: 0px; font-family: Calibri, sans-serif;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: black;">NASA Ames Research Center</span></p>
</div>
<div style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0px;">
<span style="font-family: "Times New Roman", Times, serif; font-size: 13pt; color: rgb(66, 66, 66);"><br>
</span><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
</span></div>
</body>
</html>