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.objectSizeStarSelector Namespace Reference

Classes

class  EventHandler
 
class  ObjectSizeStarSelectorConfig
 
class  ObjectSizeStarSelectorTask
 A star selector that looks for a cluster of small objects in a size-magnitude plot. More...
 

Functions

def plot (mag, width, centers, clusterId, marker="o", markersize=2, markeredgewidth=0, ltype='-', magType="model", clear=True)
 

Function Documentation

◆ plot()

def lsst.meas.algorithms.objectSizeStarSelector.plot (   mag,
  width,
  centers,
  clusterId,
  marker = "o",
  markersize = 2,
  markeredgewidth = 0,
  ltype = '-',
  magType = "model",
  clear = True 
)

Definition at line 265 of file objectSizeStarSelector.py.

265  magType="model", clear=True):
266 
267  log = Log.getLogger("objectSizeStarSelector.plot")
268  try:
269  import matplotlib.pyplot as plt
270  except ImportError as e:
271  log.warn("Unable to import matplotlib: %s", e)
272  return
273 
274  try:
275  fig
276  except NameError:
277  fig = plt.figure()
278  else:
279  if clear:
280  fig.clf()
281 
282  axes = fig.add_axes((0.1, 0.1, 0.85, 0.80))
283 
284  xmin = sorted(mag)[int(0.05*len(mag))]
285  xmax = sorted(mag)[int(0.95*len(mag))]
286 
287  axes.set_xlim(-17.5, -13)
288  axes.set_xlim(xmin - 0.1*(xmax - xmin), xmax + 0.1*(xmax - xmin))
289  axes.set_ylim(0, 10)
290 
291  colors = ["r", "g", "b", "c", "m", "k", ]
292  for k, mean in enumerate(centers):
293  if k == 0:
294  axes.plot(axes.get_xlim(), (mean, mean,), "k%s" % ltype)
295 
296  li = (clusterId == k)
297  axes.plot(mag[li], width[li], marker, markersize=markersize, markeredgewidth=markeredgewidth,
298  color=colors[k % len(colors)])
299 
300  li = (clusterId == -1)
301  axes.plot(mag[li], width[li], marker, markersize=markersize, markeredgewidth=markeredgewidth,
302  color='k')
303 
304  if clear:
305  axes.set_xlabel("Instrumental %s mag" % magType)
306  axes.set_ylabel(r"$\sqrt{(I_{xx} + I_{yy})/2}$")
307 
308  return fig
309