Created
May 1, 2018 15:52
-
-
Save ndevenish/edaa2b8cb3479cb0ae95ad2fdbd3cc72 to your computer and use it in GitHub Desktop.
simple script to try to read small indexed reflections out of a file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cPickle as pickle | |
from scitbx.array_family import flex | |
with open("indexed.pickle") as f: | |
ref = pickle.load(f) | |
indexed = ref.get_flags(ref.flags.indexed) | |
intensity_one = flex.bool([x["intensity.sum.value"] == 1 for x in ref]) | |
size_one_shoebox = flex.bool([sum(x["shoebox"].size()) == 3 for x in ref]) | |
# TypeError: No to_python (by-value) converter found for C++ type: dials::model::Shoebox<float> | |
# No to_python (by-value) converter found for C++ type: dials::model::Shoebox<float> | |
red = ref.select(indexed & intensity_one & size_one_shoebox) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment