curryer.correction.correction_config¶
Mission-agnostic configuration utilities for geolocation Correction analysis.
This module provides general-purpose functions for reading and validating configuration files. It contains NO mission-specific logic.
Attributes¶
Functions¶
|
Return the expected configuration schema. |
|
Validate that a config file exists and is valid JSON. |
|
Extract mission configuration from config dictionary. |
|
Get kernel mappings for a specific kernel type. |
|
Find kernel file for a given name using substring matching. |
Module Contents¶
- curryer.correction.correction_config.logger¶
- curryer.correction.correction_config.load_config_schema() dict[str, Any]¶
Return the expected configuration schema.
- Returns:
Dictionary describing required and optional config sections.
- Return type:
dict[str, Any]
- curryer.correction.correction_config.validate_config_file(config_path: pathlib.Path) bool¶
Validate that a config file exists and is valid JSON.
- Parameters:
config_path – Path to configuration file
- Returns:
True if valid
- Raises:
FileNotFoundError – If file doesn’t exist
ValueError – If JSON is invalid
- curryer.correction.correction_config.extract_mission_config(config_data: dict[str, Any]) dict[str, Any]¶
Extract mission configuration from config dictionary.
- Parameters:
config_data – Full configuration dictionary from JSON
- Returns:
mission_config section
- Raises:
KeyError – If mission_config section is missing
- curryer.correction.correction_config.get_kernel_mapping(config_data: dict[str, Any], kernel_type: str) dict[str, str]¶
Get kernel mappings for a specific kernel type.
- Parameters:
config_data – Full configuration dictionary
kernel_type – Type of kernel (‘constant_kernel’ or ‘offset_kernel’)
- Returns:
‘cprs_hysics_v01.attitude.ck.json’})
- Return type:
Dict mapping names to kernel files (e.g., {‘hysics’
- curryer.correction.correction_config.find_kernel_file(name: str, kernel_mapping: dict[str, str]) str | None¶
Find kernel file for a given name using substring matching.
Performs case-insensitive matching against kernel mapping keys.
- Parameters:
name – Parameter or sensor name to match
kernel_mapping – Dict of key patterns to kernel files
- Returns:
Kernel file name if found, None otherwise
Example
>>> mapping = {'hysics': 'cprs_hysics_v01.attitude.ck.json'} >>> find_kernel_file('hysics_roll', mapping) 'cprs_hysics_v01.attitude.ck.json'