MaskInfo

class lsst.cbp.MaskInfo(name, defaultHole, holePositions, holeNames=None)

Bases: object

Information about a CBP mask.

Parameters:
name : str

Name of mask.

defaultHole : str or int

Name or index of default hole.

holePositions : iterable of (float, float)

Position of a fiducial point for each hole in the mask (x, y mm).

holeNames : iterable of str or 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 defaultHole is None.

LookupError

If defaultHole is not a valid name or index.

ValueError

If holeNames is not None and has a different length than holePositions.

Notes

Attributes

name : str
Name of mask.
defaultBeam : str
Name of default hole or beam.

Attributes Summary

holeNames An iterable of hole names, in index order (read only)
numHoles 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, str or None

If None then return the default beam. If an integer index then return the corresponding beam name. If a string then return unchanged.

Raises:
LookupError if beam is an integer and is out of range
or if beam is a string and the name is unknown.
getHolePos(beam)

Return the position of a hole in focal plane x,y mm.

Parameters:
hole : int, str or None

If None then use the default beam. If an integer index then use the corresponding beam name.