From b3fe18e479c3e085814607770bce5ad98088dbb5 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Mon, 23 Sep 2024 18:44:50 -0700 Subject: [PATCH] standardize astropy table import and remove dead comments --- python/lsst/meas/pz/estimate_pz_task.py | 14 ++++++-------- python/lsst/meas/pz/estimate_pz_task_trainz.py | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/python/lsst/meas/pz/estimate_pz_task.py b/python/lsst/meas/pz/estimate_pz_task.py index 5b6ef61..f4c6027 100644 --- a/python/lsst/meas/pz/estimate_pz_task.py +++ b/python/lsst/meas/pz/estimate_pz_task.py @@ -34,7 +34,6 @@ from ceci.config import StageConfig as CeciStageConfig from ceci.config import StageParameter as CeciParam -# from ceci.stage import PipelineStage as CeciPipelineStage from lsst.pipe.base import ( PipelineTask, PipelineTaskConfig, @@ -43,7 +42,7 @@ Task, ) -import astropy.table as atable +from astropy.table import Table from rail.core.model import Model from rail.estimation.estimator import CatEstimator from rail.interfaces import PZFactory @@ -64,7 +63,6 @@ class EstimatePZConnections( storageClass="PZModel", dimensions=["instrument"], isCalibration=True, - # lookupFunction=_pzModelLookup, ) objectTable = cT.Input( @@ -324,14 +322,14 @@ def _get_mag_err_names(self) -> dict[str, str]: def _get_mags_and_errs( self, - fluxes: atable, + fluxes: Table, mag_offset: float, ) -> dict[str, np.array]: """Fill and return a numpy dict with mags and mag errors Parameters ---------- - fluxes : atable + fluxes : Table Input fluxes and flux errors mag_offset : float @@ -411,13 +409,13 @@ def col_names( def run( self, - fluxes: atable, + fluxes: Table, ) -> Struct: """Run a p(z) estimation algorithm Parameters ---------- - fluxes: atable + fluxes: Table Fluxes used to compute the redshifts Returns @@ -485,7 +483,7 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs): def run( self, pzModel: Model, - fluxes: atable, + fluxes: Table, skip_init: bool = False, ) -> Struct: if not skip_init: diff --git a/python/lsst/meas/pz/estimate_pz_task_trainz.py b/python/lsst/meas/pz/estimate_pz_task_trainz.py index bfcd0bb..337bfd8 100644 --- a/python/lsst/meas/pz/estimate_pz_task_trainz.py +++ b/python/lsst/meas/pz/estimate_pz_task_trainz.py @@ -27,7 +27,7 @@ ] import numpy as np -import astropy.table as atable +from astropy.table import Table from rail.estimation.estimator import CatEstimator from rail.estimation.algos.train_z import TrainZEstimator @@ -72,7 +72,7 @@ class EstimatePZTrainZAlgoTask(EstimatePZAlgoTask): def _get_mags_and_errs( self, - fluxes: atable, + fluxes: Table, mag_offset: float, ) -> dict[str, np.array]: