LSST Applications g180d380827+78227d2bc4,g2079a07aa2+86d27d4dc4,g2305ad1205+bdd7851fe3,g2bbee38e9b+c6a8a0fb72,g337abbeb29+c6a8a0fb72,g33d1c0ed96+c6a8a0fb72,g3a166c0a6a+c6a8a0fb72,g3d1719c13e+260d7c3927,g3ddfee87b4+723a6db5f3,g487adcacf7+29e55ea757,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+9443c4b912,g62aa8f1a4b+7e2ea9cd42,g858d7b2824+260d7c3927,g864b0138d7+8498d97249,g95921f966b+dffe86973d,g991b906543+260d7c3927,g99cad8db69+4809d78dd9,g9c22b2923f+e2510deafe,g9ddcbc5298+9a081db1e4,ga1e77700b3+03d07e1c1f,gb0e22166c9+60f28cb32d,gb23b769143+260d7c3927,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e22341fd87,gbd998247f1+585e252eca,gc120e1dc64+713f94b854,gc28159a63d+c6a8a0fb72,gc3e9b769f7+385ea95214,gcf0d15dbbd+723a6db5f3,gdaeeff99f8+f9a426f77a,ge6526c86ff+fde82a80b9,ge79ae78c31+c6a8a0fb72,gee10cc3b42+585e252eca,w.2024.18
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitInputConnections Class Reference
Inheritance diagram for lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitInputConnections:
lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitBaseConfig lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitConnections lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitConfig lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitConfig

Public Member Functions

 adjustQuantum (self, inputs, outputs, label, data_id)
 

Static Public Attributes

 cat_ref
 
 cats_meas
 
 coadds
 
 models_psf
 
 models_scarlet
 

Detailed Description

Definition at line 56 of file fit_coadd_multiband.py.

Member Function Documentation

◆ adjustQuantum()

lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitInputConnections.adjustQuantum ( self,
inputs,
outputs,
label,
data_id )
Validates the `lsst.daf.butler.DatasetRef` bands against the
subtask's list of bands to fit and drops unnecessary bands.

Parameters
----------
inputs : `dict`
    Dictionary whose keys are an input (regular or prerequisite)
    connection name and whose values are a tuple of the connection
    instance and a collection of associated `DatasetRef` objects.
    The exact type of the nested collections is unspecified; it can be
    assumed to be multi-pass iterable and support `len` and ``in``, but
    it should not be mutated in place.  In contrast, the outer
    dictionaries are guaranteed to be temporary copies that are true
    `dict` instances, and hence may be modified and even returned; this
    is especially useful for delegating to `super` (see notes below).
outputs : `Mapping`
    Mapping of output datasets, with the same structure as ``inputs``.
label : `str`
    Label for this task in the pipeline (should be used in all
    diagnostic messages).
data_id : `lsst.daf.butler.DataCoordinate`
    Data ID for this quantum in the pipeline (should be used in all
    diagnostic messages).

Returns
-------
adjusted_inputs : `Mapping`
    Mapping of the same form as ``inputs`` with updated containers of
    input `DatasetRef` objects.  All inputs involving the 'band'
    dimension are adjusted to put them in consistent order and remove
    unneeded bands.
adjusted_outputs : `Mapping`
    Mapping of updated output datasets; always empty for this task.

Raises
------
lsst.pipe.base.NoWorkFound
    Raised if there are not enough of the right bands to run the task
    on this quantum.

Definition at line 96 of file fit_coadd_multiband.py.

