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
Classes | Functions | Variables
lsst.jointcal.utils Namespace Reference

Classes

class  JointcalStatistics
 

Functions

def plot_flux_distributions (plt, old_mag, new_mag, old_weighted_rms, new_weighted_rms, faint, bright, old_PA1, new_PA1, name='', outdir='.plots')
 
def plot_all_wcs_deltas (plt, data_refs, visits, old_wcs_list, per_ccd_plot=False, name='', outdir='.plots')
 
def make_xy_wcs_grid (x_dim, y_dim, wcs1, wcs2, num=50)
 
def wcs_convert (xv, yv, wcs)
 
def plot_all_wcs_quivers (plt, data_refs, visits, old_wcs_list, name, outdir='.plots')
 
def plot_wcs_quivers (ax, wcs1, wcs2, x_dim, y_dim)
 
def plot_wcs_magnitude (plt, data_refs, visits, old_wcs_list, name, outdir='.plots')
 
def plot_wcs (plt, wcs1, wcs2, x_dim, y_dim, center=(0, 0), name="", outdir='.plots')
 
def plot_rms_histogram (plt, old_rms_relative, old_rms_absolute, new_rms_relative, new_rms_absolute, old_rel_total, old_abs_total, new_rel_total, new_abs_total, name="", outdir='.plots')
 

Variables

 MatchDict = collections.namedtuple('MatchDict', ['relative', 'absolute'])
 

Function Documentation

◆ make_xy_wcs_grid()

def lsst.jointcal.utils.make_xy_wcs_grid (   x_dim,
  y_dim,
  wcs1,
  wcs2,
  num = 50 
)
Return num x/y grid coordinates for wcs1 and wcs2.

Definition at line 535 of file utils.py.

535 def make_xy_wcs_grid(x_dim, y_dim, wcs1, wcs2, num=50):
536  """Return num x/y grid coordinates for wcs1 and wcs2."""
537  x = np.linspace(0, x_dim, num)
538  y = np.linspace(0, y_dim, num)
539  x1, y1 = wcs_convert(x, y, wcs1)
540  x2, y2 = wcs_convert(x, y, wcs2)
541  return x1, y1, x2, y2
542 
543 
def wcs_convert(xv, yv, wcs)
Definition: utils.py:544
def make_xy_wcs_grid(x_dim, y_dim, wcs1, wcs2, num=50)
Definition: utils.py:535

◆ plot_all_wcs_deltas()

def lsst.jointcal.utils.plot_all_wcs_deltas (   plt,
  data_refs,
  visits,
  old_wcs_list,
  per_ccd_plot = False,
  name = '',
  outdir = '.plots' 
)
Various plots of the difference between old and new Wcs.

Parameters
----------
plt : matplotlib.pyplot instance
    pyplot instance to plot with.
data_refs : list of lsst.daf.persistence.butlerSubset.ButlerDataRef
    A list of data refs to plot.
visits : list of visit id (usually int)
    list of visit identifiers, one-to-one correspondent with catalogs.
old_wcs_list : list of lsst.afw.image.wcs.Wcs
    A list of the old (pre-jointcal) WCSs, one-to-one corresponding to data_refs.
per_ccd_plot : bool, optional
    Make per-ccd plots of the "wcs different" (warning: slow!)
name : str
    Name to include in plot titles and save files.
outdir : str, optional
    Directory to write the saved plots to.

Definition at line 499 of file utils.py.

