build_throughput_from_config

build_throughput_from_config#

build_throughput_from_config(config)[source]#

Build throughput from a configuration dictionary.

Parameters:

config (dict or float or str) – Throughput configuration. If a dict with a "throughput" key, that entry is used, otherwise the input itself is. The throughput can then be a number (constant throughput), a dict (see OpticsThroughput.from_config) or a file name (see OpticsThroughput.from_filename).

Returns:

float or OpticsThroughput – Constant throughput, or an OpticsThroughput instance (callable, function of wavelength in Angstrom).

Raises:

ValueError – If the throughput is None.