Validate config
cutana.validate_config
¶
Configuration validation for Cutana astronomical cutout pipeline.
This module provides comprehensive validation for Cutana configuration parameters, ensuring all required parameters are present and have valid values.
validate_config(cfg, check_paths=True)
¶
Validate configuration against Cutana requirements.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DotMap
|
Configuration to validate |
required |
check_paths
|
bool
|
Whether to check if file and directory paths exist |
True
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If configuration is invalid |
validate_config_for_processing(cfg, check_paths=True)
¶
Additional validation specifically for processing workflows.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
DotMap
|
Configuration to validate for processing |
required |
check_paths
|
bool
|
Whether to check if file paths exist (default: True) |
True
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If configuration is not ready for processing |
validate_channel_order_consistency(tensor_channel_names, channel_weights, weak_check=True)
¶
Resolve weight keys in tensor order without catalogue or FITS I/O.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tensor_channel_names
|
Input labels in tensor order. |
required | |
channel_weights
|
Input labels mapped to output weights. |
required | |
weak_check
|
Allow complete token matches in full FITS channel labels. |
True
|
Returns:
| Type | Description |
|---|---|
|
Weight keys in tensor order, independent of dictionary insertion order. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If labels are missing, ambiguous, duplicated, or unmatched. |