500  name='', outdir='.plots'):
501  """
502  Various plots of the difference between old and new Wcs.
503 
504  Parameters
505  ----------
506  plt : matplotlib.pyplot instance
507  pyplot instance to plot with.
508  data_refs : list of lsst.daf.persistence.butlerSubset.ButlerDataRef
509  A list of data refs to plot.
510  visits : list of visit id (usually int)
511  list of visit identifiers, one-to-one correspondent with catalogs.
512  old_wcs_list : list of lsst.afw.image.wcs.Wcs
513  A list of the old (pre-jointcal) WCSs, one-to-one corresponding to data_refs.
514  per_ccd_plot : bool, optional
515  Make per-ccd plots of the "wcs different" (warning: slow!)
516  name : str
517  Name to include in plot titles and save files.
518  outdir : str, optional
519  Directory to write the saved plots to.
520  """
521 
522  plot_wcs_magnitude(plt, data_refs, visits, old_wcs_list, name, outdir=outdir)
523  plot_all_wcs_quivers(plt, data_refs, visits, old_wcs_list, name, outdir=outdir)
524 
525  if per_ccd_plot:
526  for i, ref in enumerate(data_refs):
527  md = ref.get('calexp_md')
528  dims = lsst.afw.image.bboxFromMetadata(md).getDimensions()
529  plot_wcs(plt, old_wcs_list[i], ref.get('jointcal_wcs'),
530  dims.getX(), dims.getY(),
531  center=(md.getScalar('CRVAL1'), md.getScalar('CRVAL2')), name='dataRef %d'%i,
532  outdir=outdir)
533 
534 
lsst::geom::Box2I bboxFromMetadata(daf::base::PropertySet &metadata)
Determine the image bounding box from its metadata (FITS header)
Definition: Image.cc:680
def plot_wcs(plt, wcs1, wcs2, x_dim, y_dim, center=(0, 0), name="", outdir='.plots')
Definition: utils.py:682
def plot_all_wcs_quivers(plt, data_refs, visits, old_wcs_list, name, outdir='.plots')
Definition: utils.py:556
def plot_wcs_magnitude(plt, data_refs, visits, old_wcs_list, name, outdir='.plots')
Definition: utils.py:622

◆ plot_all_wcs_quivers()

def lsst.jointcal.utils.plot_all_wcs_quivers (   plt,
  data_refs,
  visits,
  old_wcs_list,
  name,
  outdir = '.plots' 
)
Make quiver plots of the WCS deltas for each CCD in each visit.

Parameters
----------
plt : matplotlib.pyplot instance
    pyplot instance to plot with.
data_refs : list of lsst.daf.persistence.butlerSubset.ButlerDataRef
    A list of data refs to plot.
visits : list of visit id (usually int)
    list of visit identifiers, one-to-one correspondent with catalogs.
old_wcs_list : list of lsst.afw.image.wcs.Wcs
    A list of the old (pre-jointcal) WCSs, one-to-one corresponding to data_refs.
name : str
    Name to include in plot titles and save files.
outdir : str, optional
    Directory to write the saved plots to.

Definition at line 556 of file utils.py.

556 def plot_all_wcs_quivers(plt, data_refs, visits, old_wcs_list, name, outdir='.plots'):
557  """
558  Make quiver plots of the WCS deltas for each CCD in each visit.
559 
560  Parameters
561  ----------
562  plt : matplotlib.pyplot instance
563  pyplot instance to plot with.
564  data_refs : list of lsst.daf.persistence.butlerSubset.ButlerDataRef
565  A list of data refs to plot.
566  visits : list of visit id (usually int)
567  list of visit identifiers, one-to-one correspondent with catalogs.
568  old_wcs_list : list of lsst.afw.image.wcs.Wcs
569  A list of the old (pre-jointcal) WCSs, one-to-one corresponding to data_refs.
570  name : str
571  Name to include in plot titles and save files.
572  outdir : str, optional
573  Directory to write the saved plots to.
574  """
575 
576  for visit in visits:
577  fig = plt.figure()
578  # fig.set_tight_layout(True)
579  ax = fig.add_subplot(111)
580  for old_wcs, ref in zip(old_wcs_list, data_refs):
581  if ref.dataId['visit'] != visit:
582  continue
583  md = ref.get('calexp_md')
584  dims = lsst.afw.image.bboxFromMetadata(md).getDimensions()
585  Q = plot_wcs_quivers(ax, old_wcs, ref.get('jointcal_wcs'),
586  dims.getX(), dims.getY())
587  # TODO: add CCD bounding boxes to plot once DM-5503 is finished.
588  # TODO: add a circle for the full focal plane.
589  length = (0.1*u.arcsecond).to(u.radian).value
590  ax.quiverkey(Q, 0.9, 0.95, length, '0.1 arcsec', coordinates='figure', labelpos='W')
591  plt.xlabel('RA')
592  plt.ylabel('Dec')
593  plt.title('visit: {}'.format(visit))
594  filename = os.path.join(outdir, '{}-{}-quivers.pdf')
595  plt.savefig(filename.format(name, visit))
596 
597 
table::Key< int > to
def plot_wcs_quivers(ax, wcs1, wcs2, x_dim, y_dim)
Definition: utils.py:598
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
Definition: history.py:174

