Hi Jan,<div>I've fixed the bug. Thanks for pointing out the problem.</div><div>The implementation could be streamlined but I doubt it is worth the effort.</div><div>Ralf</div><div><br><div class="gmail_quote">2012/1/3 Jan Marten Simons <span dir="ltr"><<a href="mailto:marten@xtal.rwth-aachen.de">marten@xtal.rwth-aachen.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Montag 02 Januar 2012 20:14:03 schrieb Richard Gildea:<br>
<div class="im">> Does this do what you want?<br>
><br>
> miller_array.setup_binner(reflections_per_bin=100)<br>
> miller_array.mean(use_binning=True)<br>
<br>
</div>Thanks, this pushed me into the right direction. But now I think I've found a<br>
bug:<br>
<br>
f_calc = struct.structure_factors(d_min=1.5).f_calc()<br>
I_calc = f_calc.intensities()<br>
I_calc.setup_binner_d_star_sq_step(d_star_sq_step=0.01)<br>
I_calc.mean(use_binning=True).show() � � � � # works<br>
I_calc.sum(use_binning=True).show() � � � � � # gives error (see below)<br>
<br>
...<br>
� I_calc.sum(use_binning=True).show()<br>
File "/home/marten/cctbx/cctbx-<br>
dev/sources/cctbx_project/cctbx/miller/__init__.py", line 2633, in sum<br>
� �mean.data[i] *= counts[i]<br>
TypeError: unsupported operand type(s) for *=: 'NoneType' and 'int'<br>
<br>