Groups single XFEL images (here described by SingleImage objects) as cluster objects. You can create a cluster object
directly, by using the __init__ method, which takes in a list of SingleImage objects, and some string-info, or by using
a classmethod e.g. to create an object from a folder full of integration pickles. SingleImage objects have most of the
stuff from an integration pickle, but can also have methods to calculate things relating to one image at a time.

Clustering filters can act on these to break them up into cluster objects with different members. A 'filter' is just a
clustering procedure that puts the passes and fails into different clusters. This is acheived through the
make_sub_cluster() method. This also keeps track of a sub-clusters heritage through the .info string, which is appended
to.

The idea is to be able to write filter scripts for each data. e.g:

test_cluster = Cluster.from_directories(["~/test_data"],
                                        'test_script')

P3_only = test_cluster.point_group_filer('P3')
sub_clusters = P3_only.ab_cluster(1200)
big_cluster = max(sub_clusters, key=lambda x: len(x.members))
best_data = big_cluster.total_intensity_filter(res=6.5, completeness_threshold=0.1, plot=False)
print best_data.info

cxi.postrefine (or any other merging thing) will be able to be called on the ouput of a cluster object method (ToDo)


Comments welcome!

Oli
