veriflow.scores.base#
An abstract implementation of a calculation.
Classes
|
An abstract calculation class. |
|
Base config for a score config. |
- class veriflow.scores.base.BaseScore(config)[source]#
An abstract calculation class.
- Parameters:
config (BaseScoreConfig)
- config_class#
alias of
BaseScoreConfig
- class veriflow.scores.base.BaseScoreConfig(*, score_adapter, general, crs=None, verification_pair_ids=[], **extra_data)[source]#
Base config for a score config.
Specific config definitions should inherit from this base class.
- Parameters:
score_adapter (str)
general (Annotated[GeneralInfoConfig, SkipJsonSchema()])
crs (Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A coordinate reference system as a string compatible with pyproj.CRS.from_string, i.e. a PROJ string, a CRS WKT string, or an authority string such as 'EPSG:4326'. The string is not parsed at configuration time so that pyproj remains an optional dependency; it is only parsed when an actual coordinate transformation is required.", metadata=[MinLen(min_length=1)])] | None)
extra_data (Any)
- general: Annotated[GeneralInfoConfig, SkipJsonSchema()]#
- crs: Annotated[Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A coordinate reference system as a string compatible with pyproj.CRS.from_string, i.e. a PROJ string, a CRS WKT string, or an authority string such as 'EPSG:4326'. The string is not parsed at configuration time so that pyproj remains an optional dependency; it is only parsed when an actual coordinate transformation is required.", metadata=[MinLen(min_length=1)])] | None, FieldInfo(annotation=NoneType, required=False, default=None, description='Optional coordinate reference system for score computation. When set, obs and sim coordinates are reprojected to this CRS before computing the score and the results are expressed in it. When omitted, observations and simulations must share the same CRS.')]#
- verification_pair_ids: Annotated[list[str], FieldInfo(annotation=NoneType, required=True, description='Optional field to select verification_pairs from the general configuration, by providing a list of verification pair ids from the general config. Only these pair ids will be used in the computation of this score.')]#
- property verification_pairs: list[VerificationPair]#
The configured variable pairs.
If the verification_pairs element is configured for the score, filter only these ids from the verification_pairs defined in general config.