[cctbxbb] Handling unmerged reflections from MTZ

Ralf Grosse-Kunstleve rwgrosse-kunstleve at lbl.gov
Tue Apr 24 12:29:34 PDT 2012


Hi Graeme,

Are you aware of the

mtz.object.as_miller_arrays(..., merge_equivalents=False) option?

If this is too high-level for your purposes, you can loop over the columns
and call:

column.extract_values(not_a_number_substitute=0.0)

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.

Ralf

On Tue, Apr 24, 2012 at 8:03 AM, <Graeme.Winter at diamond.ac.uk> wrote:

> Hi Folks,
>
> 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 "hard work" from C++? Reading the file is very
> easy, but managing the data is harder.
>
> 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…
>
> I could crack on and write something but it strikes me as a good idea to
> ask first.
>
> Thanks,
>
> Graeme
> --
> 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.
> Any opinions expressed within this e-mail are those of the individual and
> not necessarily of Diamond Light Source Ltd.
> 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.
> 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
>
>
>
>
> _______________________________________________
> cctbxbb mailing list
> cctbxbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/cctbxbb
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20120424/d791e8e9/attachment.htm>


More information about the cctbxbb mailing list