Skip to main content
`Ctrl`+`K`

# add_beam

astropy.visualization.wcsaxes.add_beam(ax, header=None, major=None, minor=None, angle=None, corner='bottom left', frame=False, borderpad=0.4, pad=0.5, **kwargs)

  Display the beam shape and size.

  Parameters:
    ax `WCSAxes`

      WCSAxes instance in which the beam shape and size is displayed. The WCS must be celestial.

    header `Header`, optional

      Header containing the beam parameters. If specified, the `BMAJ`, `BMIN`, and `BPA` keywords will be searched in the FITS header to set the major and minor axes and the position angle on the sky.

    major `python:float` or `Quantity`, optional

      Major axis of the beam in degrees or an angular quantity.

    minor `python:float`, or `Quantity`, optional

      Minor axis of the beam in degrees or an angular quantity.

    angle `python:float` or `Quantity`, optional

      Position angle of the beam on the sky in degrees or an angular quantity in the anticlockwise direction.

    corner `python:str`, optional

      The beam location. Acceptable values are `'left'`, `'right'`, `'top'`, ‘bottom’, `'top left'`, `'top right'`, `'bottom left'` (default), and `'bottom right'`.

    frame bool, optional

      Whether to display a frame behind the beam (default is `False`).

    borderpad `python:float`, optional

      Border padding, in fraction of the font size. Default is 0.4.

    pad `python:float`, optional

      Padding around the beam, in fraction of the font size. Default is 0.5.

    kwargs

      Additional arguments are passed to `matplotlib.patches.Ellipse`.

  Notes

  This function may be inaccurate when:

  - The pixel scales at the reference pixel are different from the pixel scales within the image extent (e.g., when the reference pixel is well outside of the image extent and the projection is non-linear)

  - The pixel scales in the two directions are very different from each other (e.g., rectangular pixels)