curryer.correction.parameters¶
Parameter set generation for the correction pipeline.
This module provides load_param_sets(), which generates parameter sets
for correction analysis. Three search strategies are supported:
RANDOM(default)Monte Carlo random walk. Each parameter is sampled from a normal distribution centered on
current_valuewith the configuredsigma, clipped tobounds. Controlled byseedandn_iterations.GRID_SEARCHDeterministic cartesian-product sweep.
grid_points_per_paramevenly-spaced offset values are produced for each parameter (spanning its fullboundsrange) and the cartesian product of all per-parameter grids is enumerated.n_iterationsis ignored for this strategy.SINGLE_OFFSETDeterministic single-parameter sweep. Each parameter is varied independently across
n_iterationsevenly-spaced values while all other parameters are held at their nominalcurrent_value.
Supported parameter types:
- CONSTANT_KERNEL – 3-D attitude corrections (roll, pitch, yaw) stored as
a
pandas.DataFramewithugps,angle_x,angle_y,angle_z.
OFFSET_KERNEL– single-axis angle bias (float, in radians).OFFSET_TIME– timing correction (float, in seconds).
Attributes¶
Functions¶
|
Convert arcseconds to radians. |
|
|
|
|
|
|
|
|
|
Wrap |
|
Return |
|
Return the un-perturbed, unit-converted value for param. |
|
Return n_points evenly-spaced sampled values for param. |
|
Generate random parameter sets – exact current behaviour preserved. |
Generate parameter sets via deterministic cartesian-product grid sweep. |
|
Generate parameter sets by sweeping one parameter at a time. |
|
|
Log a structured summary of the generated parameter sets. |
|
Generate parameter sets for correction iterations. |
Module Contents¶
- curryer.correction.parameters.logger¶
- curryer.correction.parameters._UGPS_EPOCH_END = 2209075218000000¶
- curryer.correction.parameters._arcsec_to_rad(value: float) float¶
Convert arcseconds to radians.
- curryer.correction.parameters._bounds_to_rad(bounds: list[float], units: str | None) list[float]¶
- curryer.correction.parameters._val_to_rad(value: float, units: str | None) float¶
- curryer.correction.parameters._val_to_seconds(value: float, units: str | None) float¶
- curryer.correction.parameters._bounds_to_seconds(bounds: list[float], units: str | None) list[float]¶
- curryer.correction.parameters._make_ck_dataframe(angle_vals: list[float]) pandas.DataFrame¶
Wrap
[angle_x, angle_y, angle_z](radians) into the pipeline DataFrame format.
- curryer.correction.parameters._scalar_current_value(param: curryer.correction.config.ParameterConfig) float¶
Return
param.spec.current_valueas a scalar float.- Raises:
TypeError – If
current_valueis not a scalar numeric type. This helps surface misconfigured parameters early instead of silently coercing them to 0.0.
- curryer.correction.parameters._get_nominal_value(param: curryer.correction.config.ParameterConfig) Any¶
Return the un-perturbed, unit-converted value for param.
For
CONSTANT_KERNEL, returns aDataFramewith angles equal to thecurrent_valuein radians. ForOFFSET_KERNEL/OFFSET_TIME, returns a float in radians / seconds respectively.
- curryer.correction.parameters._get_grid_values(param: curryer.correction.config.ParameterConfig, n_points: int) list[Any]¶
Return n_points evenly-spaced sampled values for param.
Offsets are linearly spaced over
[bounds[0], bounds[1]](in the parameter’s native units before conversion) and added to the convertedcurrent_value.For
CONSTANT_KERNELthe scalar offset is applied uniformly to all three rotation axes.- Parameters:
param (ParameterConfig) – Parameter specification.
n_points (int) – Number of evenly-spaced points (>= 2).
- Returns:
List of n_points values; each element matches what the pipeline expects for that parameter type (DataFrame or float).
- Return type:
list
- curryer.correction.parameters._generate_random(sweep: curryer.correction.config.Sweep) list[list[tuple[curryer.correction.config.ParameterConfig, Any]]]¶
Generate random parameter sets – exact current behaviour preserved.
- curryer.correction.parameters._generate_grid_search(sweep: curryer.correction.config.Sweep) list[list[tuple[curryer.correction.config.ParameterConfig, Any]]]¶
Generate parameter sets via deterministic cartesian-product grid sweep.
Produces
grid_points_per_param ^ len(parameters)parameter sets.n_iterationsis not used for this strategy.- Raises:
ValueError – If the total number of parameter sets would exceed
sweep.max_grid_sets. Increasemax_grid_setsdeliberately, reducegrid_points_per_paramor the number of parameters, or useSearchStrategy.SINGLE_OFFSETinstead.
- curryer.correction.parameters._generate_single_offset(sweep: curryer.correction.config.Sweep) list[list[tuple[curryer.correction.config.ParameterConfig, Any]]]¶
Generate parameter sets by sweeping one parameter at a time.
For each parameter in
sweep.parameters: -n_iterationsevenly-spaced values are generated spanning theparameter’s full
boundsoffset range.All other parameters are held at their nominal
current_value.
Total parameter sets produced:
len(parameters) × n_iterations.
- curryer.correction.parameters._log_param_set_summary(output: list[list[tuple[curryer.correction.config.ParameterConfig, Any]]]) None¶
Log a structured summary of the generated parameter sets.
High-level counts are always emitted at INFO. The full per-set detail (angles / offsets for every set) is emitted at DEBUG only, so large GRID_SEARCH / SINGLE_OFFSET sweeps do not flood the INFO log.
- curryer.correction.parameters.load_param_sets(sweep: curryer.correction.config.Sweep) list[list[tuple[curryer.correction.config.ParameterConfig, Any]]]¶
Generate parameter sets for correction iterations.
Dispatches to the appropriate generator based on
sweep.search_strategy:RANDOM– Monte Carlo random walk (default).GRID_SEARCH– deterministic cartesian-product sweep acrossgrid_points_per_paramevenly-spaced values per parameter.SINGLE_OFFSET– deterministic single-parameter sweep; each parameter is varied independently while others stay at nominal.
- Parameters:
sweep (Sweep) – The parameter-variation experiment: parameters, search strategy, and sampling settings.
- Returns:
Outer list: one element per parameter set (iteration). Inner list: one
(ParameterConfig, sampled_value)pair per parameter.sampled_valueis aDataFrameforCONSTANT_KERNELand afloatforOFFSET_KERNEL/OFFSET_TIME.- Return type:
list[list[tuple[ParameterConfig, Any]]]