Hi Jan,<div>I&#39;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">&lt;<a href="mailto:marten@xtal.rwth-aachen.de">marten@xtal.rwth-aachen.de</a>&gt;</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">&gt; Does this do what you want?<br>
&gt;<br>
&gt; miller_array.setup_binner(reflections_per_bin=100)<br>
&gt; miller_array.mean(use_binning=True)<br>
<br>
</div>Thanks, this pushed me into the right direction. But now I think I&#39;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 &quot;/home/marten/cctbx/cctbx-<br>
dev/sources/cctbx_project/cctbx/miller/__init__.py&quot;, line 2633, in sum<br>
 � �mean.data[i] *= counts[i]<br>
TypeError: unsupported operand type(s) for *=: &#39;NoneType&#39; and &#39;int&#39;<br>
<br>