Skip to content

Commit

Permalink
standardize astropy table import and remove dead comments
Browse files Browse the repository at this point in the history
  • Loading branch information
eacharles committed Sep 24, 2024
1 parent 65bab23 commit b3fe18e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions python/lsst/meas/pz/estimate_pz_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -64,7 +63,6 @@ class EstimatePZConnections(
storageClass="PZModel",
dimensions=["instrument"],
isCalibration=True,
# lookupFunction=_pzModelLookup,
)

objectTable = cT.Input(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/meas/pz/estimate_pz_task_trainz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -72,7 +72,7 @@ class EstimatePZTrainZAlgoTask(EstimatePZAlgoTask):

def _get_mags_and_errs(
self,
fluxes: atable,
fluxes: Table,
mag_offset: float,
) -> dict[str, np.array]:

Expand Down

0 comments on commit b3fe18e

Please sign in to comment.