LSSTApplications  17.0+50,17.0+84,17.0+9,18.0.0+14,18.0.0+2,18.0.0+30,18.0.0+4,18.0.0+9,18.0.0-2-ge43143a+4,18.1.0-1-g0001055,18.1.0-1-g0896a44+6,18.1.0-1-g1349e88+4,18.1.0-1-g2505f39+3,18.1.0-1-g380d4d4+4,18.1.0-1-g5e4b7ea,18.1.0-1-g85f8cd4+3,18.1.0-1-g9a6769a+2,18.1.0-1-ga1a4c1a+2,18.1.0-1-gc037db8,18.1.0-1-gd55f500+1,18.1.0-1-ge10677a+3,18.1.0-10-g73b8679e+7,18.1.0-11-g311e899+3,18.1.0-12-g0d73a3591,18.1.0-12-gc95f69a+3,18.1.0-2-g000ad9a+3,18.1.0-2-g31c43f9+3,18.1.0-2-g9c63283+4,18.1.0-2-gdf0b915+4,18.1.0-2-gf03bb23,18.1.0-3-g2e29e3d+6,18.1.0-3-g52aa583+2,18.1.0-3-g9cb968e+3,18.1.0-4-gd2e8982+6,18.1.0-5-g510c42a+3,18.1.0-5-gaeab27e+4,18.1.0-6-gdda7f3e+6,18.1.0-7-g89824ecc+4,w.2019.32
LSSTDataManagementBasePackage
Classes | Functions
lsst.meas.algorithms.measureApCorr Namespace Reference

Classes

class  FluxKeys
 
class  MeasureApCorrConfig
 Configuration for MeasureApCorrTask. More...
 
class  MeasureApCorrTask
 Task to measure aperture correction. More...
 

Functions

def plotApCorr (bbox, xx, yy, zzMeasure, field, title, doPause)
 

Function Documentation

◆ plotApCorr()

def lsst.meas.algorithms.measureApCorr.plotApCorr (   bbox,
  xx,
  yy,
  zzMeasure,
  field,
  title,
  doPause 
)
Plot aperture correction fit residuals

There are two subplots: residuals against x and y.

Intended for debugging.

@param bbox  Bounding box (for bounds)
@param xx  x coordinates
@param yy  y coordinates
@param zzMeasure  Measured value of the aperture correction
@param field  Fit aperture correction field
@param title  Title for plot
@param doPause  Pause to inspect the residuals plot?  If False,
                there will be a 4 second delay to allow for
                inspection of the plot before closing it and
                moving on.

Definition at line 316 of file measureApCorr.py.

316 def plotApCorr(bbox, xx, yy, zzMeasure, field, title, doPause):
317  """Plot aperture correction fit residuals
318 
319  There are two subplots: residuals against x and y.
320 
321  Intended for debugging.
322 
323  @param bbox Bounding box (for bounds)
324  @param xx x coordinates
325  @param yy y coordinates
326  @param zzMeasure Measured value of the aperture correction
327  @param field Fit aperture correction field
328  @param title Title for plot
329  @param doPause Pause to inspect the residuals plot? If False,
330  there will be a 4 second delay to allow for
331  inspection of the plot before closing it and
332  moving on.
333  """
334  import matplotlib.pyplot as plt
335 
336  zzFit = field.evaluate(xx, yy)
337  residuals = zzMeasure - zzFit
338 
339  fig, axes = plt.subplots(2, 1)
340 
341  axes[0].scatter(xx, residuals, s=3, marker='o', lw=0, alpha=0.7)
342  axes[1].scatter(yy, residuals, s=3, marker='o', lw=0, alpha=0.7)
343  for ax in axes:
344  ax.set_ylabel("ApCorr Fit Residual")
345  ax.set_ylim(0.9*residuals.min(), 1.1*residuals.max())
346  axes[0].set_xlabel("x")
347  axes[0].set_xlim(bbox.getMinX(), bbox.getMaxX())
348  axes[1].set_xlabel("y")
349  axes[1].set_xlim(bbox.getMinY(), bbox.getMaxY())
350  plt.suptitle(title)
351 
352  if not doPause:
353  try:
354  plt.pause(4)
355  plt.close()
356  except Exception:
357  print("%s: plt.pause() failed. Please close plots when done." % __name__)
358  plt.show()
359  else:
360  print("%s: Please close plots when done." % __name__)
361  plt.show()
362 
def plotApCorr(bbox, xx, yy, zzMeasure, field, title, doPause)