PolarGrid

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

Bases: 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(angle[, axis])

Rotate the grid in-place.

scale(scale)

Scale the grid in-place.

shift(shift)

Shift the grid in-place.

shifted(shift)

A shifted copy of this grid.

Attributes Documentation

r

The radial coordinate (dimension 0).

theta

The angular coordinate (dimension 1).

Methods Documentation

rotate(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(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(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(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.