lumopt2.utils.common#

Common utility classes and functions for LumOpt2.

This module provides utility classes used throughout LumOpt2, including the Box class for defining spatial regions.

Classes#

Box([x_span, y_span, z_span, x_center, ...])

A 3D rectangular box defined by spans and centers or min/max coordinates.

PNorm([target, p, weights])

Create a p-norm based figure of merit function.

Functions#

make_params_key(params)

Build a canonical hashable cache key from a parameter array.

resolve_project_folder(project)

Return the on-disk project folder for project, creating it if needed.

format_params_for_logging(params, *[, ...])

Format an optimization-parameter array for end-of-run logging.

log_multiline(target_logger, level, message)

Log a multi-line message so every line gets the formatter prefix.