pwem.protocols.protocol_sets module
This module contains protocols related to Set operations such us: - subsets - unions - split … etc
- class pwem.protocols.protocol_sets.ProtSets(**kwargs)[source]
Bases:
EMProtocol
Base class for all protocols related to subsets.
- class pwem.protocols.protocol_sets.ProtSplitSet(**kwargs)[source]
Bases:
ProtSets
Protocol to split a set in two or more subsets.
- class pwem.protocols.protocol_sets.ProtSubSet(**kwargs)[source]
Bases:
ProtSets
Create a set with the elements of an original set that are also referenced in another set.
Usually there is a bigger set with all the elements, and a smaller one obtained from classification, cleaning, etc. The desired result is a set with the elements from the original set that are also present somehow in the smaller set (in the smaller set they may be downsampled or processed in some other way).
Both sets should be of the same kind (micrographs, particles, volumes) or related (micrographs and CTFs for example).
- SET_DIFFERENCE = 1
- SET_INTERSECTION = 0
- class pwem.protocols.protocol_sets.ProtSubSetByCoord(**kwargs)[source]
Bases:
ProtSets
Create a subset of those particles that have a particular set of coordinates
- class pwem.protocols.protocol_sets.ProtSubSetByMic(**kwargs)[source]
Bases:
ProtSets
Create a subset of those particles that come from a particular set of micrographs
- class pwem.protocols.protocol_sets.ProtUnionSet(**kwargs)[source]
Bases:
ProtSets
Protocol to join two or more sets of images. This protocol allows to select two or more set of images and will produce another set joining all elements of the selected sets. It will validate that all sets are of the same type of elements (Micrographs, Particles or Volumes)
- TYPE_CTF = 'CTFs'
- TYPE_VOLUME = 'Volumes'
- TYPE_VOLUME_INDEX = 3
- commonAttributes()[source]
Compute the set of common attributes to all items within each input set.
- getObjDict(includeClass=False, includeBasic=False)[source]
Return all attributes and values in a dictionary. Nested attributes will be separated with a dot in the dict key.
- Parameters
includeClass – if True, the values will be a tuple (ClassName, value) otherwise only the values of the attributes
includeBasic – if True include the id, label and comment.
includeBasic example:
object.id: objId object.label: objLabel object.comment: objComment