sourcefinder.config#
Attributes#
Configuration options for export of source finding results. |
|
Configuration options for image processing and source extraction. |
|
Classes#
Selection of output, related to detected sources and/or intermediate |
|
Configuration that should cover all the specifications for processing the image. |
|
Functions#
|
Remove |
|
Assert value is of one of the types |
|
|
|
Validate nested types allowed in TOML |
|
Validate types, dispatch on generic or POD types |
Module Contents#
- class sourcefinder.config.ExportSettings[source]#
Bases:
_ValidateSelection of output, related to detected sources and/or intermediate image processing products
- class sourcefinder.config.ImgConf[source]#
Bases:
_ValidateConfiguration that should cover all the specifications for processing the image.
- sourcefinder.config._is_dataclass(_type: Type[T], /) bool[source]#
Remove
TypeGuardfrom is_dataclass.see: python/mypy#14941
- Parameters:
_type (Type[T])
- Return type:
bool
- sourcefinder.config.assert_t(key: str, value, *types: type)[source]#
Assert value is of one of the types
keyis the TOML configuration key the value is associated to. It is used to generate a meaningful error message.- Parameters:
key (str)
types (type)
- sourcefinder.config.read_conf(path: str | pathlib.Path)[source]#
- Parameters:
path (str | pathlib.Path)
- sourcefinder.config.validate_nested(key: str, value, origin_t, args)[source]#
Validate nested types allowed in TOML
keyis the TOML configuration key being validated.valueshould be of typeorigin_t[args]. It is passed to this function separately to avoid recomputing the type again.When the type is a
list, the value is tested recursively. On recursive calls, the list index is appended to the key. Fordict-s, iterate over all key-value pairs and validated.- Parameters:
key (str)
- sourcefinder.config.validate_types(key: str, value, type_: type)[source]#
Validate types, dispatch on generic or POD types
keyis the TOML configuration key the value is associated to. It is used to generate a meaningful error message.- Parameters:
key (str)
type_ (type)
- sourcefinder.config.EXPORTSETTINGS_HELP: dict[str, str][source]#
Configuration options for export of source finding results.