finesse.detectors.camera module
Detectors for capturing images, slices and single pixels of a beam.
The camera types are split into two categories (CCDs and ComplexCameras) based on the
mathematical implementation shown in finesse.detectors.compute.camera.
- class finesse.detectors.camera.CCD(*args, **kwargs)[source]
-
Camera for measuring the intensity of a beam, \(I = |E(x,y)|^2\), where the unscaled x and y coordinate arrays used are
finesse.detectors.camera.Image.xdataandfinesse.detectors.camera.Image.ydata, respectively. Note that this is just the intensity at the points (x,y), not an integrated power over some finite pixel size.Parameters
- namestr
Unique name of the camera.
- node
OpticalNode Node at which to detect.
- xlimsequence or scalar
Limits of the x-dimension of the image. If a single number is given then this will be computed as \(x_{\mathrm{lim}} = [-|x|, +|x|]\).
- ylimsequence or scalar
Limits of the y-dimension of the image. If a single number is given then this will be computed as \(y_{\mathrm{lim}} = [-|y|, +|y|]\).
- nptsint
Number of points in both axes.
- w0_scaledbool, optional; default: True
Flag indicating whether the \(x\), \(y\) axes should be scaled to the waist-size of the beam parameter at node.
- class finesse.detectors.camera.CCDCamera(*args, **kwargs)[source]
-
Abstract type for cameras which detect pixel intensity.
Parameters
- namestr
Unique name of the camera.
- node
OpticalNode Node at which to detect.
- w0_scaledbool, optional; default: True
Flag indicating whether the \(x\), \(y\) axes should be scaled to the waist-size of the beam parameter at node.
- class finesse.detectors.camera.CCDPixel(*args, **kwargs)[source]
-
Camera for measuring the intensity of a beam, \(I = |E(x,y)|^2\), at a single point. Where the unscaled x and y coordinate used is
finesse.detectors.camera.Pixel.xdataandfinesse.detectors.camera.Pixel.ydata, respectively. Note that this is just the intensity at (x,y), not an integrated power over some finite pixel dimension.Parameters
- namestr
Unique name of the camera.
- node
OpticalNode Node at which to detect.
- xscalar, optional; default: 0
The x co-ordinate of the pixel.
- yscalar, optional; default: 0
The y co-ordinate of the pixel.
- w0_scaledbool, optional; default: True
Flag indicating whether the \(x\), \(y\) axes should be scaled to the waist-size of the beam parameter at node.
- class finesse.detectors.camera.CCDScanLine(*args, **kwargs)[source]
-
Camera for measuring the intensity of a beam, \(I = |E(x,y)|^2\), along a 1D slice. Where the unscaled x and y coordinate arrays used are
finesse.detectors.camera.ScanLine.xdataandfinesse.detectors.camera.ScanLine.ydata, respectively. Note that this is just the intensity at the points (x,y), not an integrated power over some finite pixel size.The
ScanLine.direction(i.e. axis of slice) is determined from which of xlim or ylim is specified.Parameters
- namestr
Unique name of the camera.
- node
OpticalNode Node at which to detect.
- nptsint
Number of points in slice axis.
- xscalar or None; default: None
The x coordinate of the slice. If ylim is given and this is not specified then defaults to zero. If xlim is given and this is also specified then it is ignored.
- yscalar or None; default: None
The y coordinate of the slice. If xlim is given and this is not specified then defaults to zero. If ylim is given and this is also specified then it is ignored.
- xlimscalar or size two sequence; default: None
The limits of the x-axis scan lines. A single number gives \(x_{\mathrm{axis}} \in [-|x|, +|x|]\), or a tuple of size two gives \(x_{\mathrm{axis}} \in [x[0], x[1]]\).
- ylimscalar or array-like; default: None
The limits of the y-axis scan lines. A single number gives \(y_{\mathrm{axis}} \in [-|y|, +|y|]\), or a tuple of size two gives \(y_{\mathrm{axis}} \in [y[0], y[1]]\).
- w0_scaledbool, optional; default: True
Flag indicating whether the \(x\), \(y\) axes should be scaled to the waist-size of the beam parameter at node.
- class finesse.detectors.camera.Camera(*args, **kwargs)[source]
Bases:
MaskedDetector,ABCBase camera class.
Parameters
- namestr
Unique name of the camera.
- node
OpticalNode Node at which to detect.
- w0_scaledbool
Flag indicating whether the \(x\), \(y\) axes should be scaled to the waist-size of the beam parameter at node.
- dtype
numpy.dtypeor str The data-type of the pixels.
- shapetuple
Dimensions of the camera image.
- property scaled_xdata[source]
Coordinate data in the x-axis scaled to metres.
Equivalent to
xdataifCamera.w0_scaledis False. Otherwise this isxdatamultiplied by the tangential waist size as measured at the node.
- property scaled_ydata[source]
Coordinate data in the y-axis scaled to metres.
Equivalent to
ydataifCamera.w0_scaledis False. Otherwise this isydatamultiplied by the sagittal waist size as measured at the node.
- class finesse.detectors.camera.ComplexCamera(*args, **kwargs)[source]
-
Abstract type for cameras which detect pixel amplitude and phase.
Parameters
- namestr
Unique name of the camera.
- node
OpticalNode Node at which to detect.
- fscalar, optional; default: 0
Field frequency offset from the carrier to detect.
- w0_scaledbool, optional; default: True
Flag indicating whether the \(x\), \(y\) axes should be scaled to the waist-size of the beam parameter at node.
- property f
f : scalar, optional; default: 0 Field frequency offset from the carrier to detect.
- class finesse.detectors.camera.FieldCamera(*args, **kwargs)[source]
Bases:
ComplexCamera,ImageCamera for detecting the full image of the beam in terms of amplitude and phase.
Get the unscaled x and y coordinate data via
finesse.detectors.camera.Image.xdataandfinesse.detectors.camera.Image.ydata, respectively.Parameters
- namestr
Unique name of the camera.
- node
OpticalNode Node at which to detect.
- xlimsequence or scalar
Limits of the x-dimension of the image. If a single number is given then this will be computed as \(x_{\mathrm{lim}} = [-|x|, +|x|]\).
- ylimsequence or scalar
Limits of the y-dimension of the image. If a single number is given then this will be computed as \(y_{\mathrm{lim}} = [-|y|, +|y|]\).
- nptsint
Number of points in both axes.
- fscalar, optional; default: 0
Field frequency offset from the carrier to detect.
- w0_scaledbool, optional; default: True
Flag indicating whether the \(x\), \(y\) axes should be scaled to the waist-size of the beam parameter at node.
- property f
f : scalar, optional; default: 0 Field frequency offset from the carrier to detect.
- class finesse.detectors.camera.FieldPixel(*args, **kwargs)[source]
Bases:
ComplexCamera,PixelCamera for detecting a single pixel of the beam in terms of the amplitude and phase.
Get the unscaled x and y coordinate data via
finesse.detectors.camera.Pixel.xdataandfinesse.detectors.camera.Pixel.ydata, respectively.Parameters
- namestr
Unique name of the camera.
- node
OpticalNode Node at which to detect.
- xscalar, optional; default: 0
The x co-ordinate of the pixel.
- yscalar, optional; default: 0
The y co-ordinate of the pixel.
- fscalar, optional; default: 0
Field frequency offset from the carrier to detect.
- w0_scaledbool, optional; default: True
Flag indicating whether the \(x\), \(y\) axes should be scaled to the waist-size of the beam parameter at node.
- property f
f : scalar, optional; default: 0 Field frequency offset from the carrier to detect.
- class finesse.detectors.camera.FieldScanLine(*args, **kwargs)[source]
Bases:
ComplexCamera,ScanLineCamera for detecting a slice of the beam in terms of amplitude and phase.
The
ScanLine.direction(i.e. axis of slice) is determined from which of xlim or ylim is specified.Get the unscaled x and y coordinate data via
finesse.detectors.camera.ScanLine.xdataandfinesse.detectors.camera.ScanLine.ydata, respectively.Parameters
- namestr
Unique name of the camera.
- node
OpticalNode Node at which to detect.
- nptsint
Number of points in slice axis.
- xscalar or None; default: None
The x coordinate of the slice. If ylim is given and this is not specified then defaults to zero. If xlim is given and this is also specified then it is ignored.
- yscalar or None; default: None
The y coordinate of the slice. If xlim is given and this is not specified then defaults to zero. If ylim is given and this is also specified then it is ignored.
- xlimscalar or size two sequence; default: None
The limits of the x-axis scan lines. A single number gives \(x_{\mathrm{axis}} \in [-|x|, +|x|]\), or a tuple of size two gives \(x_{\mathrm{axis}} \in [x[0], x[1]]\).
- ylimscalar or array-like; default: None
The limits of the y-axis scan lines. A single number gives \(y_{\mathrm{axis}} \in [-|y|, +|y|]\), or a tuple of size two gives \(y_{\mathrm{axis}} \in [y[0], y[1]]\).
- fscalar, optional; default: 0
Field frequency offset from the carrier to detect.
- w0_scaledbool, optional; default: True
Flag indicating whether the \(x\), \(y\) axes should be scaled to the waist-size of the beam parameter at node.
- property f
f : scalar, optional; default: 0 Field frequency offset from the carrier to detect.
- class finesse.detectors.camera.Image(xlim, ylim, npts, dtype)[source]
Bases:
objectData structure representation of an image.
Parameters
- xlimsequence or scalar
Limits of the x-dimension of the image. If a single number is given then this will be computed as \(x_{\mathrm{lim}} = [-|x|, +|x|]\).
- ylimsequence or scalar
Limits of the y-dimension of the image. If a single number is given then this will be computed as \(y_{\mathrm{lim}} = [-|y|, +|y|]\).
- nptsint
Number of points for both the x and y axes.
- dtypestr or dtype
Data type of the image to pass to NumPy for array creation.
- at(x=None, y=None)[source]
Retrieves a slice or single pixel of the output image.
Parameters
- xscalar, optional
Value indicating where to take a y-slice of the image or, if used in conjunction with y, which pixel to return. Defaults to None.
- yscalar, optional
Value indicating where to take a x-slice of the image or, if used in conjunction with x, which pixel to return. Defaults to None.
- magnitudebool, optional
Returns the amplitude of the detected field if True. Otherwise returns the full complex description.
Returns
- out
numpy.ndarrayor float Either a slice of the image or a single pixel at the specified co-ordinates.
- property npts[source]
Number of pixels in each axis.
- Getter:
Returns the number of pixels in each axis.
- Setter:
Sets the number of pixels in each axis.
- property resolution[source]
The resolution of the image.
Currently this is always square (i.e. number of points in both axes always equal).
- Getter:
Returns the tuple
(xpts, ypts).
- property xdata[source]
The array of data points for the x-axis.
- Getter:
Returns a copy of the
numpy.ndarraycontaining the x-axis points.
- property xlim[source]
The limits of the x coordinate data.
- Getter:
Returns a tuple of
(xmin, xmax).- Setter:
Sets the x-axis limits.
- property ydata[source]
The array of data points for the y-axis.
- Getter:
Returns a copy of the
numpy.ndarraycontaining the y-axis points.
- class finesse.detectors.camera.Pixel(x, y, dtype)[source]
Bases:
objectData structure representation of a pixel of an image.
Parameters
- xscalar
The x co-ordinate of the pixel.
- yscalar
The y co-ordinate of the pixel.
- dtypestr or dtype
Data type of the pixel.
- property x[source]
The x coordinate of the pixel.
- Getter:
Returns the x coordinate of the pixel.
- Setter:
Sets the x coordinate of the pixel.
- property xdata[source]
Equivalent to
Pixel.x.- Getter:
Returns the x coordinate of the pixel. Read-only version.
- class finesse.detectors.camera.ScanLine(npts, dtype, x=None, y=None, xlim=None, ylim=None)[source]
Bases:
objectData structure representation of a slice of an image.
Parameters
- xscalar or None
The x coordinate of the slice.
- yscalar or None
The y coordinate of the slice.
- xlimscalar or size two sequence
The limits of the x-axis scan lines. A single number gives \(x_{\mathrm{axis}} \in [-|x|, +|x|]\), or a tuple of size two gives \(x_{\mathrm{axis}} \in [x[0], x[1]]\).
- ylimscalar or array-like
The limits of the y-axis scan lines. A single number gives \(y_{\mathrm{axis}} \in [-|y|, +|y|]\), or a tuple of size two gives \(y_{\mathrm{axis}} \in [y[0], y[1]]\).
- nptsint
Number of points in slice axis.
- dtypestr or dtype
Data type of the slice to pass to NumPy for array creation.
- property direction[source]
The slice axis - i.e. ‘x’ for x-axis, ‘y’ for y-axis.
- Getter:
Returns a string determining the slice axis (read-only).
- property npts[source]
Number of pixels in the scanning axis.
- Getter:
Returns the number of pixels in the slice axis.
- Setter:
Sets the number of pixels in the slice axis.
- property x[source]
The x co-ordinate of the slice.
If
ScanLine.directionis ‘x’ then this will returnNone.- Getter:
Returns the x coordinate of the slice.
- Setter:
Sets the x coordinate of the slice.
- property xdata[source]
The numeric value(s) of the x coordinate.
If
ScanLine.directionis ‘x’ then this will be a copy of the array of values, otherwise it is a single value equivalent toScanLine.x.- Getter:
The x coordinate value(s). Read-only.
- property xlim[source]
The limits of the slice in the x-axis.
If
ScanLine.directionis ‘y’ then this will returnNone.- Getter:
Returns a tuple of
(xmin, xmax).- Setter:
Sets the x-axis limits.
- property y[source]
The y co-ordinate of the slice.
If
ScanLine.directionis ‘y’ then this will returnNone.- Getter:
Returns the y coordinate of the slice.
- Setter:
Sets the y coordinate of the slice.
- property ydata[source]
The numeric value(s) of the y coordinate.
If
ScanLine.directionis ‘y’ then this will be a copy of the array of values, otherwise it is a single value equivalent toScanLine.y.- Getter:
The y coordinate value(s). Read-only.
- property ylim[source]
The limits of the slice in the y-axis.
If
ScanLine.directionis ‘x’ then this will returnNone.- Getter:
Returns a tuple of
(ymin, ymax).- Setter:
Sets the y-axis limits.