From bc8e0dbd47eea3baa2127974525f4e9f622bfa2d Mon Sep 17 00:00:00 2001 From: emilyhunt Date: Tue, 23 Sep 2025 15:29:20 +0200 Subject: [PATCH] Expand model / predictor sub classes --- src/hr_selection_function/gaia.py | 32 ++++++++++++++++++++++------- src/hr_selection_function/models.py | 13 ++++++++++-- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/src/hr_selection_function/gaia.py b/src/hr_selection_function/gaia.py index 12fa314..9e6158e 100644 --- a/src/hr_selection_function/gaia.py +++ b/src/hr_selection_function/gaia.py @@ -1,16 +1,34 @@ +from hr_selection_function.data import requires_data +from numpy.typing import ArrayLike +import pandas as pd from hr_selection_function.config import _CONFIG -_MAPS = dict() +class GaiaDensityEstimator(): + @requires_data + def __init__(self): + self._map = pd.read_parquet(_CONFIG['data_dir'] / "density_hp7.parquet") + def __call__(self, l: ArrayLike, b: ArrayLike): + # Todo + pass -def estimate_gaia_data_density(): - pass +class M10Estimator(): + @requires_data + def __init__(self): + self._map = pd.read_parquet(_CONFIG['data_dir'] / "m10_hp7.parquet") # Todo make this -def estimate_m10(): - pass + def __call__(self, l: ArrayLike, b: ArrayLike): + # Todo + pass -def estimate_m_rybizki(): - pass +class MSubsampleEstimator(): + @requires_data + def __init__(self): + self._map = pd.read_parquet(_CONFIG['data_dir'] / "subsample_cuts_hp7.parquet") + + def __call__(self, l: ArrayLike, b: ArrayLike): + # Todo + pass diff --git a/src/hr_selection_function/models.py b/src/hr_selection_function/models.py index 874daa1..0a57288 100644 --- a/src/hr_selection_function/models.py +++ b/src/hr_selection_function/models.py @@ -1,6 +1,15 @@ +from hr_selection_function.data import requires_data + + class HR24SelectionFunction: - pass + # Todo + @requires_data + def __init__(self): + pass class NStarsPredictor: - pass + # Todo + @requires_data + def __init__(self): + pass -- 2.51.2