DimensionNameSet¶
- 
class lsst.daf.butler.DimensionNameSet(names)¶
- Bases: - lsst.daf.butler.core.dimensions.sets.DimensionSetBase- An incomplete, name-only stand-in for - DimensionSetor- DimensionGraph.- Parameters: - names : iterable of str
- The names of elements to conceptually include in the set. 
 - Notes - Because true - DimensionSets and- DimensionGraphs cannot be constructed without access to a “universe”- DimensionGraphloaded from config, requiring one of these classes in API also makes that API more difficult to use.- DimensionNameSetpartially solves that problem by being easy to construct (only the names of the- DimensionElements are needed, and no sorting or checking is done) and behaving as much like a- DimensionSetor- DimensionGraphas possible. This enables the following pattern:- Accept either DimensionNameSetas well asDimensionSetand/orDimensionGraphwhen construting objects that need a container ofDimensionElements. This may limit the functionality of the constructed object if only aDimensionNameSetis passed, of course.
- “Upgrade” from DimensionNameSetto one of the more complete classes when the object is rendezvouzed with a “universe”DimensionGraph. This upgrade process also serves to validate the names.
 - The - DatasetTypeclass provides an example of this pattern;- DatasetTypes may be constructed with only the names of- Dimensions, but are modified transparently by- Registryoperations to hold actual- Dimensionobjects.- Attributes Summary - names- The names of all elements ( - set-like, immutable).- Methods Summary - difference(other)- Return a new set containing all elements that are in - selfbut not other.- intersection(*others)- Return a new set containing all elements that are in both - selfand all of the other given sets.- isdisjoint(other)- Return - Trueif there are no elements in both- selfand- other, and- Falseotherwise.- issubset(other)- Return - Trueif all elements in- selfare also in- other.- issuperset(other)- Return - Trueif all elements in- otherare also in- self, and- Falseotherwise.- symmetric_difference(other)- Return a new set containing all elements that are in either - selfor other, but not both.- union(*others)- Return a new set containing all elements that are in - selfor any of the other given sets.- Attributes Documentation - 
names¶
- The names of all elements ( - set-like, immutable).- Unlike a real - DimensionElementcontainer, these names are not topologically sorted.
 - Methods Documentation - 
difference(other)¶
- Return a new set containing all elements that are in - selfbut not other.- Parameters: - other : iterable of DimensionElementorstr.
- The other set containing elements that should not be included in the result. 
 - Returns: - result : DimensionNameSetorDimensionSet
- A new set containing elements in - selfbut not- other. A full- DimensionSetis returned if any argument is a full- DimensionSetor- DimensionGraph.
 
- other : iterable of 
 - 
intersection(*others)¶
- Return a new set containing all elements that are in both - selfand all of the other given sets.- Parameters: - others : iterable over DimensionElementorstr.
- Other sets whose elements may be included in the result. 
 - Returns: - result : DimensionNameSetorDimensionSet
- A new set containing any elements in all input sets. A full - DimensionSetis returned if any argument is a full- DimensionSetor- DimensionGraph.
 
- others : iterable over 
 - 
isdisjoint(other)¶
- Return - Trueif there are no elements in both- selfand- other, and- Falseotherwise.- All sets (including the empty set) are disjoint with the empty set. 
 - 
issubset(other)¶
- Return - Trueif all elements in- selfare also in- other.- The empty set is a subset of all sets (including the empty set). 
 - 
issuperset(other)¶
- Return - Trueif all elements in- otherare also in- self, and- Falseotherwise.- All sets (including the empty set) are supersets of the empty set. 
 - 
symmetric_difference(other)¶
- Return a new set containing all elements that are in either - selfor other, but not both.- Parameters: - other : iterable of DimensionElementorstr.
- The other set from which to draw potential result elements. 
 - Returns: - result : DimensionNameSetorDimensionSet
- A new set containing elements - selfor- other, but not both. A full- DimensionSetis returned if any argument is a full- DimensionSetor- DimensionGraph.
 
- other : iterable of 
 - 
union(*others)¶
- Return a new set containing all elements that are in - selfor any of the other given sets.- Parameters: - *others : iterable over DimensionElementorstr.
- Other sets whose elements should be included in the result. 
 - Returns: - result : DimensionNameSetorDimensionSet
- A new set containing all elements in any input set. A full - DimensionSetis returned if any argument is a full- DimensionSetor- DimensionGraph.
 
- *others : iterable over 
 
- names : iterable of