[cctbxbb] How to use the binner in cctbx.miller?

Jan Marten Simons marten at xtal.rwth-aachen.de
Tue Jan 3 09:02:15 PST 2012

Am Montag 02 Januar 2012 20:14:03 schrieb Richard Gildea:
> Does this do what you want?
> miller_array.setup_binner(reflections_per_bin=100)
> miller_array.mean(use_binning=True)

Thanks, this pushed me into the right direction. But now I think I've found a 

f_calc = struct.structure_factors(d_min=1.5).f_calc()
I_calc = f_calc.intensities()
I_calc.mean(use_binning=True).show()         # works
I_calc.sum(use_binning=True).show()           # gives error (see below)

File "/home/marten/cctbx/cctbx-
dev/sources/cctbx_project/cctbx/miller/__init__.py", line 2633, in sum
    mean.data[i] *= counts[i]
TypeError: unsupported operand type(s) for *=: 'NoneType' and 'int'

More information about the cctbxbb mailing list