Hi Graeme,<div><br><div>Are you aware of the</div><div><br></div><div>mtz.object.as_miller_arrays(..., merge_equivalents=False) option?<br><br>If this is too high-level for your purposes, you can loop over the columns and call:</div>
<div><br></div><div>column.extract_values(not_a_number_substitute=0.0)<br><div class="gmail_quote"><br></div><div class="gmail_quote">You may also want to look at column.extract_valid_values() and column.column.selection_valid() as an alternative. There are other medium-level methods such as mtz_object.extract_integers() or .extract_reals(). All the extract methods run in C++ and produce C++ arrays.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Ralf</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Tue, Apr 24, 2012 at 8:03 AM,  <span dir="ltr">&lt;<a href="mailto:Graeme.Winter@diamond.ac.uk">Graeme.Winter@diamond.ac.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Folks,<br>
<br>
I have been writing very bad Python code to handle unmerged MTZ files using CCTBX - in essence copying all of the measurements to lists for each Miller index. Inefficient. Has anyone looked a neater way of handling these files perhaps with doing the &quot;hard work&quot; from C++? Reading the file is very easy, but managing the data is harder.<br>

<br>
Essentially I would like to be able to read in a scaled-summed-but-unmerged MTZ file (equivalent to unmerged scale pack no-merge-original-index) and get back all observations of a given HKL, which I can then subsequently analyse…<br>

<br>
I could crack on and write something but it strikes me as a good idea to ask first.<br>
<br>
Thanks,<br>
<br>
Graeme<br>
--<br>
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.<br>

Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.<br>
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.<br>

Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</blockquote></div><br></div></div>