LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
Classes | Functions
lsst.meas.astrom.astrom Namespace Reference

Classes

class  InitialAstrometry
 
class  Astrometry
 

Functions

def _createMetadata
 
def readMatches
 

Function Documentation

def lsst.meas.astrom.astrom._createMetadata (   width,
  height,
  x0,
  y0,
  wcs,
  filterName 
)
private
Create match metadata entries required for regenerating the catalog

@param width Width of the image (pixels)
@param height Height of the image (pixels)
@param x0 x offset of image origin from parent (pixels)
@param y0 y offset of image origin from parent (pixels)
@param filterName Name of filter, used for magnitudes
@return Metadata

Definition at line 1098 of file astrom.py.

1099 def _createMetadata(width, height, x0, y0, wcs, filterName):
1100  """
1101  Create match metadata entries required for regenerating the catalog
1102 
1103  @param width Width of the image (pixels)
1104  @param height Height of the image (pixels)
1105  @param x0 x offset of image origin from parent (pixels)
1106  @param y0 y offset of image origin from parent (pixels)
1107  @param filterName Name of filter, used for magnitudes
1108  @return Metadata
1109  """
1110  meta = dafBase.PropertyList()
1111 
1112  # cache: field center and size.
1113  cx,cy = x0 + 0.5 + width/2., y0 + 0.5 + height/2.
1114  radec = wcs.pixelToSky(cx, cy).toIcrs()
1115  meta.add('RA', radec.getRa().asDegrees(), 'field center in degrees')
1116  meta.add('DEC', radec.getDec().asDegrees(), 'field center in degrees')
1117  imgSize = wcs.pixelScale() * math.hypot(width, height)/2.
1118  meta.add('RADIUS', imgSize.asDegrees(),
1119  'field radius in degrees, approximate')
1120  meta.add('SMATCHV', 1, 'SourceMatchVector version number')
1121  if filterName is not None:
1122  meta.add('FILTER', filterName, 'LSST filter name for tagalong data')
1123  return meta
Class for storing ordered metadata with comments.
Definition: PropertyList.h:81
def lsst.meas.astrom.astrom.readMatches (   butler,
  dataId,
  sourcesName = 'icSrc',
  matchesName = 'icMatch',
  config = MeasAstromConfig(),
  sourcesFlags = afwTable.SOURCE_IO_NO_FOOTPRINTS 
)
Read matches, sources and catalogue; combine.

@param butler Data butler
@param dataId Data identifier for butler
@param sourcesName Name for sources from butler
@param matchesName Name for matches from butler
@param sourcesFlags Flags to pass for source retrieval
@returns Matches

Definition at line 1125 of file astrom.py.

1126  sourcesFlags=afwTable.SOURCE_IO_NO_FOOTPRINTS):
1127  """Read matches, sources and catalogue; combine.
1128 
1129  @param butler Data butler
1130  @param dataId Data identifier for butler
1131  @param sourcesName Name for sources from butler
1132  @param matchesName Name for matches from butler
1133  @param sourcesFlags Flags to pass for source retrieval
1134  @returns Matches
1135  """
1136  sources = butler.get(sourcesName, dataId, flags=sourcesFlags)
1137  packedMatches = butler.get(matchesName, dataId)
1138  astrom = Astrometry(config)
1139  return astrom.joinMatchListWithCatalog(packedMatches, sources)