lsst.skymap g91c88c04ca+d4bf8732b5
Loading...
Searching...
No Matches
showVisitSkyMap Namespace Reference

Functions

 bboxToRaDec (bbox, wcs)
 
 getValueAtPercentile (values, percentile=0.5)
 
 get_cmap (n, name="gist_rainbow")
 
 queryImageDatasets (butler, whereStr, imageDatasetType=None)
 
 getVisitSummaryForVisit (butler, visit, visitSummaryDatasetType=None)
 
 main (repo, collections, skymapName=None, tracts=None, visits=None, physicalFilters=None, bands=None, ccds=None, ccdKey="detector", showPatch=False, showPatchSelectedTractsOnly=False, saveFile=None, showCcds=False, visitVetoFile=None, minOverlapFraction=None, trimToTracts=False, doUnscaledLimitRatio=False, forceScaledLimitRatio=False, imageDatasetType=None, visitSummaryDatasetType=None, dpi=150)
 
 makeWhereInStr (parameterName, parameterList, parameterType)
 
 sanitizeTractList (skymap, tractList)
 
 getTractLimitsDict (skymap, tractList)
 
 getMinMaxLimits (limitsDict)
 
 derivePlotLimits (limitsDict, raToDecLimitRatio=1.0, buffFrac=0.0)
 
 setLimitsToEqualRatio (xMin, xMax, yMin, yMax)
 
 getDetRaDecCorners (ccdKey, ccdId, visit, visitSummary=None, butler=None, imageDatasetType="calexp", doLogWarn=True, missingVisitSummaryRows=None)
 
 getBand (visitSummary=None, butler=None, visit=None)
 

Variables

 logger = logging.getLogger("lsst.skymap.bin.showVisitSkyMap")
 
 parser = argparse.ArgumentParser()
 
 type
 
 str
 
 help
 
 nargs
 
 metavar
 
 required
 
 default
 
 None
 
 action
 
 False
 
 args = parser.parse_args()
 
 level
 
 INFO
 
 format
 
 skymapName
 
 tracts
 
 visits
 
 physicalFilters
 
 bands
 
 ccds
 
 ccdKey
 
 showPatch
 
 showPatchSelectedTractsOnly
 
 saveFile
 
 showCcds
 
 visitVetoFile
 
 minOverlapFraction
 
 trimToTracts
 
 doUnscaledLimitRatio
 
 forceScaledLimitRatio
 
 imageDatasetType
 
 visitSummaryDatasetType
 
 dpi
 

Function Documentation

◆ bboxToRaDec()

showVisitSkyMap.bboxToRaDec ( bbox,
wcs )
Get the corners of a BBox and convert them to lists of RA and Dec.

Definition at line 42 of file showVisitSkyMap.py.

◆ derivePlotLimits()

showVisitSkyMap.derivePlotLimits ( limitsDict,
raToDecLimitRatio = 1.0,
buffFrac = 0.0 )
Derive the axis limits to encompass all points in limitsDict.

Parameters
----------
limitsDict : `dict` [`dict`]
    A dictionary keyed on any id. Each entry includes a `dict`
    keyed on "ras" and "decs" including (at least the minimum
    and maximum) RA and Dec values in units of degrees.
raToDecLimitRatio : `float`, optional
    The aspect ratio between RA and Dec to set the plot limits to.  This
    is to namely to set this ratio to that of the focal plane (i.e. such
    that a square detector appears as a square), but any aspect ratio can,
    in principle, be requested.

Returns
-------
xlim, ylim : `tuple` [`float`]
    Two tuples containing the derived min and max values for the x and
    y-axis limits (in degrees), respectively.

Definition at line 883 of file showVisitSkyMap.py.

◆ get_cmap()

showVisitSkyMap.get_cmap ( n,
name = "gist_rainbow" )
Returns a function that maps each index in 0, 1, ..., n-1 to a distinct
RGB color.

Uses ``gist_rainbow`` by default: vivid, non-cyclic, so first and last
colors are visually distinct.

Definition at line 72 of file showVisitSkyMap.py.

◆ getBand()

showVisitSkyMap.getBand ( visitSummary = None,
butler = None,
visit = None )
Determine band and physical filter for given visit.

Parameters
----------
visitSummary : `lsst.afw.table.ExposureCatalog` or `None`, optional
    The visitSummary table for the visit for which to determine the band.
butler : `lsst.daf.butler.Butler` or `None`, optional
    The butler from which to look up the Dimension Records. Only needed
    if ``visitSummary`` is `None`.
