pwem.protocols.protocol_set_filter module

class pwem.protocols.protocol_set_filter.ProtSetFilter(**kwargs)[source]

Bases: pwem.protocols.protocol.EMProtocol

Protocol to filter sets based on its attributes through an expresion that should evaluate to true or false.


Goes through all items in the input set and applies the formula to each of them using exec. Complex python code could be run separating lines with ; To use numpy you could do import numpy; item._resolution.set(numpy.random.randint(10)) If result is True, item will be transferred to the output set