solve_filter_name#

xrtpy.util.solve_filter_name(name)[source]#

Standardizes an XRT filter name to match expected format.

Parameters:

name (str) – The filter name provided by the user. Can include hyphens, underscores, or inconsistent casing.

Returns:

str – A standardized filter name with correct capitalization and formatting.

Raises:

TypeError – If the provided name is not a string.

Examples

>>> solve_filter_name("al_poly")
'Al-Poly'
>>> solve_filter_name("be_thin/al_mesh")
'Be-Thin/Al-Mesh'