Skip to content

Documentation / @interstellar-tools/equations / galaxyDiskAxis

Function: galaxyDiskAxis() ​

ts
function galaxyDiskAxis(
  direction: GalacticDirectionInterface,
  disk: GalaxyDiskInterface,
  options?: GalaxyDiskAxisOptionsInterface
): Vector3DTupleType;

Defined in: galactic/galaxy-disk-axis.ts:82

The spin axis of a galaxy's disk, in the 'galactocentric' frame's axes: the unit vector its disk turns around, counter-clockwise seen from its tip. Draw the disk at right angles to it.

On the sky at the galaxy, with r^ pointing away from the Sun and s^(φ) the direction at position angle φ, east of north:

ℓ^=s^(φreceding),e^=cos⁡is^(φnear)−sin⁡ir^,L^=e^×ℓ^

ℓ^ points along the major axis to the half moving away from us, and e^ across the disk to its nearer side, tilted towards us.

Notes

  • It needs the disk's nearSide: without it, the disk could tilt either way.
  • Seen from the Sun, the disk turns counter-clockwise when L^ points towards us, as Andromeda's does.

Parameters ​

ParameterTypeDescription
directionGalacticDirectionInterfaceThe galaxy's direction from the Sun, in galactic coordinates.
diskGalaxyDiskInterfaceHow its disk is turned on the sky.
options?GalaxyDiskAxisOptionsInterfaceThe Sun's place, for the frame's tilt, if not the default.

Returns ​

Vector3DTupleType

The unit spin axis, in the 'galactocentric' frame's axes.

Throws ​

If the disk has no nearSide, the near side isn't 90° from positionAngle, an angle isn't finite, or the inclination is outside 0° to 90°.

Example ​

ts
import { GALAXIES } from '@interstellar-tools/constants';

const andromeda = GALAXIES.find((galaxy) => galaxy.id === 'andromeda')!;
const axis = galaxyDiskAxis(andromeda.direction!, andromeda.disk!);
// ≈ [-0.4186, -0.7544, -0.5057]