96 def adjustQuantum(self, inputs, outputs, label, data_id):
97 """Validates the `lsst.daf.butler.DatasetRef` bands against the
98 subtask's list of bands to fit and drops unnecessary bands.
99
100 Parameters
101 ----------
102 inputs : `dict`
103 Dictionary whose keys are an input (regular or prerequisite)
104 connection name and whose values are a tuple of the connection
105 instance and a collection of associated `DatasetRef` objects.
106 The exact type of the nested collections is unspecified; it can be
107 assumed to be multi-pass iterable and support `len` and ``in``, but
108 it should not be mutated in place. In contrast, the outer
109 dictionaries are guaranteed to be temporary copies that are true
110 `dict` instances, and hence may be modified and even returned; this
111 is especially useful for delegating to `super` (see notes below).
112 outputs : `Mapping`
113 Mapping of output datasets, with the same structure as ``inputs``.
114 label : `str`
115 Label for this task in the pipeline (should be used in all
116 diagnostic messages).
117 data_id : `lsst.daf.butler.DataCoordinate`
118 Data ID for this quantum in the pipeline (should be used in all
119 diagnostic messages).
120
121 Returns
122 -------
123 adjusted_inputs : `Mapping`
124 Mapping of the same form as ``inputs`` with updated containers of
125 input `DatasetRef` objects. All inputs involving the 'band'
126 dimension are adjusted to put them in consistent order and remove
127 unneeded bands.
128 adjusted_outputs : `Mapping`
129 Mapping of updated output datasets; always empty for this task.
130
131 Raises
132 ------
133 lsst.pipe.base.NoWorkFound
134 Raised if there are not enough of the right bands to run the task
135 on this quantum.
136 """
137 # Check which bands are going to be fit
138 bands_fit, bands_read_only = self.config.get_band_sets()
139 bands_needed = bands_fit + [band for band in bands_read_only if band not in bands_fit]
140
141 adjusted_inputs = {}
142 for connection_name, (connection, dataset_refs) in inputs.items():
143 # Datasets without bands in their dimensions should be fine
144 if 'band' in connection.dimensions:
145 datasets_by_band = {dref.dataId['band']: dref for dref in dataset_refs}
146 if not set(bands_needed).issubset(datasets_by_band.keys()):
147 raise pipeBase.NoWorkFound(
148 f'DatasetRefs={dataset_refs} have data with bands in the'
149 f' set={set(datasets_by_band.keys())},'
150 f' which is not a superset of the required bands={bands_needed} defined by'
151 f' {self.config.__class__}.fit_coadd_multiband='
152 f'{self.config.fit_coadd_multiband._value.__class__}\'s attributes'
153 f' bands_fit={bands_fit} and bands_read_only()={bands_read_only}.'
154 f' Add the required bands={set(bands_needed).difference(datasets_by_band.keys())}.'
155 )
156 # Adjust all datasets with band dimensions to include just
157 # the needed bands, in consistent order.
158 adjusted_inputs[connection_name] = (
159 connection,
160 [datasets_by_band[band] for band in bands_needed]
161 )
162
163 # Delegate to super for more checks.
164 inputs.update(adjusted_inputs)
165 super().adjustQuantum(inputs, outputs, label, data_id)
166 return adjusted_inputs, {}
167
168
daf::base::PropertySet * set
Definition fits.cc:931

Member Data Documentation

◆ cat_ref

lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitInputConnections.cat_ref
static
Initial value:
= cT.Input(
doc="Reference multiband source catalog",
name="{name_coadd}Coadd_ref",
storageClass="SourceCatalog",
dimensions=("tract", "patch", "skymap"),
)

Definition at line 61 of file fit_coadd_multiband.py.

◆ cats_meas

lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitInputConnections.cats_meas
static
Initial value:
= cT.Input(
doc="Deblended single-band source catalogs",
name="{name_coadd}Coadd_meas",
storageClass="SourceCatalog",
dimensions=("tract", "patch", "band", "skymap"),
multiple=True,
)

Definition at line 67 of file fit_coadd_multiband.py.

◆ coadds

lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitInputConnections.coadds
static
Initial value:
= cT.Input(
doc="Exposures on which to run fits",
name="{name_coadd}Coadd_calexp",
storageClass="ExposureF",
dimensions=("tract", "patch", "band", "skymap"),
multiple=True,
)

Definition at line 74 of file fit_coadd_multiband.py.

◆ models_psf

lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitInputConnections.models_psf
static
Initial value:
= cT.Input(
doc="Input PSF model parameter catalog",
# Consider allowing independent psf fit method
name="{name_coadd}Coadd_psfs_{name_method}",
storageClass="ArrowAstropy",
dimensions=("tract", "patch", "band", "skymap"),
multiple=True,
)

Definition at line 81 of file fit_coadd_multiband.py.

◆ models_scarlet

lsst.pipe.tasks.fit_coadd_multiband.CoaddMultibandFitInputConnections.models_scarlet
static
Initial value:
= pipeBase.connectionTypes.Input(
doc="Multiband scarlet models produced by the deblender",
name="{name_coadd}Coadd_scarletModelData",
storageClass="ScarletModelData",
dimensions=("tract", "patch", "skymap"),
)

Definition at line 89 of file fit_coadd_multiband.py.


The documentation for this class was generated from the following file: