pycsa.config.params

User parameter dataclass.

Defines the required and optional fields for a CSA run. Moved from pycsa.core.var and refactored to @dataclass with explicit defaults. The historical cg_spsprect coupling (self.rect = False if self.cg_spsp else True) is preserved via __post_init__.

class pycsa.config.params.params(run_case: str = '', path_compact_grid: Any | None = None, path_compact_topo: Any | None = None, path_output: Any | None = None, fn_output: Any | None = None, enable_merit: bool = True, merit_cg: int = 10, path_merit: Any | None = None, lat_extent: Any | None = None, lon_extent: Any | None = None, run_full_land_model: bool = True, delaunay_xnp: Any | None = None, delaunay_ynp: Any | None = None, rect_set: Any | None = None, lxkm: Any | None = None, lykm: Any | None = None, nhi: int = 24, nhj: int = 48, n_modes: int = 100, U: float = 10.0, V: float = 0.0, rect: bool = True, dfft_first_guess: bool = False, refine: bool = False, no_corrections: bool = True, cg_spsp: bool = False, fa_iter_solve: bool = True, sa_iter_solve: bool = True, lmbda_fa: float = 0.01, lmbda_sa: float = 0.1, taper_ref: bool = False, taper_fa: bool = False, taper_sa: bool = False, taper_art_it: int = 50, padding: int = 0, get_delaunay_triangulation: bool = False, recompute_rhs: bool = False, debug: bool = False, debug_writer: bool = True, verbose: bool = False, plot: bool = False)

Per-run parameters for the CSA pipeline.

Fields with None defaults are compulsory (see check_init() / check_delaunay()). All other fields have sensible defaults matching the historical inline __init__.

run_case: str = ''
path_compact_grid: Any = None
path_compact_topo: Any = None
path_output: Any = None
fn_output: Any = None
enable_merit: bool = True
merit_cg: int = 10
path_merit: Any = None
lat_extent: Any = None
lon_extent: Any = None
run_full_land_model: bool = True
delaunay_xnp: Any = None
delaunay_ynp: Any = None
rect_set: Any = None
lxkm: Any = None
lykm: Any = None
nhi: int = 24
nhj: int = 48
n_modes: int = 100
U: float = 10.0
V: float = 0.0
rect: bool = True
dfft_first_guess: bool = False
refine: bool = False
no_corrections: bool = True
cg_spsp: bool = False
fa_iter_solve: bool = True
sa_iter_solve: bool = True
lmbda_fa: float = 0.01
lmbda_sa: float = 0.1
taper_ref: bool = False
taper_fa: bool = False
taper_sa: bool = False
taper_art_it: int = 50
padding: int = 0
get_delaunay_triangulation: bool = False
recompute_rhs: bool = False
debug: bool = False
debug_writer: bool = True
verbose: bool = False
plot: bool = False
self_test() bool

Check that compulsory parameters are set and (if requested) Delaunay-related params too. Generates fn_output if missing.

check_init() None

Raise if compulsory init params are undefined.

check_delaunay() None

Raise if compulsory Delaunay params are undefined.

static checker(arg, compulsory_params) list[str]

Return names of fields in compulsory_params that are None.

print() None

Print all attributes to stdout. Preserves the legacy params.print() interface inherited from the old obj base class — used by several run scripts to dump the configuration banner at startup.

__init__(run_case: str = '', path_compact_grid: Any | None = None, path_compact_topo: Any | None = None, path_output: Any | None = None, fn_output: Any | None = None, enable_merit: bool = True, merit_cg: int = 10, path_merit: Any | None = None, lat_extent: Any | None = None, lon_extent: Any | None = None, run_full_land_model: bool = True, delaunay_xnp: Any | None = None, delaunay_ynp: Any | None = None, rect_set: Any | None = None, lxkm: Any | None = None, lykm: Any | None = None, nhi: int = 24, nhj: int = 48, n_modes: int = 100, U: float = 10.0, V: float = 0.0, rect: bool = True, dfft_first_guess: bool = False, refine: bool = False, no_corrections: bool = True, cg_spsp: bool = False, fa_iter_solve: bool = True, sa_iter_solve: bool = True, lmbda_fa: float = 0.01, lmbda_sa: float = 0.1, taper_ref: bool = False, taper_fa: bool = False, taper_sa: bool = False, taper_art_it: int = 50, padding: int = 0, get_delaunay_triangulation: bool = False, recompute_rhs: bool = False, debug: bool = False, debug_writer: bool = True, verbose: bool = False, plot: bool = False) None