LSSTApplications  19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
Classes | Functions
lsst.pipe.tasks.multiBandUtils Namespace Reference

Classes

class  CullPeaksConfig
 Configuration for culling garbage peaks after merging footprints. More...
 
class  MergeSourcesRunner
 

Functions

def makeMergeArgumentParser (name, dataset)
 Create a suitable ArgumentParser. More...
 
def getInputSchema (task, butler=None, schema=None)
 Obtain the input schema either directly or froma butler reference. More...
 
def getShortFilterName (name)
 
def readCatalog (task, patchRef)
 Read input catalog. More...
 

Function Documentation

◆ getInputSchema()

def lsst.pipe.tasks.multiBandUtils.getInputSchema (   task,
  butler = None,
  schema = None 
)

Obtain the input schema either directly or froma butler reference.

Parameters
[in]butlerbutler reference to obtain the input schema from
[in]schemathe input schema

Definition at line 127 of file multiBandUtils.py.

127 def getInputSchema(task, butler=None, schema=None):
128  """!
129  @brief Obtain the input schema either directly or froma butler reference.
130 
131  @param[in] butler butler reference to obtain the input schema from
132  @param[in] schema the input schema
133  """
134  if schema is None:
135  assert butler is not None, "Neither butler nor schema specified"
136  schema = butler.get(task.config.coaddName + "Coadd_" + task.inputDataset + "_schema",
137  immediate=True).schema
138  return schema
139 
140 

◆ getShortFilterName()

def lsst.pipe.tasks.multiBandUtils.getShortFilterName (   name)
Given a longer, camera-specific filter name (e.g. "HSC-I") return its shorthand name ("i").

Definition at line 141 of file multiBandUtils.py.

141 def getShortFilterName(name):
142  """Given a longer, camera-specific filter name (e.g. "HSC-I") return its shorthand name ("i").
143  """
144  # I'm not sure if this is the way this is supposed to be implemented, but it seems to work,
145  # and its the only way I could get it to work.
146  try:
147  return afwImage.Filter(name).getFilterProperty().getName()
149  # No mapping could be found, try proceeding with given name
150  return name
151 
152 

◆ makeMergeArgumentParser()

def lsst.pipe.tasks.multiBandUtils.makeMergeArgumentParser (   name,
  dataset 
)

Create a suitable ArgumentParser.

We will use the ArgumentParser to get a provide a list of data references for patches; the RunnerClass will sort them into lists of data references for the same patch

Definition at line 112 of file multiBandUtils.py.

112 def makeMergeArgumentParser(name, dataset):
113  """!
114  @brief Create a suitable ArgumentParser.
115 
116  We will use the ArgumentParser to get a provide a list of data
117  references for patches; the RunnerClass will sort them into lists
118  of data references for the same patch
119  """
120  parser = ArgumentParser(name)
121  parser.add_id_argument("--id", "deepCoadd_" + dataset,
122  ContainerClass=ExistingCoaddDataIdContainer,
123  help="data ID, e.g. --id tract=12345 patch=1,2 filter=g^r^i")
124  return parser
125 
126 

◆ readCatalog()

def lsst.pipe.tasks.multiBandUtils.readCatalog (   task,
  patchRef 
)

Read input catalog.

We read the input dataset provided by the 'inputDataset' class variable.

Parameters
[in]patchRefdata reference for patch
Returns
tuple consisting of the filter name and the catalog

Definition at line 153 of file multiBandUtils.py.

153 def readCatalog(task, patchRef):
154  """!
155  @brief Read input catalog.
156 
157  We read the input dataset provided by the 'inputDataset'
158  class variable.
159 
160  @param[in] patchRef data reference for patch
161  @return tuple consisting of the filter name and the catalog
162  """
163  filterName = patchRef.dataId["filter"]
164  catalog = patchRef.get(task.config.coaddName + "Coadd_" + task.inputDataset, immediate=True)
165  task.log.info("Read %d sources for filter %s: %s" % (len(catalog), filterName, patchRef.dataId))
166  return filterName, catalog
167 
168 
lsst.pex::exceptions::NotFoundError
Reports attempts to access elements using an invalid key.
Definition: Runtime.h:151
lsst::afw::image::Filter
Holds an integer identifier for an LSST filter.
Definition: Filter.h:141
lsst.pipe.tasks.multiBandUtils.makeMergeArgumentParser
def makeMergeArgumentParser(name, dataset)
Create a suitable ArgumentParser.
Definition: multiBandUtils.py:112
lsst.pipe.tasks.multiBandUtils.getInputSchema
def getInputSchema(task, butler=None, schema=None)
Obtain the input schema either directly or froma butler reference.
Definition: multiBandUtils.py:127
lsst.pipe.tasks.multiBandUtils.getShortFilterName
def getShortFilterName(name)
Definition: multiBandUtils.py:141
lsst.pipe.tasks.multiBandUtils.readCatalog
def readCatalog(task, patchRef)
Read input catalog.
Definition: multiBandUtils.py:153