Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Functions, units, and scales

A stellar luminosity, a gravitational force, and a detector count become useful only after their inputs, outputs, units, and allowed limits are fixed. The same algebraic expression can answer different questions when any one of those choices changes.

A function carries physical commitments

Newtonian gravity gives the scalar force magnitude,

F(r;M,m)=GMmr2.F(r; M, m) = \frac{G M m}{r^2}.

The relation excludes zero separation. Its output has force units; doubling a mass doubles the force, while increasing separation weakens it as r2r^{-2}. A vector force also needs a direction convention. A scalar magnitude with the wrong direction does not describe the force.

The Stefan-Boltzmann relation

L(R,T)=4πR2σT4L(R,T) = 4\pi R^2 \sigma T^4

maps stellar radius and effective temperature to bolometric luminosity under specific physical assumptions. Near a chosen state, a fractional change in temperature has four times the fractional effect of the same change in radius. The relation does not supply an atmosphere model or a band-limited flux.

The same relation can use SI, CGS, or solar scales

The physical relation stays fixed while its numerical representation changes. For gravity, the coefficient must match the mass, length, and time inputs:

G=6.67430×1011 m3kg1s2=6.67430×108 cm3g1s2.G = 6.67430\times10^{-11}\ \mathrm{m^3\,kg^{-1}\,s^{-2}} = 6.67430\times10^{-8}\ \mathrm{cm^3\,g^{-1}\,s^{-2}}.

The factor of 103 reflects the conversion of cubic length and mass together; it is not a change in the force law. Jaxstro’s foundation uses CGS by default, so G_CGS expects grams, centimeters, and seconds unless a caller supplies a different explicit unit system or constant.

Stellar work often benefits from a third representation. Jaxstro records the IAU nominal conversions

LN=3.828×1026 W=3.828×1033 ergs1,RN=6.957×108 m=6.957×1010 cm.L_\odot^\mathrm{N} = 3.828\times10^{26}\ \mathrm{W} = 3.828\times10^{33}\ \mathrm{erg\,s^{-1}}, \qquad R_\odot^\mathrm{N} = 6.957\times10^8\ \mathrm{m} = 6.957\times10^{10}\ \mathrm{cm}.

Thus a luminosity of 10LN10\,L_\odot^\mathrm{N} is the same physical power as 3.828×1027 W3.828\times10^{27}\ \mathrm{W} or 3.828×1034 ergs13.828\times10^{34}\ \mathrm{erg\,s^{-1}}. The solar radius and luminosity are nominal conversion factors, not measurements of a changing Sun. MSUN_G is different: it is Jaxstro’s documented rounded compatibility scale, not an IAU nominal solar mass. That distinction matters when a calculation needs an absolute mass convention rather than a convenient stellar-scale coordinate.

Scientific settingUseful explicit basisWhat stays invariant
Laboratory or instrument calibrationSI: kg, m, s, WThe dimensional relation and the measured observable
Stellar structure or luminosityCGS internally; RNR_\odot^\mathrm{N} and LNL_\odot^\mathrm{N} at a reporting boundaryThe physical radius and power
Binary or planetary orbitMM_\odot, AU, yrThe orbit; G4π2 AU3M1yr2G\approx4\pi^2\ \mathrm{AU^3\,M_\odot^{-1}\,yr^{-2}} is a convenient numerical representation

Units reject incompatible operations, expose missing scale factors, and keep a coordinate distinct from a dimensionless ratio. A dimensionless angle, relative residual, and probability carry different semantics even though each has no base units.

Scaling makes the numerical coordinate explicit

Writing a physical quantity as q=q0q~q=q_0\tilde q separates a reference scale from the dimensionless numerical coordinate q~\tilde q. For a stellar luminosity, q0=LNq_0=L_\odot^\mathrm{N} makes L~=10\tilde L=10 easy to read without hiding the conversion back to watts or erg s1^{-1}. For a numerical kernel, choose q0q_0 before tracing or compiling; pass the dimensionless values through the kernel and restore units at the boundary. This can reduce scale-driven conditioning problems. An order of magnitude estimate of each term should choose the scale before a solver or an accelerator sees the calculation. Scaling cannot fix a bad model, cancellation from an unstable formula, or an unidentified parameter direction.

Try the running case

In the two-channel measurement, let a physical prediction q(θ)q(\theta) have watts. The first instrument records d1=qd_1=q in watts; the second records d2=cqd_2=cq in detector counts for a calibration factor cc in counts per watt. Before fitting θ\theta, write the units of qq, d1d_1, d2d_2, and cc. Which two quantities may be subtracted without a conversion?

Worked audit

qq and d1d_1 have the same units, so d1qd_1-q is meaningful. The residual d2qd_2-q mixes counts and watts. Compare d2cqd_2-cq in counts, or convert d2/cd_2/c to watts while carrying the calibration uncertainty. Scaling numerical values near one can help a solver; it cannot make the residual dimensionally valid.

A prediction in watts reaches one channel measured in watts and one in counts through a calibration factor. Valid residuals compare quantities in the same unit system, while a counts-minus-watts residual is crossed out.

Figure 1:The calibration changes the numerical representation of the same predicted signal. It does not authorize a residual that mixes counts with watts.

Predict

For the chosen gravity, luminosity, or detector relation, record the expected units, sign, monotonic direction, limiting behavior, and dominant scale before evaluating it.

Compute

Choose SI, CGS, or a named astrophysical basis explicitly. Convert once at a visible boundary, retain named physical variables, and keep nondimensional kernel coordinates separate from the quantities they represent.

Audit

Check dimensions, an analytic ratio, a limiting case, and an independent evaluation. For tabulated or iterative code, inspect coverage and status as well as the returned value.

Continue to What is a model? or the numerical Quantities, units, and dimensional boundaries module page.