MaskInfo#
- class lsst.cbp.MaskInfo(name, defaultHole, holePositions, holeNames=None)#
Bases:
objectInformation about a CBP mask.
Parameters#
- name
str Name of mask.
- defaultHole
strorint Name or index of default hole.
- holePositions
iterableof (float,float) Position of a fiducial point for each hole in the mask (x, y mm).
- holeNames
iterableofstror None Name of each hole in the mask, in the same order as
holePositions. If None then set name = str(index) for each hole.
Raises#
- ValueError
If
defaultHoleisNone.- LookupError
If
defaultHoleis not a valid name or index.- ValueError
If
holeNamesis notNoneand has a different length thanholePositions.
Notes#
Attributes
- name
str Name of mask.
- defaultBeam
str Name of default hole or beam.
Attributes Summary
An iterable of hole names, in index order (read only)
The number of holes (read only)
Methods Summary
asHoleName(hole)Read a hole index, name or None as a name, and validate it.
getHolePos(beam)Return the position of a hole in focal plane x,y mm.
Attributes Documentation
- holeNames#
An iterable of hole names, in index order (read only)
- numHoles#
The number of holes (read only)
Methods Documentation
- asHoleName(hole)#
Read a hole index, name or None as a name, and validate it.
Parameters#
- hole
int,strorNone If
Nonethen return the default beam. If an integer index then return the corresponding beam name. If a string then return unchanged.
Raises#
LookupErrorif beam is an integer and is out of range or if beam is a string and the name is unknown.- hole
- name