◆ plot_flux_distributions()

def lsst.jointcal.utils.plot_flux_distributions (   plt,
  old_mag,
  new_mag,
  old_weighted_rms,
  new_weighted_rms,
  faint,
  bright,
  old_PA1,
  new_PA1,
  name = '',
  outdir = '.plots' 
)
Plot various distributions of fluxes and magnitudes.

Parameters
----------
plt : matplotlib.pyplot instance
    pyplot instance to plot with
old_mag : np.array
    old magnitudes
new_mag : np.array
    new magnitudes
old_weighted_rms : np.array
    old rms weighted by the mean (rms(data)/mean(data))
new_weighted_rms : np.array
    old rms weighted by the mean (rms(data)/mean(data))
faint : float
    Faint end of range that PA1 was computed from.
bright : float
    Bright end of range that PA1 was computed from.
old_PA1 : float
    Old value of PA1, to plot as horizontal line.
new_PA1 : float
    New value of PA1, to plot as horizontal line.
name : str
    Name to include in plot titles and save files.
outdir : str, optional
    Directory to write the saved plots to.

Definition at line 437 of file utils.py.

439  name='', outdir='.plots'):
440  """Plot various distributions of fluxes and magnitudes.
441 
442  Parameters
443  ----------
444  plt : matplotlib.pyplot instance
445  pyplot instance to plot with
446  old_mag : np.array
447  old magnitudes
448  new_mag : np.array
449  new magnitudes
450  old_weighted_rms : np.array
451  old rms weighted by the mean (rms(data)/mean(data))
452  new_weighted_rms : np.array
453  old rms weighted by the mean (rms(data)/mean(data))
454  faint : float
455  Faint end of range that PA1 was computed from.
456  bright : float
457  Bright end of range that PA1 was computed from.
458  old_PA1 : float
459  Old value of PA1, to plot as horizontal line.
460  new_PA1 : float
461  New value of PA1, to plot as horizontal line.
462  name : str
463  Name to include in plot titles and save files.
464  outdir : str, optional
465  Directory to write the saved plots to.
466  """
467 
468  import seaborn
469  seaborn.set_style('whitegrid')
470  import scipy.stats
471 
472  old_color = 'blue'
473  new_color = 'red'
474  plt.figure()
475  plt.plot(old_mag, old_weighted_rms, '.', color=old_color, label='old')
476  plt.plot(new_mag, new_weighted_rms, '.', color=new_color, label='new')
477  plt.axvline(faint, ls=':', color=old_color)
478  plt.axvline(bright, ls=':', color=old_color)
479  plt.axhline(old_PA1, ls='--', color=old_color)
480  plt.axhline(new_PA1, ls='--', color=new_color)
481  plt.legend(loc='upper left')
482  plt.title('Where is the systematic flux rms limit?')
483  plt.xlabel('magnitude')
484  plt.ylabel('rms/mean per source')
485  filename = os.path.join(outdir, '{}-photometry-PA1.pdf')
486  plt.savefig(filename.format(name))
487 
488  plt.figure()
489  seaborn.distplot(old_weighted_rms, fit=scipy.stats.lognorm, kde=False, label="old", color=old_color)
490  seaborn.distplot(new_weighted_rms, fit=scipy.stats.lognorm, kde=False, label="new", color=new_color)
491  plt.title('Source RMS pre/post-jointcal')
492  plt.xlabel('rms(flux)/mean(flux)')
493  plt.ylabel('number')
494  plt.legend(loc='upper right')
495  filename = os.path.join(outdir, '{}-photometry-rms.pdf')
496  plt.savefig(filename.format(name))
497 
498 

◆ plot_rms_histogram()

