LSSTApplications  18.1.0
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.