Numerical settings#
Every numerical setting of the package is a field of pianistpy.Settings. The tables below list each
field, its value under the default settings and under the quick settings (Accuracy),
and what the field controls. The fields fall in five groups, one table each: inversion, truncation,
sampling, observables and losvd.
An override of a field, such as pp.Settings(inversion={"n_nodes": 256}), raises
InputError when the group or the field’s name is unknown. An override also
raises InputError when the value has the wrong type, or when the value is not positive for a
field that must be positive.
inversion#
Field |
Default |
Quick |
What it controls |
|---|---|---|---|
|
500 |
same |
The number of Gauss-Legendre nodes of the integral that inverts the density into the distribution function. |
|
1000 |
same |
The number of energies in the middle zone of the inversion’s energy grid, where the energies are spaced linearly. |
|
3000 |
same |
The number of energies in each of the two end zones of the inversion’s energy grid, where the energies are spaced logarithmically toward the grid’s floor and toward the grid’s top. |
|
0.03 |
same |
The width of each end zone of the inversion’s energy grid, as a fraction of the central potential. |
|
50 |
same |
The number of energies per decade below the floor of the inversion’s energy grid, down to the floor of the distribution function’s table. |
|
240 |
same |
The number of Gauss-Legendre nodes, in ln P, of the integral that completes the distribution function below the table’s floor; a third of the nodes, and at least 40 nodes, lie near the floor. |
truncation#
Field |
Default |
Quick |
What it controls |
|---|---|---|---|
|
500 |
same |
The number of Gauss-Legendre nodes in each of the two intervals of the quadrature that computes the auxiliary density on the source grid. |
|
12000 |
same |
The number of potential values of the source grid. |
|
3000 |
same |
The number of potential values in each logarithmic tail of the source grid, toward the grid’s floor and toward the grid’s top; each tail holds at most a third of the source grid’s potential values. |
|
0.03 |
same |
The largest width of each tail of the source grid, as a fraction of the grid’s top; the width used is at most a hundredth of the grid’s top. |
|
1.20401e-08 |
same |
The smallest start of the source grid’s lower tail and the smallest width of the source grid’s upper tail, as fractions of the grid’s top. |
|
0.9 |
same |
The fraction of the potential at which the first interval of the source quadrature ends and the second interval begins. |
|
2 |
same |
The power k of the map Q = P - u^k on the second interval of the source quadrature, where the exponent of the quadrature’s kernel is not negative. |
|
1e-11 |
same |
The relative tolerance of the integration of Poisson’s equation. |
|
1e-11 |
same |
The absolute tolerance of the integration of Poisson’s equation. |
|
500 |
same |
The number of radii of the Poisson solve’s grid inside the inner zone. |
|
59500 |
same |
The number of radii of the Poisson solve’s grid outside the inner zone. |
|
-9 |
same |
The base-10 logarithm of the innermost radius of the Poisson solve, in internal length units. |
|
12 |
same |
The base-10 logarithm of the outermost radius of the Poisson solve, in internal length units. A computation raises the outermost radius until the potential at the outermost radius is below half the floor, and the result records the value used. |
|
0.01 |
same |
The fraction of the central potential below which the outermost radii of a truncated model are solved again on a grid geometric in R_t - r, where R_t is the truncation radius. |
|
1200 |
same |
The number of radii per decade of R_t - r in the solve toward the truncation radius R_t. |
|
0.02 |
same |
The potential at the outermost radius of the solve toward the truncation radius, as a fraction of the floor. |
|
0.1 |
same |
The width, in decades of the potential, of each bin in which the profile’s radii are counted. |
|
1000 |
same |
The smallest number of radii per decade of the potential, and per decade of the depth, that the profile keeps at the profile’s two ends; the profile’s fills supply the other radii. |
sampling#
Field |
Default |
Quick |
What it controls |
|---|---|---|---|
|
512 |
same |
The number of potential values of the velocity table at the start of the table’s refinement; the number doubles until the table’s own error across potential values is below row_error_goal or until the number reaches n_rows_max. |
|
4075 |
same |
The largest number of potential values of the velocity table; the table’s refinement stops at n_rows_max potential values. |
|
2048 |
512 |
The number of nodes at each potential value of the velocity table. |
|
200 |
same |
The number of intervals in the scaled velocity over which the velocity distribution is integrated at each potential value of the velocity table. |
|
16 |
8 |
The number of Gauss-Legendre nodes of each panel of the velocity integrals. |
|
8 |
same |
The number of panels per decade of the local variable where the velocity integrals refine toward the two ends of the velocity range at one potential value and inside each interval. |
|
1e-09 |
same |
The smallest scaled velocity that the velocity integrals refine in panels; below that velocity, the density follows the density’s power law in the velocity and is integrated in closed form. |
|
1e-12 |
same |
The distance from the edge of the velocity range, relative to the edge, down to which the velocity integrals refine in panels; closer to the edge, the distribution function’s form below the distribution function’s table is integrated in closed form. |
|
1e-10 |
same |
The smallest fraction of the mass beyond a radius that the radius table of a model with a sharp edge resolves in nodes; for smaller fractions, the mass follows the mass’s power law in the distance from the edge. |
|
2048 |
same |
The number of nodes of the radius table. |
|
1024 |
same |
The number of nodes of each half of the angle table, spaced uniformly in the logarithm of the cumulative probability from the half’s end. |
|
262144 |
same |
The number of particles drawn at once. A draw runs over blocks of draw_block particles, so the draw’s working memory, above the memory of the drawn particles, is the memory of one block: about 0.75 kB per particle, or about 0.2 GB for \(2^{18}\) particles. The drawn particles do not depend on draw_block. |
|
1e-06 |
0.0001 |
The error across the potential values of the velocity table at which the table’s refinement stops: the number of potential values doubles until the table’s own error is below row_error_goal or until the number reaches n_rows_max. |
|
1e-18 |
same |
The smallest cumulative probability tabulated at either end of a table. The smallest nonzero value of a uniform random double is \(2^{-53}\), which is above tail_mass_min, so a draw never reads beyond the tabulated range. |
observables#
Field |
Default |
Quick |
What it controls |
|---|---|---|---|
|
10000 |
500 |
The number of projected radii of the projection table before the table’s check between projected radii adds projected radii; the projected radii are spaced logarithmically from the innermost radius of the profile to the edge. |
|
1e-07 |
1e-06 |
The relative error of sigma_r at which radii stop being added to the radial dispersion’s profile: sigma_r at the midpoint of every interval between the profile’s radii is read within profile_tolerance. The default value, \(10^{-7}\), is a tenth of \(10^{-6}\): the profile’s share of the error of the quantities projected from the profile. |
|
100 |
same |
The number of radii, spaced logarithmically from the innermost radius of the profile to the edge, with which the radial dispersion’s profile starts before radii are added to meet profile_tolerance. |
|
500 |
same |
The number of Gauss-Legendre nodes of the Jeans integral of the radial dispersion at one radius, as the superposition of components computes the radial dispersion. The observables’ profile does not use n_jeans_nodes: the profile sums panels between the profile’s radii and doubles each panel’s nodes until sigma_r changes by less than profile_tolerance. |
|
500 |
same |
The number of Gauss-Legendre nodes of each line-of-sight integral of the surface density and of the projected dispersion. |
|
100 |
same |
The smallest number of Gauss-Legendre nodes of each panel of an aperture’s radial integral. |
|
8 |
same |
The number of nodes per decade of projected radius of a panel of an aperture’s radial integral: a panel spanning d decades takes aperture_nodes_per_decade times d nodes, rounded up to a multiple of 20, if that number exceeds n_aperture_nodes. |
|
kernel |
same |
The computation of the angle rule of the line-of-sight velocity distributions: “kernel” computes the angle rule with JAX, and “numpy” computes the angle rule with NumPy, as a reference. |
|
16 |
same |
The number of Gauss-Legendre nodes of each panel of the angle integral of the local velocity distribution (pdf_v), in t = cos(eta). |
|
16 |
8 |
The number of panels of the angle integral of the local velocity distribution (pdf_v) graded toward each end of each of the integral’s intervals, and the number of panels of the velocity integral of the distribution’s norm and second moment graded toward each break of that velocity integral. |
|
1e-06 |
0.0001 |
The bound on the change of the local velocity distribution (pdf_v) when the nodes of the distribution’s angle rule double: the nodes double, at most three times, until the change is below velocity_tolerance. |
losvd#
Field |
Default |
Quick |
What it controls |
|---|---|---|---|
|
55 |
20 |
The number of base projected radii per decade of the table of line-of-sight velocity distributions, from the innermost radius of the profile. |
|
8 |
same |
The number of Gauss-Legendre nodes of each panel of the energy integral at one node of the table. |
|
4 |
2 |
The number of Gauss-Legendre panels of the energy integral graded toward K = 0, where the DF’s rule below its table takes over. |
|
0.2 |
same |
The ratio of the widths of successive graded panels of the energy integral. |
|
64 |
same |
The largest number of Gauss-Legendre nodes of the angle integral of an L factor at one node of the table. |
|
12 |
8 |
The number of Gauss-Legendre nodes of each panel of the line-of-sight integral. |
|
8 |
same |
The number of panels of each interval of the support along the line of sight. |
|
6 |
same |
The number of doublings of the line-of-sight panels allowed before a projected radius is recorded as not converged. |
|
0.3 |
same |
The ratio of the widths of successive line-of-sight panels graded toward the axis. |
|
4 |
same |
The number of line-of-sight panels graded toward the axis that each doubling adds. |
|
2001 |
same |
The number of points of the scan for the positions where the angular momentum vanishes. |
|
200001 |
same |
The number of nodes of each of the three branches of the table of the distribution function’s cumulative integral. |
|
16 |
8 |
The number of Gauss-Legendre nodes of each velocity sub-panel at one projected radius. |
|
0.3 |
same |
The ratio of the widths of successive velocity sub-panels graded toward a break of the distribution. |
|
12 |
same |
The number of velocity sub-panels graded toward zero velocity. |
|
8 |
same |
The number of velocity sub-panels graded toward each break of the distribution at one projected radius. |
|
4001 |
1001 |
The number of points of the coarse scan for a break of the distribution in velocity. |
|
4 |
same |
The number of successive refinements of the scan for a break of the distribution in velocity. |
|
60 |
same |
The number of bisections that locate an edge of the support, or a root, along a line of sight. |
|
16 |
same |
The number of projected radii added toward each projected radius at which the table’s layout changes. |
|
40 |
same |
The number of bisections in projected radius that locate a change of the table’s layout. |
|
3 |
same |
The number of samples inside each interval between base projected radii at which a change of the table’s layout is sought. |
|
10 |
same |
The number of samples beyond the last base projected radius toward the end of the profile. |
|
16 |
same |
The number of projected radii added toward the end of the table. |
|
8 |
same |
The number of tabulated projected radii that the interpolation between the table’s projected radii reads. |
|
8 |
same |
The number of tabulated projected radii of the second interpolation, whose estimate checks the table’s interpolation. |
|
25000 |
same |
The number of elements (node pairs times energy nodes times angle nodes) computed in one block, which bounds the memory of the computation at one projected radius. |
|
0 |
same |
The smallest projected radius at which the table will be read, in the model’s internal length unit. The table starts at the last base projected radius inside the radius whose disk holds \(10^{-6}\) times the projected mass inside innermost_read_radius, and a read inside the table’s first projected radius raises InputError. The value 0 keeps the table’s full depth, from the innermost radius of the profile. |
|
1e-06 |
same |
The share of the total projected mass that may lie beyond the table’s last projected radius. The table ends at the first base projected radius beyond the radius outside which outer_mass_share of the projected mass lies, and a read beyond the table’s last projected radius raises InputError. The value 0 keeps the table out to the model’s edge. |
Settings levels: default, quick. A field is overridden by its group and its name, for example pp.Settings(inversion={'n_nodes': 800}). A result computed with an overridden field records that its settings are custom, and lists the fields that differ from the settings level.
