Skip to content

Performance and convergence

Scientific robustness requires convergence checks, not merely a completed run.

Start small

Begin with NSIDE=8, a restricted mask, or computePixel() to validate the model chain. Increase resolution only after inputs, units, and morphology look reasonable.

Threads

Full-map computation divides unmasked pixels among worker threads. HERMES uses the hardware concurrency reported by the system unless HERMES_NUM_THREADS requests a smaller positive number:

HERMES_NUM_THREADS=4 python first_map.py

Pin this value in benchmarks so timing comparisons are meaningful.

Integrator caches

Emission examples commonly use:

integrator.setupCacheTable(20, 20, 8)

The three dimensions control the Cartesian x, y, and z sampling of the spatial emissivity cache. The secondary energy or frequency belongs to the map and is fixed while that table is initialized. Larger tables consume more setup time and memory. They are numerical approximation parameters, not universal defaults.

For a production configuration:

  1. compute a representative pixel or small mask without the cache;
  2. repeat with successively finer cache dimensions;
  3. compare relative and absolute differences in the science region;
  4. choose the smallest table meeting the analysis tolerance;
  5. record the dimensions with the result.

Angular and energy convergence

Repeat the relevant observable at increasing NSIDE and, for spectra, with increasing energy samples. Compare integrated regions or convolved products, not only individual pixels when the scientific observable is regional.

Numerical build options

HERMES_ENABLE_FAST_MATH is off by default because it permits non-IEEE optimizations. Do not enable it for a scientific release without rerunning the regression suite and documenting the numerical comparison.

See Build options and Reproducibility and validation.