visit : `int` or `None, optional
    The visit number for which to determine the band. Only needed
    if ``visitSummary`` is `None`.

Returns
-------
band, physicalFilter : `str`
    The band and physical filter for the given visit.

Definition at line 1023 of file showVisitSkyMap.py.

◆ getDetRaDecCorners()

showVisitSkyMap.getDetRaDecCorners ( ccdKey,
ccdId,
visit,
visitSummary = None,
butler = None,
imageDatasetType = "calexp",
doLogWarn = True,
missingVisitSummaryRows = None )
Compute the RA/Dec corners lists for a given detector in a visit.

Definition at line 982 of file showVisitSkyMap.py.

◆ getMinMaxLimits()

showVisitSkyMap.getMinMaxLimits ( limitsDict)
Derive the min and max axis limits of points in limitsDict.

Parameters
----------
limitsDict : `dict` [`dict`]
    A dictionary keyed on any id. Each entry includes a `dict`
    keyed on "ras" and "decs" including (at least the minimum
    and maximum) RA and Dec values in units of degrees.

Returns
-------
xLimMin, xLimMax, yLimMin, yLimMax : `tuple` [`float`]
    The min and max values for the x and y-axis limits, respectively.

Definition at line 857 of file showVisitSkyMap.py.

◆ getTractLimitsDict()

showVisitSkyMap.getTractLimitsDict ( skymap,
tractList )
Return a dict containing tract limits needed for outline plotting.

Parameters
----------
skymap : `lsst.skymap.BaseSkyMap`
    The sky map used for this dataset. Used to obtain tract
    parameters.
tractList : `list` [`int`]
    The list of tract ids (as integers) for which to determine the
    limits.

Returns
-------
tractLimitsDict : `dict` [`dict`]
    A dictionary keyed on tract id. Each entry includes a `dict`
    including the tract RA corners, Dec corners, and the tract center,
    all in units of degrees. These are used for plotting the tract
    outlines.

Definition at line 819 of file showVisitSkyMap.py.

◆ getValueAtPercentile()

showVisitSkyMap.getValueAtPercentile ( values,
percentile = 0.5 )
Return a value a fraction of the way between the min and max values in a
list.

Parameters
----------
values : `list` [`float`]
    The list of values under consideration.
percentile : `float`, optional
    The percentile (expressed as a number between 0.0 and 1.0) at which
    to determine the value in `values`.

Returns
-------
result : `float`
    The value at the given percentile of ``values``.

Definition at line 50 of file showVisitSkyMap.py.

◆ getVisitSummaryForVisit()

showVisitSkyMap.getVisitSummaryForVisit ( butler,
visit,
visitSummaryDatasetType = None )
Fetch visit summary for a visit, supporting legacy and newer names.

Definition at line 102 of file showVisitSkyMap.py.

◆ main()

showVisitSkyMap.main ( repo,
collections,
skymapName = None,
tracts = None,
visits = None,
physicalFilters = None,
bands = None,
ccds = None,
ccdKey = "detector",
showPatch = False,
showPatchSelectedTractsOnly = False,
saveFile = None,
showCcds = False,
visitVetoFile = None,
minOverlapFraction = None,
trimToTracts = False,
doUnscaledLimitRatio = False,
forceScaledLimitRatio = False,
imageDatasetType = None,
visitSummaryDatasetType = None,
dpi = 150 )

Definition at line 121 of file showVisitSkyMap.py.

◆ makeWhereInStr()

showVisitSkyMap.makeWhereInStr ( parameterName,
parameterList,
parameterType )
Create the string to be used in the where clause for registry lookup.

Definition at line 789 of file showVisitSkyMap.py.

◆ queryImageDatasets()

showVisitSkyMap.queryImageDatasets ( butler,
whereStr,
imageDatasetType = None )
Query image datasets with support for current and legacy names.

Definition at line 82 of file showVisitSkyMap.py.

◆ sanitizeTractList()

showVisitSkyMap.sanitizeTractList ( skymap,
tractList )
Split tract ids into valid and invalid entries for the given skymap.

Definition at line 801 of file showVisitSkyMap.py.

◆ setLimitsToEqualRatio()

showVisitSkyMap.setLimitsToEqualRatio ( xMin,
xMax,
yMin,
yMax )
For a given set of x/y min/max, redefine to have equal aspect ratio.

The limits are extended on both ends such that the central value is
preserved.

Parameters
----------
xMin, xMax, yMin, yMax : `float`
    The min/max values of the x/y ranges for which to match in dynamic
    range while preserving the central values.

Returns
-------
xMin, xMax, yMin, yMax : `float`
    The adjusted min/max values of the x/y ranges with equal aspect ratios.

Definition at line 953 of file showVisitSkyMap.py.

Variable Documentation

◆ action

showVisitSkyMap.action

Definition at line 1111 of file showVisitSkyMap.py.

◆ args

showVisitSkyMap.args = parser.parse_args()

Definition at line 1179 of file showVisitSkyMap.py.

◆ bands

showVisitSkyMap.bands

Definition at line 1188 of file showVisitSkyMap.py.

◆ ccdKey

showVisitSkyMap.ccdKey

Definition at line 1190 of file showVisitSkyMap.py.

◆ ccds

showVisitSkyMap.ccds

Definition at line 1189 of file showVisitSkyMap.py.

◆ default

showVisitSkyMap.default

Definition at line 1068 of file showVisitSkyMap.py.

◆ doUnscaledLimitRatio

showVisitSkyMap.doUnscaledLimitRatio

Definition at line 1198 of file showVisitSkyMap.py.

◆ dpi

showVisitSkyMap.dpi

Definition at line 1202 of file showVisitSkyMap.py.

◆ False

showVisitSkyMap.False

Definition at line 1111 of file showVisitSkyMap.py.

◆ forceScaledLimitRatio

showVisitSkyMap.forceScaledLimitRatio

Definition at line 1199 of file showVisitSkyMap.py.

◆ format

showVisitSkyMap.format

Definition at line 1180 of file showVisitSkyMap.py.

◆ help

showVisitSkyMap.help

Definition at line 1058 of file showVisitSkyMap.py.

◆ imageDatasetType

showVisitSkyMap.imageDatasetType

Definition at line 1200 of file showVisitSkyMap.py.

◆ INFO

showVisitSkyMap.INFO

Definition at line 1180 of file showVisitSkyMap.py.

◆ level

showVisitSkyMap.level

Definition at line 1180 of file showVisitSkyMap.py.

◆ logger

showVisitSkyMap.logger = logging.getLogger("lsst.skymap.bin.showVisitSkyMap")

Definition at line 39 of file showVisitSkyMap.py.

◆ metavar

showVisitSkyMap.metavar

Definition at line 1065 of file showVisitSkyMap.py.

◆ minOverlapFraction

showVisitSkyMap.minOverlapFraction

Definition at line 1196 of file showVisitSkyMap.py.

◆ nargs

showVisitSkyMap.nargs

Definition at line 1063 of file showVisitSkyMap.py.

◆ None

showVisitSkyMap.None

Definition at line 1068 of file showVisitSkyMap.py.

◆ parser

showVisitSkyMap.parser = argparse.ArgumentParser()

Definition at line 1056 of file showVisitSkyMap.py.

◆ physicalFilters

showVisitSkyMap.physicalFilters

Definition at line 1187 of file showVisitSkyMap.py.

◆ required

showVisitSkyMap.required

Definition at line 1066 of file showVisitSkyMap.py.

◆ saveFile

showVisitSkyMap.saveFile

Definition at line 1193 of file showVisitSkyMap.py.

◆ showCcds

showVisitSkyMap.showCcds

Definition at line 1194 of file showVisitSkyMap.py.

◆ showPatch

showVisitSkyMap.showPatch

Definition at line 1191 of file showVisitSkyMap.py.

◆ showPatchSelectedTractsOnly

showVisitSkyMap.showPatchSelectedTractsOnly

Definition at line 1192 of file showVisitSkyMap.py.

◆ skymapName

showVisitSkyMap.skymapName

Definition at line 1184 of file showVisitSkyMap.py.

◆ str

showVisitSkyMap.str

Definition at line 1058 of file showVisitSkyMap.py.

◆ tracts

showVisitSkyMap.tracts

Definition at line 1185 of file showVisitSkyMap.py.

◆ trimToTracts

showVisitSkyMap.trimToTracts

Definition at line 1197 of file showVisitSkyMap.py.

◆ type

showVisitSkyMap.type

Definition at line 1058 of file showVisitSkyMap.py.

◆ visits

showVisitSkyMap.visits

Definition at line 1186 of file showVisitSkyMap.py.

◆ visitSummaryDatasetType

showVisitSkyMap.visitSummaryDatasetType

Definition at line 1201 of file showVisitSkyMap.py.

◆ visitVetoFile

showVisitSkyMap.visitVetoFile

Definition at line 1195 of file showVisitSkyMap.py.