<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">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">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">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>
<p><br>
</p>
<p><br>
</p>
<pre cols="72">--
Robert Oeffner, Ph.D.
Research Associate, The Read Group
Department of Haematology,
Cambridge Institute for Medical Research
University of Cambridge
Cambridge Biomedical Campus
The Keith Peters Building
Hills Road
Cambridge CB2 0XY
<a href="http://www.cimr.cam.ac.uk/investigators/read/index.html" target="_blank">www.cimr.cam.ac.uk/investigators/read/index.html</a>
tel: +44(0)1223 763234</pre>
<div id="gmail-m_-6532780384006781315gmail-m_6611401379141108521DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top:1px solid rgb(211,212,222)">
<tbody>
<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="" style="width: 46px; height: 29px;" width="46" height="29"></a></td>
<td style="width:470px;padding-top:12px;color:rgb(65,66,78);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" style="color:rgb(68,83,234)" target="_blank">www.avg.com</a> </td>
</tr>
</tbody>
</table>
<a href="#m_-6532780384006781315_m_6611401379141108521_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div>
</div>
_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org" target="_blank">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" rel="noreferrer" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
cctbxbb mailing list
<a href="mailto:cctbxbb@phenix-online.org" target="_blank">cctbxbb@phenix-online.org</a>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a>
</pre>
</blockquote>
<pre cols="72">--
Robert Oeffner, Ph.D.
Research Associate, The Read Group
Department of Haematology,
Cambridge Institute for Medical Research
University of Cambridge
Cambridge Biomedical Campus
The Keith Peters Building
Hills Road
Cambridge CB2 0XY
<a href="http://www.cimr.cam.ac.uk/investigators/read/index.html" target="_blank">www.cimr.cam.ac.uk/investigators/read/index.html</a>
tel: +44(0)1223 763234</pre>
</div>
_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org" target="_blank">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" rel="noreferrer" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</blockquote></div>