<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I wonder if anyone has noticed the behaviour that the creation of
columns in an mtz object seems to suffer from a problem. <br>
</p>
<p>The script below creates an mtz object from three miller arrays
of intensities, amplitudes and anomalous differences together with
their sigmas on 5 reflections. The intention is that the mtz
object should also consist of three pairs of columns ( I,SIGI and
F,SIGF and DANO,SIGDANO). <br>
</p>
<p>However the script shows that if the miller array with anomalous
differences is added as the last miller array then the resulting
mtz object is messed up: It has grouped F,SIGF and DANO,SIGDANO
together as 10 reflections instead of just 5. <br>
</p>
<p>Only if the miller array with anomalous differences is added as
the second miller array after the intensities does the resulting
mtz object contain the three distinct pairs of columns I,SIGI and
F,SIGF and DANO,SIGDANO as intended each with 5 reflections.</p>
<p><font size="-2" face="Courier New"><br>
from cctbx.xray import observation_types<br>
from cctbx.array_family import flex<br>
from cctbx import miller<br>
from cctbx import crystal<br>
<br>
xs = crystal.symmetry(unit_cell=(50,50,40, 90,90,120),
space_group_symbol="P3 1")<br>
mi = flex.miller_index([(1,-2,3), (0,0,-3), (1, 2, 3), (0, 1,
2), (1, 0, 2)])<br>
<br>
ma1 = miller.array( miller.set(xs, mi), <br>
flex.double( [ 11.2, 6.3, 26.1, 14.9, 2.4 ] ),<br>
sigmas=flex.double( [ 13.6, 6.3, 24.9, 6.2, 11.1 ] )<br>
)<br>
ma2 = miller.array( miller.set(xs, mi), <br>
flex.double( [ 8.2, 26.3, 2.1, 4.9, 32.4 ] ),<br>
sigmas=flex.double( [ 3.6, 76.3, 2.9, 61.2, 1.1 ] )<br>
)<br>
ma3 = miller.array( miller.set(xs, mi), <br>
flex.double( [ 8.2, 26.3, 2.1, 4.9, 32.4 ] ),<br>
sigmas=flex.double( [ 3.6, 76.3, 2.9, 61.2, 1.1 ] )<br>
)<br>
<br>
mtz1 = ma1.as_mtz_dataset(column_root_label = "I", column_types
= "JQ")<br>
mtz1.add_miller_array(ma2, column_root_label = "F", column_types
= "FQ")<br>
mtz1.add_miller_array(ma3, column_root_label = "DANO",
column_types = "DQ")</font></p>
<p><font size="-2" face="Courier New"></font><font size="-2"
face="Courier New"><font size="-2" face="Courier New">mtz1.mtz_object().as_miller_arrays()
# unexpected F,SIGF,DANO,SIGDANO array looks messed up </font><br>
</font></p>
<p><font size="-2" face="Courier New">mtz2 =
ma1.as_mtz_dataset(column_root_label = "I", column_types = "JQ")<br>
mtz2.add_miller_array(ma3, column_root_label = "DANO",
column_types = "DQ")<br>
mtz2.add_miller_array(ma2, column_root_label = "F", column_types
= "FQ")<br>
</font></p>
<p><font size="-2" face="Courier New">mtz2.mtz_object().as_miller_arrays()
# looks correct</font><font size="-2" face="Courier New"><font
size="-2" face="Courier New"><font size="-2" face="Courier
New"></font></font></font></p>
Is this a bug, a well known feature or am I simply doing something
wrong? <br>
<p>Many thanks,</p>
<p>Rob<br>
</p>
<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>
<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>