ztforce.config

Credential resolution and photometry hyperparameters.

Attributes

_ENV_IRSA_USER

_ENV_IRSA_PASS

_DEFAULT_CONFIG_PATH

Classes

ZTForceConfig

All runtime configuration for a ztforce session.

Functions

_load_toml(→ dict)

Load a TOML file; return {} if absent or unreadable.

build_config(→ ZTForceConfig)

Build a ZTForceConfig by resolving credentials in priority order.

Module Contents

_ENV_IRSA_USER = 'ZTFORCE_IRSA_USER'[source]
_ENV_IRSA_PASS = 'ZTFORCE_IRSA_PASS'[source]
_DEFAULT_CONFIG_PATH[source]
class ZTForceConfig[source]

All runtime configuration for a ztforce session.

irsa_user: str = ''[source]
irsa_pass: str = ''[source]
cutout_size_arcmin: float = 2.0[source]
max_retries: int = 3[source]
retry_base_delay: float = 1.0[source]
retry_jitter: float = 0.5[source]
default_gain: float = 6.2[source]
_load_toml(path: pathlib.Path) dict[source]

Load a TOML file; return {} if absent or unreadable.

build_config(irsa_user: str | None = None, irsa_pass: str | None = None, config_path: str | pathlib.Path | None = None, **overrides) ZTForceConfig[source]

Build a ZTForceConfig by resolving credentials in priority order.

Resolution order (highest first): 1. Direct parameters passed here 2. Environment variables ZTFORCE_IRSA_USER / ZTFORCE_IRSA_PASS 3. ~/.ztforce/config.toml [credentials] section

Raises ConfigError listing all sources tried if credentials are not found.