yasfpy.coupling.env =================== .. py:module:: yasfpy.coupling.env .. autoapi-nested-parse:: Environment-variable helpers for coupling backends. These helpers centralize parsing/normalization of environment variables used to control coupling backend behavior (GPU strategy selection, chunk sizes, experimental toggles). .. rubric:: Notes These are intentionally forgiving: invalid inputs fall back to defaults rather than raising, to keep CLI and batch runs robust. Functions --------- .. autoapisummary:: yasfpy.coupling.env.parse_bool_env yasfpy.coupling.env.parse_int_env yasfpy.coupling.env.normalize_gpu_strategy yasfpy.coupling.env.normalize_multi_wavelength_mode Module Contents --------------- .. py:function:: parse_bool_env(name, *, default) Parse a boolean environment variable. :param name: Environment variable name. :param default: Default value used when the variable is unset or invalid. :returns: Parsed boolean value. :rtype: bool .. py:function:: parse_int_env(name, *, default, minimum = 1) Parse an integer environment variable with a lower bound. :param name: Environment variable name. :param default: Default value used when the variable is unset or invalid. :param minimum: Lower bound enforced on the returned value. :returns: Parsed integer value (at least ``minimum``). :rtype: int .. py:function:: normalize_gpu_strategy(value) Normalize the GPU coupling strategy selector. :param value: A raw environment variable value. :returns: One of ``{'auto', 'thread_row', 'block_row'}``. :rtype: str .. py:function:: normalize_multi_wavelength_mode(value) Normalize the multi-wavelength GPU execution mode selector. :param value: A raw environment variable value. :returns: One of ``{'auto', 'atomic', 'per_wavelength', 'per_wavelength_chunked'}``. :rtype: str