pwem.protocols.protocol_set_editor module

class pwem.protocols.protocol_set_editor.ProtSetEditor(**kwargs)[source]

Bases: EMProtocol

Protocol to edit attributes of all the items of a set using a formula. This could be useful for editing some values in the set. Use this protocol with extreme care, you can easily produce a set that is not consistent.

createOutput(inputSet, modifiedSet)[source]

Save the output set.

formulaStep()[source]

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))