<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Thank you David. That looks useful to me.</p>
<p>Rob<br>
</p>
<div class="moz-cite-prefix">On 04-08-2020 18:49, David Waterman
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAELX-2THi6fTA7gzTNsUHA5FN6ctNdp7emjeH-aCznJTnNhwLA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">You might like to look at the MTZ export
functionality in DIALS
<div><a
href="https://github.com/dials/dials/blob/master/util/export_mtz.py"
moz-do-not-send="true">https://github.com/dials/dials/blob/master/util/export_mtz.py</a></div>
<div><br clear="all">
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">-- David<br>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, 4 Aug 2020 at 18:45,
Robert Oeffner <<a href="mailto:rdo20@cam.ac.uk"
moz-do-not-send="true">rdo20@cam.ac.uk</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>
<p>Thanks Aaron, I was aware of the merge_equivalents
function. My interest is just for doing some testing on my
code which involves reading and writing unmerged data. I
guess I could always use the iotbx.mtz functions and write
individual mtz columns including separate HKL indices to a
file.</p>
<p>Rob</p>
<p><br>
</p>
<div>On 04-08-2020 18:03, Aaron Brewster wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Rob, I don't know how to create an
unmerged mtz file, but if you want to merge the data you
can use the cctbx miller array function
merge_equivalents:
<div><br>
</div>
<div><span>mtzobj =
millarr.merge_equivalents().as_mtz_dataset(column_</span><span>root_label="I")</span><br>
<div><br>
</div>
<div>I believe it does simple weighted averaging of
the data using the sigmas.</div>
</div>
<div><br>
</div>
<div>-Aaron</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Aug 4, 2020 at
6:16 AM Robert Oeffner <<a
href="mailto:rdo20@cam.ac.uk" target="_blank"
moz-do-not-send="true">rdo20@cam.ac.uk</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>
<p>Hi,</p>
<p>Does anybody know how to convert a miller array
of unmerged data to an mtz object? For merged data
I do something like this:</p>
<p><font face="Courier New, Courier, monospace">mtzobj
= millarr.as_mtz_dataset(column_root_label="I")</font></p>
<p>But if millarr contains multiple observations
with the same hkl index. Then the above code fails
with the exception<br>
</p>
<p><font face="Courier New, Courier, monospace">cctbx
Error: Duplicate entries in miller_indices
array.</font></p>
<p>Any suggestions?</p>
<p>Many thanks,</p>
<p>Rob<br>
</p>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
<br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br />
<table style="border-top: 1px solid #D3D4DE;">
        <tr>
<td style="width: 55px; padding-top: 13px;"><a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
                <td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avg.com</a>
                </td>
        </tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>