tabulate_function_of_wavelength

speclite.filters.tabulate_function_of_wavelength(function, wavelength, verbose=False)[source] [edit on github]

Evaluate a function of wavelength.

Parameters:
functioncallable

Any function that expects a wavelength or array of wavelengths and returns its value. Functions will be called first with wavelength units included and then without units included, in which case they should treat all wavelengths as having default_wavelength_unit. If a function returns a value with units, this will be correctly propagated to the output.

wavelengthastropy.units.Quantity

Wavelength or array of wavelengths where the function should be evaluated. Wavelengths must have valid units.

verbosebool

Print details of the sequence of attempts used to call the function.

Returns:
tuple

Tuple (values, units) of function values at each input wavelength.