pwem.protocols.protocol_mathematical_operator module

class pwem.protocols.protocol_mathematical_operator.ProtMathematicalOperator(**args)[source]

Bases: EMProtocol

Protocol to make mathematical operations on different inputs

PARAM1 = 'X1'
PARAM2 = 'X2'
computeStep(attr1, attr2)[source]

Applies the formula to each of the attributes or the numeric formula provided. Complex python code could be run separating lines with ; To use numpy you could do: import numpy; item._resolution.set(numpy.random.randint(10))

createResultOutput(result)[source]

The output can be an Integer, Float or String. Other protocols can use it in those Params if it has set allowsPointer=True

formulaNeedsInput()[source]

Returns true if there is need for any input

formulaNeedsParam(param)[source]

return True if the formula uses the param passed

getParam1()[source]
getParam2()[source]