def lsst.jointcal.utils.plot_rms_histogram (   plt,
  old_rms_relative,
  old_rms_absolute,
  new_rms_relative,
  new_rms_absolute,
  old_rel_total,
  old_abs_total,
  new_rel_total,
  new_abs_total,
  name = "",
  outdir = '.plots' 
)
Plot histograms of the source separations and their RMS values.

Parameters
----------
plt : matplotlib.pyplot instance
    pyplot instance to plot with.
old_rms_relative : np.array
    old relative rms/star
old_rms_absolute : np.array
    old absolute rms/star
new_rms_relative : np.array
    new relative rms/star
new_rms_absolute : np.array
    new absolute rms/star
old_rel_total : float
    old relative rms over all stars
old_abs_total : float
    old absolute rms over all stars
new_rel_total : float
    new relative rms over all stars
new_abs_total : float
    new absolute rms over all stars
name : str
    Name to include in plot titles and save files.
outdir : str, optional
    Directory to write the saved plots to.

Definition at line 716 of file utils.py.

719  name="", outdir='.plots'):
720  """Plot histograms of the source separations and their RMS values.
721 
722  Parameters
723  ----------
724  plt : matplotlib.pyplot instance
725  pyplot instance to plot with.
726  old_rms_relative : np.array
727  old relative rms/star
728  old_rms_absolute : np.array
729  old absolute rms/star
730  new_rms_relative : np.array
731  new relative rms/star
732  new_rms_absolute : np.array
733  new absolute rms/star
734  old_rel_total : float
735  old relative rms over all stars
736  old_abs_total : float
737  old absolute rms over all stars
738  new_rel_total : float
739  new relative rms over all stars
740  new_abs_total : float
741  new absolute rms over all stars
742  name : str
743  Name to include in plot titles and save files.
744  outdir : str, optional
745  Directory to write the saved plots to.
746  """
747  plt.figure()
748 
749  color_rel = 'black'
750  ls_old = 'dotted'
751  color_abs = 'green'
752  ls_new = 'dashed'
753  plotOptions = {'lw': 2, 'range': (0, 0.1)*u.arcsecond, 'normed': True,
754  'bins': 30, 'histtype': 'step'}
755 
756  plt.title('relative vs. absolute: %d vs. %d'%(len(old_rms_relative), len(old_rms_absolute)))
757 
758  plt.hist(old_rms_absolute, color=color_abs, ls=ls_old, label='old abs', **plotOptions)
759  plt.hist(new_rms_absolute, color=color_abs, ls=ls_new, label='new abs', **plotOptions)
760 
761  plt.hist(old_rms_relative, color=color_rel, ls=ls_old, label='old rel', **plotOptions)
762  plt.hist(new_rms_relative, color=color_rel, ls=ls_new, label='new rel', **plotOptions)
763 
764  plt.axvline(x=old_abs_total.value, linewidth=1.5, color=color_abs, ls=ls_old)
765  plt.axvline(x=new_abs_total.value, linewidth=1.5, color=color_abs, ls=ls_new)
766  plt.axvline(x=old_rel_total.value, linewidth=1.5, color=color_rel, ls=ls_old)
767  plt.axvline(x=new_rel_total.value, linewidth=1.5, color=color_rel, ls=ls_new)
768 
769  plt.xlim(plotOptions['range'])
770  plt.xlabel('arcseconds')
771  plt.legend(loc='best')
772  filename = os.path.join(outdir, '{}-histogram.pdf')
773  plt.savefig(filename.format(name))

◆ plot_wcs()

def lsst.jointcal.utils.plot_wcs (   plt,
  wcs1,
  wcs2,
  x_dim,
  y_dim,
  center = (0, 0),
  name = "",
  outdir = '.plots' 
)
Plot the "distortion map": wcs1-wcs2 delta of points in the CCD grid.

Parameters
----------
plt : matplotlib.pyplot instance
    pyplot instance to plot with.
wcs1 : lsst.afw.image.wcs.Wcs
    First WCS to compare.
wcs2 : lsst.afw.image.wcs.Wcs
    Second WCS to compare.
x_dim : int
    Size of array in X-coordinate to make the grid over.
