[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
bug:
f_calc = struct.structure_factors(d_min=1.5).f_calc()
I_calc = f_calc.intensities()
I_calc.setup_binner_d_star_sq_step(d_star_sq_step=0.01)
I_calc.mean(use_binning=True).show() # works
I_calc.sum(use_binning=True).show() # gives error (see below)
...
I_calc.sum(use_binning=True).show()
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