CitraClient.Filters (citra_client v0.3.0)

View Source

Generated operations for OpenAPI tag filters.

Summary

Functions

Expand Filters

List Filters

Functions

expand_filters(body)

Expand Filters

Expand simple filter names to full spectral specifications.

This endpoint allows daemons to convert hardware-reported filter names (e.g., "Red", "Ha", "V") to complete spectral configurations with wavelengths.

Known filters are resolved from the standard filter library. Unknown filters are returned with generic broadband defaults (550nm, 200nm bandwidth) and a warning flag.

Authentication: Required - standard API authentication

Example Request:

{
    "filter_names": ["Red", "Ha", "Clear", "CustomFilter"]
}

Example Response:

{
    "filters": [
        {
            "name": "Red",
            "central_wavelength_nm": 630.0,
            "bandwidth_nm": 100.0,
            "is_known": true
        },
        {
            "name": "Ha",
            "central_wavelength_nm": 656.3,
            "bandwidth_nm": 7.0,
            "is_known": true
        },
        {
            "name": "Clear",
            "central_wavelength_nm": 550.0,
            "bandwidth_nm": 300.0,
            "is_known": true
        },
        {
            "name": "CustomFilter",
            "central_wavelength_nm": 550.0,
            "bandwidth_nm": 200.0,
            "is_known": false
        }
    ]
}

Usage: Daemon receives filter list from hardware → calls this endpoint → uses returned specs to build spectral_config for telescope update.

POST /filters/expand

Body

Request body (map or generated struct).

list_filters()

List Filters

Get list of available standard filters organized by system.

Returns all filters in the standard filter library, grouped by photometric system (Johnson-Cousins, Sloan, Narrowband, RGB). This allows UIs to dynamically populate filter selection dropdowns without hardcoding the filter list.

Authentication: Required - standard API authentication

Example Response:

{
    "filters": [
        {"name": "U", "group": "Johnson-Cousins"},
        {"name": "B", "group": "Johnson-Cousins"},
        {"name": "g", "group": "Sloan"},
        {"name": "Ha", "group": "Narrowband"},
        {"name": "Red", "group": "RGB"}
    ]
}

Usage: UI fetches this list on component mount to populate filter selection UI.

GET /filters/list