PolarGrid

class hcipy.field.PolarGrid(coords, weights=None)

Bases: hcipy.field.grid.Grid

A grid representing a two-dimensional Polar coordinate system.

Attributes Summary

r

The radial coordinate (dimension 0).

theta

The angular coordinate (dimension 1).

Methods Summary

rotate(self, angle[, axis])

Rotate the grid in-place.

scale(self, scale)

Scale the grid in-place.

shift(self, shift)

Shift the grid in-place.

shifted(self, shift)

A shifted copy of this grid.

Attributes Documentation

r

The radial coordinate (dimension 0).

theta

The angular coordinate (dimension 1).

Methods Documentation

rotate(self, angle, axis=None)

Rotate the grid in-place.

Parameters
anglescalar

The angle in radians.

axisndarray or None

The axis of rotation. For this (polar) grid, it is ignored.

Returns
Grid

Itself to allow for chaining these transformations.

scale(self, scale)

Scale the grid in-place.

Parameters
scalearray_like

The factor with which to scale the grid.

Returns
Grid

Itself to allow for chaining these transformations.

shift(self, shift)

Shift the grid in-place.

Caution

All structure in the coordinates will be destroyed.

Parameters
shiftarray_like

The amount with which to shift the grid.

Returns
Grid

Itself to allow for chaining these transformations.

shifted(self, shift)

A shifted copy of this grid.

Caution

The returned grid is a Cartesian grid.

Parameters
shiftarray_like

The amount with which to shift the grid.

Returns
Grid

The scaled grid.