LSSTApplications  17.0+10,17.0+51,17.0+87,18.0.0+10,18.0.0+15,18.0.0+33,18.0.0+4,18.0.0+6,18.0.0-2-ge43143a+6,18.1.0-1-g0001055+2,18.1.0-1-g0896a44+9,18.1.0-1-g1349e88+8,18.1.0-1-g2505f39+6,18.1.0-1-g380d4d4+8,18.1.0-1-g5e4b7ea+2,18.1.0-1-g7e8fceb,18.1.0-1-g85f8cd4+6,18.1.0-1-g9a6769a+3,18.1.0-1-ga1a4c1a+5,18.1.0-1-gc037db8+2,18.1.0-1-gd55f500+3,18.1.0-1-ge10677a+6,18.1.0-10-g73b8679e+11,18.1.0-11-g311e899+7,18.1.0-12-gc95f69a+7,18.1.0-13-g451e75588,18.1.0-2-g31c43f9+6,18.1.0-2-g9c63283+8,18.1.0-2-gdf0b915+8,18.1.0-2-gf03bb23+2,18.1.0-3-g2e29e3d+9,18.1.0-3-g52aa583+3,18.1.0-3-g8f4a2b1,18.1.0-3-g9cb968e+7,18.1.0-4-gd2e8982+9,18.1.0-5-g510c42a+7,18.1.0-5-gaeab27e+8,18.1.0-6-gdda7f3e+10,18.1.0-8-g4084bf03,w.2019.33
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.