Skip to content

astro.Function.classifyNeutronStar

github-actions[bot] edited this page Aug 28, 2026 · 1 revision

@elite-dangerous-almanac/core / astro / classifyNeutronStar

Function: classifyNeutronStar()

classifyNeutronStar(body): NeutronStarClass | null

Defined in: src/astro/star-physics.ts:350

What kind of pulsar a neutron star's spin makes it.

Parameters

body

BodyProperties

The star. Needs StellarMass, RotationPeriod and AbsoluteMagnitude — the magnitude only to separate a magnetar from a pulsar at the slow end, but it is required throughout so the answer never depends on which band the star happened to land in.

Returns

NeutronStarClass | null

The class, or null when any of the three is missing. This does not check StarType: hand it a neutron star, since the bands mean nothing for anything else.

Remarks

A neutron star is classed by how fast it turns, from a millisecond pulsar whipping round a hundred times a second to a slow rotator barely turning at all. Rotation is a magnitude here: the journal writes retrograde rotation as a negative RotationPeriod, and which way a pulsar spins does not change what it is.

The scheme is Canonn's, not astronomy's — it exists to give the game's generated neutron stars useful names, and the anomalous-mass- bands mark stars the game produced above the theoretical mass ceiling.

Throws

If body is not an object.

Example

import { classifyNeutronStar } from '@elite-dangerous-almanac/core/astro/star-physics';

// Twenty turns a second.
classifyNeutronStar({ StellarMass: 1.5, RotationPeriod: 0.05, AbsoluteMagnitude: 12 });
// -> 'standard-pulsar'

// The same spin, but heavier than the TOV limit allows.
classifyNeutronStar({ StellarMass: 2.4, RotationPeriod: 0.05, AbsoluteMagnitude: 12 });
// -> 'anomalous-mass-pulsar'

// Half an hour per turn, and bright with it.
classifyNeutronStar({ StellarMass: 1.5, RotationPeriod: 1800, AbsoluteMagnitude: 8 });
// -> 'ultra-long-period-magnetar'

API

Guides
astro
Classes (1)
ProceduralSystem

Properties

Accessors

Methods

Interfaces (28)
Type Aliases (6)
Variables (22)
Functions (57)
Subpath modules (3)
commodities
Interfaces (1)
Type Aliases (1)
Variables (3)
Functions (3)
equipment
Interfaces (6)
Type Aliases (8)
Variables (3)
Functions (10)
Subpath modules (2)
i18n
Interfaces (1)
Type Aliases (1)
Functions (17)
materials
Enumerations (2)
Interfaces (2)
Type Aliases (2)
Variables (9)
Functions (9)
ships
Classes (3)
BuildMetrics

Methods

LoadoutEditError

Constructors

Properties

Methods

ShipLoadout

Accessors

Methods

Interfaces (125)
Type Aliases (44)
Variables (10)
Functions (85)
Subpath modules (8)

Clone this wiki locally