hmp.calibrate#
Run a calibration workflow from a TOML file or a validated config object.
Signature#
hmp.calibrate(config, **kwargs) -> Any
Reference#
- hydromodpy.calibrate(config, **kwargs)[source]
Run a calibration workflow from a TOML file or config object.
Paths route directly to
run_calibration_cli(); in-memory config objects open a lazyProjectsorun_calibration_programmatic()has the project context it requires.Parameters#
- config
Calibration TOML path or validated configuration object.
- kwargs
Options forwarded to the underlying calibration runner. The
headlesskeyword controls the project initialization for the in-memory config branch and is ignored for the TOML branch (which builds no project).
Returns#
- Any
Calibration report or workflow-specific result.
Raises#
- FileNotFoundError
If the calibration TOML path does not exist.
- hydromodpy.core.exceptions.ConfigMissingError
If neither
config_pathnorparametersis supplied.- hydromodpy.core.exceptions.CalibrationError
If the optimizer or objective evaluation fails.
Examples#
>>> import hydromodpy as hmp >>> report = hmp.calibrate("calibration.toml")
See Also#
- hydromodpy.calibration.cli_runner.run_calibration_cli
TOML entry point used by the path branch.
- hydromodpy.calibration.programmatic_runner.run_calibration_programmatic
Python entry point used by the config-object branch.
- hydromodpy.calibration.CalibrationReport
Structured calibration result.
Example#
import hydromodpy as hmp
report = hmp.calibrate("calibration.toml")
See Also#
hydromodpy.run()– generic workflow launcher.hydromodpy.report()– render the HTML report for a calibration session.hydromodpy.calibration– calibration package and report types.