LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Member Functions | Static Public Member Functions | List of all members
lsst.jointcal.jointcal.JointcalRunner Class Reference
Inheritance diagram for lsst.jointcal.jointcal.JointcalRunner:

Public Member Functions

def __call__ (self, args)
 

Static Public Member Functions

def getTargetList (parsedCmd, **kwargs)
 

Detailed Description

Subclass of TaskRunner for jointcalTask (gen2)

jointcalTask.runDataRef() takes a number of arguments, one of which is a list of dataRefs
extracted from the command line (whereas most CmdLineTasks' runDataRef methods take
single dataRef, are are called repeatedly). This class transforms the processed
arguments generated by the ArgumentParser into the arguments expected by
Jointcal.runDataRef().

See pipeBase.TaskRunner for more information.

Definition at line 65 of file jointcal.py.

Member Function Documentation

◆ __call__()

def lsst.jointcal.jointcal.JointcalRunner.__call__ (   self,
  args 
)
Parameters
----------
args
    Arguments for Task.runDataRef()

Returns
-------
pipe.base.Struct
    if self.doReturnResults is False:

    - ``exitStatus``: 0 if the task completed successfully, 1 otherwise.

    if self.doReturnResults is True:

    - ``result``: the result of calling jointcal.runDataRef()
    - ``exitStatus``: 0 if the task completed successfully, 1 otherwise.

Definition at line 94 of file jointcal.py.

94  def __call__(self, args):
95  """
96  Parameters
97  ----------
98  args
99  Arguments for Task.runDataRef()
100 
101  Returns
102  -------
103  pipe.base.Struct
104  if self.doReturnResults is False:
105 
106  - ``exitStatus``: 0 if the task completed successfully, 1 otherwise.
107 
108  if self.doReturnResults is True:
109 
110  - ``result``: the result of calling jointcal.runDataRef()
111  - ``exitStatus``: 0 if the task completed successfully, 1 otherwise.
112  """
113  exitStatus = 0 # exit status for shell
114 
115  # NOTE: cannot call self.makeTask because that assumes args[0] is a single dataRef.
116  dataRefList, kwargs = args
117  butler = kwargs.pop('butler')
118  task = self.TaskClass(config=self.config, log=self.log, butler=butler)
119  result = None
120  try:
121  result = task.runDataRef(dataRefList, **kwargs)
122  exitStatus = result.exitStatus
123  job_path = butler.get('verify_job_filename')
124  result.job.write(job_path[0])
125  except Exception as e: # catch everything, sort it out later.
126  if self.doRaise:
127  raise e
128  else:
129  exitStatus = 1
130  eName = type(e).__name__
131  tract = dataRefList[0].dataId['tract']
132  task.log.fatal("Failed processing tract %s, %s: %s", tract, eName, e)
133 
134  # Put the butler back into kwargs for the other Tasks.
135  kwargs['butler'] = butler
136  if self.doReturnResults:
137  return pipeBase.Struct(result=result, exitStatus=exitStatus)
138  else:
139  return pipeBase.Struct(exitStatus=exitStatus)
140 
141 
table::Key< int > type
Definition: Detector.cc:163

◆ getTargetList()

def lsst.jointcal.jointcal.JointcalRunner.getTargetList (   parsedCmd,
**  kwargs 
)
static
Return a list of tuples per tract, each containing (dataRefs, kwargs).

Jointcal operates on lists of dataRefs simultaneously.

Definition at line 78 of file jointcal.py.

78  def getTargetList(parsedCmd, **kwargs):
79  """
80  Return a list of tuples per tract, each containing (dataRefs, kwargs).
81 
82  Jointcal operates on lists of dataRefs simultaneously.
83  """
84  kwargs['butler'] = parsedCmd.butler
85 
86  # organize data IDs by tract
87  refListDict = {}
88  for ref in parsedCmd.id.refList:
89  refListDict.setdefault(ref.dataId["tract"], []).append(ref)
90  # we call runDataRef() once with each tract
91  result = [(refListDict[tract], kwargs) for tract in sorted(refListDict.keys())]
92  return result
93 
std::shared_ptr< FrameSet > append(FrameSet const &first, FrameSet const &second)
Construct a FrameSet that performs two transformations in series.
Definition: functional.cc:33

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