LSSTApplications  17.0+124,17.0+14,17.0+73,18.0.0+37,18.0.0+80,18.0.0-4-g68ffd23+4,18.1.0-1-g0001055+12,18.1.0-1-g03d53ef+5,18.1.0-1-g1349e88+55,18.1.0-1-g2505f39+44,18.1.0-1-g5315e5e+4,18.1.0-1-g5e4b7ea+14,18.1.0-1-g7e8fceb+4,18.1.0-1-g85f8cd4+48,18.1.0-1-g8ff0b9f+4,18.1.0-1-ga2c679d+1,18.1.0-1-gd55f500+35,18.1.0-10-gb58edde+2,18.1.0-11-g0997b02+4,18.1.0-13-gfe4edf0b+12,18.1.0-14-g259bd21+21,18.1.0-19-gdb69f3f+2,18.1.0-2-g5f9922c+24,18.1.0-2-gd3b74e5+11,18.1.0-2-gfbf3545+32,18.1.0-26-g728bddb4+5,18.1.0-27-g6ff7ca9+2,18.1.0-3-g52aa583+25,18.1.0-3-g8ea57af+9,18.1.0-3-gb69f684+42,18.1.0-3-gfcaddf3+6,18.1.0-32-gd8786685a,18.1.0-4-gf3f9b77+6,18.1.0-5-g1dd662b+2,18.1.0-5-g6dbcb01+41,18.1.0-6-gae77429+3,18.1.0-7-g9d75d83+9,18.1.0-7-gae09a6d+30,18.1.0-9-gc381ef5+4,w.2019.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 
def getInputSchema(task, butler=None, schema=None)
Obtain the input schema either directly or froma butler reference.

◆ 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 
Reports attempts to access elements using an invalid key.
Definition: Runtime.h:151
Holds an integer identifier for an LSST filter.
Definition: Filter.h:141

◆ 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 
def makeMergeArgumentParser(name, dataset)
Create a suitable ArgumentParser.

◆ 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 
def readCatalog(task, patchRef)
Read input catalog.