filters#
zen_api_utils.filters
#
Functions:
-
get_filter_by_position–Return the filter that matches the given position from the filters list.
-
get_used_filterwheel_positions–Generates a list of used filter positions from a collection of filter data.
-
get_reflector_by_position–Return the reflector that matches the given position from the reflectors list.
-
get_used_reflector_positions–Generates a list of used reflector positions from a collection of reflector data.
get_filter_by_position
#
get_filter_by_position(filters: FilterWheelServiceGetFiltersResponse, position: int) -> FilterData | None
Return the filter that matches the given position from the filters list. Args: filters (FilterWheelServiceGetFiltersResponse): An object containing a list of filters. position (int): The position of the filter to retrieve. Returns: FilterData | None: The filter at the specified position if found, otherwise None.
get_used_filterwheel_positions
#
get_used_filterwheel_positions(filters: FilterWheelServiceGetFiltersResponse) -> list[int]
Generates a list of used filter positions from a collection of filter data. Args: filters (FilterWheelServiceGetFiltersResponse): An object containing a list of filters with their respective positions. Returns: List[int]: A list of all positions currently in use by the filters.
get_reflector_by_position
#
get_reflector_by_position(reflectors: ReflectorChangerServiceGetReflectorsResponse, position: int) -> ReflectorData | None
Return the reflector that matches the given position from the reflectors list. Args: reflectors (ReflectorChangerServiceGetReflectorsResponse): An object containing a list of reflectors. position (int): The position of the reflector to retrieve. Returns: ReflectorData | None: The reflector at the specified position if found, otherwise None.
get_used_reflector_positions
#
get_used_reflector_positions(reflectors: ReflectorChangerServiceGetReflectorsResponse) -> list[int]
Generates a list of used reflector positions from a collection of reflector data. Args: reflectors (ReflectorChangerServiceGetReflectorsResponse): An object containing a list of reflectors with their respective positions. Returns: List[int]: A list of all positions currently in use by the reflectors.