y_dim : int
    Size of array in Y-coordinate to make the grid over.
center : tuple, optional
    Center of the data, in on-chip coordinates.
name : str
    Name to include in plot titles and save files.
outdir : str, optional
    Directory to write the saved plots to.

Definition at line 682 of file utils.py.

682 def plot_wcs(plt, wcs1, wcs2, x_dim, y_dim, center=(0, 0), name="", outdir='.plots'):
683  """Plot the "distortion map": wcs1-wcs2 delta of points in the CCD grid.
684 
685  Parameters
686  ----------
687  plt : matplotlib.pyplot instance
688  pyplot instance to plot with.
689  wcs1 : lsst.afw.image.wcs.Wcs
690  First WCS to compare.
691  wcs2 : lsst.afw.image.wcs.Wcs
692  Second WCS to compare.
693  x_dim : int
694  Size of array in X-coordinate to make the grid over.
695  y_dim : int
696  Size of array in Y-coordinate to make the grid over.
697  center : tuple, optional
698  Center of the data, in on-chip coordinates.
699  name : str
700  Name to include in plot titles and save files.
701  outdir : str, optional
702  Directory to write the saved plots to.
703  """
704 
705  plt.figure()
706 
707  x1, y1, x2, y2 = make_xy_wcs_grid(x_dim, y_dim, wcs1, wcs2, num=50)
708  plt.plot((x1 - x2) + center[0], (y1 - y2) + center[1], '-')
709  plt.xlabel('delta RA (arcsec)')
710  plt.ylabel('delta Dec (arcsec)')
711  plt.title(name)
712  filename = os.path.join(outdir, '{}-wcs.pdf')
713  plt.savefig(filename.format(name))
714 
715 

◆ plot_wcs_magnitude()

def lsst.jointcal.utils.plot_wcs_magnitude (   plt,
  data_refs,
  visits,
  old_wcs_list,
  name,
  outdir = '.plots' 
)
Plot the magnitude of the WCS change between old and new visits as a heat map.

Parameters
----------
plt : matplotlib.pyplot instance
    pyplot instance to plot with.
data_refs : list of lsst.daf.persistence.butlerSubset.ButlerDataRef
    A list of data refs to plot.
visits : list of visit id (usually int)
    list of visit identifiers, one-to-one correspondent with catalogs.
old_wcs_list : list of lsst.afw.image.wcs.Wcs
    A list of the old (pre-jointcal) WCSs, one-to-one corresponding to data_refs.
name : str
    Name to include in plot titles and save files.
outdir : str, optional
    Directory to write the saved plots to.

Definition at line 622 of file utils.py.

