#!/usr/bin/env python3
# Author: Akke Viitanen
# Email: akke.viitanen@helsinki.fi
# Date: 2025-09-12 00:39:53
"""Middleware for reference catalog config."""
import numpy as np
from lsst.meas.algorithms.convertRefcatManager import ConvertGaiaManager
from lsst_inaf_agile import util
[docs]
class ConvertAgileManager(ConvertGaiaManager):
"""
Convert from AGILE to the reference catalog format.
The class is piggybacking on the existing Gaia converter (proper motions,
covariances), but only overloads the way fluxes are handled.
"""
[docs]
def _getFluxes(self, input):
ret = {}
for band in "ugrizy":
ret[f"{band}_flux"] = (1000.0 * util.mag_to_flux(input[band]),)
ret[f"{band}_fluxErr"] = (np.zeros_like(input[band]),)
return ret