<div dir="ltr">Hi Matthew:<div><br></div><div>The GSAS code for reading brml files is originally from me.  I have attached it.  Hopefully it is self-explanatory but feel free to ask me any questions.</div><div><br></div><div>Carlo</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 29, 2023 at 1:39 PM Brown, Matthew via GSAS-II <<a href="mailto:gsas-ii@aps.anl.gov">gsas-ii@aps.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg3424537627197104793">





<div lang="EN-CA">
<div class="m_3424537627197104793WordSection1">
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">All (But mostly Bob)<u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"> <u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">I’m writing my own program for extracting the parameters you need to report in a paper and automatically generate a report I can send the users. One of the features of it is making
 a graph in the PDF of each result for quick viewing, and making a CSV for the engineers (since most of them are examining their data in various engineering graphic packages like Origion, since they just want to see what peaks are present).
<u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"> <u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">Anyway, I’d like to extract the data directly from the *.brml file. I've *found* it, but it is in a really odd table format:
<u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u> <u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">Example:
<u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">      <Datum>229.285790558608,1,10.0001,5.0001,19829.1035,229.285790558608</Datum><u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">      <Datum>229.285790558608,1,10.1001,5.0501,19207.748,229.285790558608</Datum><br>
      <Datum>229.285790558608,1,10.2001,5.1001,19214.4043,229.285790558608</Datum><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u> <u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">GSAS-II reads this with
<br>
"<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">  x[i] = float(entry[2])<br>
  y[i] = float(entry[4])*float(entry[0])/effTime<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">"
<u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u> <u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">Ok, so x is self explanatory, 10.0001 is the two theta.
<u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">What is y doing? 19829.1035 would make sense as the counts, but it is being multiplied by column zero for some reason? I assume dividing by effTime just makes it into counts per
 second, but what is the rest of it doing?<u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u> <u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">If anyone can help me understand this table so I can parse it myself, I'd really appreciate it. Thank you.
<u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u> <u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">P.S. If anyone wants to use my software it is at
<a href="https://bitbucket.org/pxrd-report/pxrd-report/src/master/" target="_blank">https://bitbucket.org/pxrd-report/pxrd-report/src/master/</a> and I like to think is at the point it is giving quite usable reports.
<u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"> <u></u><u></u></span></p>
<p><span lang="EN-US" style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">Dr. Matthew L. Brown  (he/him, they/them)</span><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u><u></u></span></p>
<p><span lang="EN-US" style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">Lab Technician V (Chemistry, Crystallography)</span><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u><u></u></span></p>
<p><span lang="EN-US" style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">Office: 250-807-8365</span><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u><u></u></span></p>
<p><span lang="EN-US" style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"> </span><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u><u></u></span></p>
<p><span lang="EN-US" style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">UBC School of Engineering</span><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u><u></u></span></p>
<p><span lang="EN-US" style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">1540 Innovation Dr.</span><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u><u></u></span></p>
<p><span lang="EN-US" style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">Kelowna, BC</span><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u><u></u></span></p>
<p><span lang="EN-US" style="font-size:12pt;font-family:"Book Antiqua",serif;color:black">V1V 1V7</span><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"><u></u><u></u></span></p>
<p><span style="font-size:12pt;font-family:"Book Antiqua",serif;color:black"> <u></u><u></u></span></p>
</div>
</div>

_______________________________________________<br>
GSAS-II mailing list<br>
<a href="mailto:GSAS-II@aps.anl.gov" target="_blank">GSAS-II@aps.anl.gov</a><br>
<a href="https://mailman.aps.anl.gov/mailman/listinfo/gsas-ii" rel="noreferrer" target="_blank">https://mailman.aps.anl.gov/mailman/listinfo/gsas-ii</a></div></blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Carlo U. Segre (he/him) -- Duchossois Leadership Professor of Physics</div><div>Professor of Materials Science & Engineering</div><div>Director, Center for Synchrotron Radiation Research and Instrumentation</div><div>Illinois Institute of Technology</div><div>Phone: 312.567.3498</div><div><a href="mailto:segre@iit.edu" target="_blank">segre@iit.edu</a>   <a href="http://phys.iit.edu/~segre" target="_blank">http://phys.iit.edu/~segre</a>   <a href="mailto:segre@debian.org" target="_blank">segre@debian.org</a></div><div><br></div></div></div></div></div>