diff --git a/src/rail/pipelines/degradation/apply_phot_errors.py b/src/rail/pipelines/degradation/apply_phot_errors.py index 2523a04..047cea4 100644 --- a/src/rail/pipelines/degradation/apply_phot_errors.py +++ b/src/rail/pipelines/degradation/apply_phot_errors.py @@ -52,6 +52,7 @@ def __init__(self, error_models=None): self.reddener = Reddener.build( dustmap_dir=dustmap_dir, + copy_all_cols=True, ) previous_stage = self.reddener @@ -68,4 +69,5 @@ def __init__(self, error_models=None): self.dereddener_errors = Dereddener.build( dustmap_dir=dustmap_dir, connections=dict(input=previous_stage.io.output), + copy_all_cols=True, ) diff --git a/src/rail/pipelines/degradation/spectroscopic_selection_pipeline.py b/src/rail/pipelines/degradation/spectroscopic_selection_pipeline.py index 120d407..3b9f969 100644 --- a/src/rail/pipelines/degradation/spectroscopic_selection_pipeline.py +++ b/src/rail/pipelines/degradation/spectroscopic_selection_pipeline.py @@ -16,23 +16,23 @@ SELECTORS = dict( GAMA = dict( - Selector='SpecSelection_GAMA', + Select='SpecSelection_GAMA', Module='rail.creation.degraders.spectroscopic_selections', ), BOSS = dict( - Selector='SpecSelection_BOSS', + Select='SpecSelection_BOSS', Module='rail.creation.degraders.spectroscopic_selections', ), VVDSf02 = dict( - Selector='SpecSelection_VVDSf02', + Select='SpecSelection_VVDSf02', Module='rail.creation.degraders.spectroscopic_selections', ), zCOSMOS = dict( - Selector='SpecSelection_zCOSMOS', + Select='SpecSelection_zCOSMOS', Module='rail.creation.degraders.spectroscopic_selections', ), HSC = dict( - Selector='SpecSelection_HSC', + Select='SpecSelection_HSC', Module='rail.creation.degraders.spectroscopic_selections', ), ) @@ -66,7 +66,7 @@ def __init__(self, selectors=None): config_pars['colnames'] = colnames for key, val in selectors.items(): - the_class = ceci.PipelineStage.get_stage(val['Selector'], val['Module']) + the_class = ceci.PipelineStage.get_stage(val['Select'], val['Module']) the_selector = the_class.make_and_connect( name=f'select_{key}', **config_pars, diff --git a/src/rail/tools/photometry_tools.py b/src/rail/tools/photometry_tools.py index 0eb3c1f..9f00f8e 100644 --- a/src/rail/tools/photometry_tools.py +++ b/src/rail/tools/photometry_tools.py @@ -420,16 +420,16 @@ class DustMapBase(RailStage): config_options = RailStage.config_options.copy() config_options.update( - bands=Param(str, default='ugrizy', msg="Names of the bands"), ra_name=Param(str, default='ra', msg="Name of the RA column"), dec_name=Param(str, default='dec', msg="Name of the DEC column"), mag_name=Param(str, default="mag_{band}_lsst", msg="Template for the magnitude columns"), - band_a_env=Param(list, default=[4.81,3.64,2.70,2.06,1.58,1.31], msg="Extinction values"), + band_a_env=SHARED_PARAMS, dustmap_name=Param(str, default='sfd', msg="Name of the dustmap in question"), dustmap_dir=Param(str, required=True, msg="Directory with dustmaps"), copy_cols=Param(list, default=[], msg="Additional columns to copy"), copy_all_cols=Param(bool, default=False, msg="Copy all the columns"), ) + inputs = [('input', PqHandle)] outputs = [('output', PqHandle)] @@ -470,10 +470,9 @@ def run(self): raise KeyError(f"Unknown dustmap {self.config.dustmap_name}, options are {list(dust_map_dict.keys())}") from msg ebvvec = dust_map(coords) band_mag_name_list=[] - for i, band_ in enumerate(self.config.bands): - band_mag_name = self.config.mag_name.format(band=band_) + for band_mag_name, a_env_value in self.config.band_a_env.items(): mag_vals = data[band_mag_name] - out_data[band_mag_name] = self._calc_values(mag_vals, ebvvec, self.config.band_a_env[i]) + out_data[band_mag_name] = self._calc_values(mag_vals, ebvvec, a_env_value) band_mag_name_list.append(band_mag_name) # check if copy_all_cols set to true: