<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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 class="moz-cite-prefix">On 04-08-2020 18:03, Aaron Brewster
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAAsS-D_rubkpYSd07byf1Smyrn4QaDDicD9UGtTYKKn9Lv9zbw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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 style="font-family:&quot;Courier
            New&quot;,Courier,monospace">mtzobj =
            millarr.merge_equivalents().as_mtz_dataset(column_</span><span
            style="font-family:&quot;Courier
            New&quot;,Courier,monospace">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 &lt;<a href="mailto:rdo20@cam.ac.uk"
            moz-do-not-send="true">rdo20@cam.ac.uk</a>&gt; 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" moz-do-not-send="true">www.cimr.cam.ac.uk/investigators/read/index.html</a>
tel: +44(0)1223 763234</pre>
            <div
              id="gmail-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&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=emailclient"
                        target="_blank" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png"
                          alt="" style="width: 46px; height: 29px;"
                          moz-do-not-send="true" 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&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=emailclient"
                        style="color:rgb(68,83,234)" target="_blank"
                        moz-do-not-send="true">www.avg.com</a> </td>
                  </tr>
                </tbody>
              </table>
              <a
                href="#m_6611401379141108521_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"
                width="1" height="1" moz-do-not-send="true"> </a></div>
          </div>
          _______________________________________________<br>
          cctbxbb mailing list<br>
          <a href="mailto:cctbxbb@phenix-online.org" target="_blank"
            moz-do-not-send="true">cctbxbb@phenix-online.org</a><br>
          <a href="http://phenix-online.org/mailman/listinfo/cctbxbb"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
cctbxbb mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a>
<a class="moz-txt-link-freetext" href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a>
</pre>
    </blockquote>
    <pre class="moz-signature" 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 class="moz-txt-link-abbreviated" href="http://www.cimr.cam.ac.uk/investigators/read/index.html">www.cimr.cam.ac.uk/investigators/read/index.html</a>
tel: +44(0)1223 763234</pre>
  </body>
</html>