622 def plot_wcs_magnitude(plt, data_refs, visits, old_wcs_list, name, outdir='.plots'):
623  """Plot the magnitude of the WCS change between old and new visits as a heat map.
624 
625  Parameters
626  ----------
627  plt : matplotlib.pyplot instance
628  pyplot instance to plot with.
629  data_refs : list of lsst.daf.persistence.butlerSubset.ButlerDataRef
630  A list of data refs to plot.
631  visits : list of visit id (usually int)
632  list of visit identifiers, one-to-one correspondent with catalogs.
633  old_wcs_list : list of lsst.afw.image.wcs.Wcs
634  A list of the old (pre-jointcal) WCSs, one-to-one corresponding to data_refs.
635  name : str
636  Name to include in plot titles and save files.
637  outdir : str, optional
638  Directory to write the saved plots to.
639  """
640  for visit in visits:
641  fig = plt.figure()
642  fig.set_tight_layout(True)
643  ax = fig.add_subplot(111)
644  # Start min/max at the "opposite" ends so they always get the first valid value.
645  xmin = np.inf
646  ymin = np.inf
647  xmax = -np.inf
648  ymax = -np.inf
649  for old_wcs, ref in zip(old_wcs_list, data_refs):
650  if ref.dataId['visit'] != visit:
651  continue
652  md = ref.get('calexp_md')
653  dims = lsst.afw.image.bboxFromMetadata(md).getDimensions()
654  x1, y1, x2, y2 = make_xy_wcs_grid(dims.getX(), dims.getY(),
655  old_wcs, ref.get('jointcal_wcs'))
656  uu = x2 - x1
657  vv = y2 - y1
658  extent = (x1[0, 0], x1[-1, -1], y1[0, 0], y1[-1, -1])
659  xmin = min(x1.min(), xmin)
660  ymin = min(y1.min(), ymin)
661  xmax = max(x1.max(), xmax)
662  ymax = max(y1.max(), ymax)
663  magnitude = (np.linalg.norm((uu, vv), axis=0)*u.radian).to(u.arcsecond).value
664  img = ax.imshow(magnitude, vmin=0, vmax=0.3,
665  aspect='auto', extent=extent, cmap=plt.get_cmap('magma'))
666  # TODO: add CCD bounding boxes to the plot once DM-5503 is finished.
667  # TODO: add a circle for the full focal plane.
668 
669  # We're reusing only one of the returned images here for colorbar scaling,
670  # but it doesn't matter because we set vmin/vmax so they are all scaled the same.
671  cbar = plt.colorbar(img)
672  cbar.ax.set_ylabel('distortion (arcseconds)')
673  plt.xlim(xmin, xmax)
674  plt.ylim(ymin, ymax)
675  plt.xlabel('RA')
676  plt.ylabel('Dec')
677  plt.title('visit: {}'.format(visit))
678  filename = os.path.join(outdir, '{}-{}-heatmap.pdf')
679  plt.savefig(filename.format(name, visit))
680 
681 
int min
int max

◆ plot_wcs_quivers()

def lsst.jointcal.utils.plot_wcs_quivers (   ax,
  wcs1,
  wcs2,
  x_dim,
  y_dim 
)
Plot the delta between wcs1 and wcs2 as vector arrows.

Parameters
----------
ax : matplotlib.axis
    Matplotlib axis instance to plot to.
wcs1 : lsst.afw.image.wcs.Wcs
    First WCS to compare.
wcs2 : lsst.afw.image.wcs.Wcs
    Second WCS to compare.
x_dim : int
    Size of array in X-coordinate to make the grid over.
y_dim : int
    Size of array in Y-coordinate to make the grid over.

Definition at line 598 of file utils.py.

598 def plot_wcs_quivers(ax, wcs1, wcs2, x_dim, y_dim):
599  """
600  Plot the delta between wcs1 and wcs2 as vector arrows.
601 
602  Parameters
603  ----------
604  ax : matplotlib.axis
605  Matplotlib axis instance to plot to.
606  wcs1 : lsst.afw.image.wcs.Wcs
607  First WCS to compare.
608  wcs2 : lsst.afw.image.wcs.Wcs
609  Second WCS to compare.
610  x_dim : int
611  Size of array in X-coordinate to make the grid over.
612  y_dim : int
613  Size of array in Y-coordinate to make the grid over.
614  """
615 
616  x1, y1, x2, y2 = make_xy_wcs_grid(x_dim, y_dim, wcs1, wcs2)
617  uu = x2 - x1
618  vv = y2 - y1
619  return ax.quiver(x1, y1, uu, vv, units='x', pivot='tail', scale=1e-3, width=1e-5)
620 
621 

◆ wcs_convert()

def lsst.jointcal.utils.wcs_convert (   xv,
  yv,
  wcs 
)
Convert two arrays of x/y points into an on-sky grid.

Definition at line 544 of file utils.py.

544 def wcs_convert(xv, yv, wcs):
545  """Convert two arrays of x/y points into an on-sky grid."""
546  xout = np.zeros((xv.shape[0], yv.shape[0]))
547  yout = np.zeros((xv.shape[0], yv.shape[0]))
548  for i, x in enumerate(xv):
549  for j, y in enumerate(yv):
550  sky = wcs.pixelToSky(x, y)
551  xout[i, j] = sky.getRa()
552  yout[i, j] = sky.getDec()
553  return xout, yout
554 
555 

Variable Documentation

◆ MatchDict

lsst.jointcal.utils.MatchDict = collections.namedtuple('MatchDict', ['relative', 'absolute'])

Definition at line 46 of file utils.py.