lsst.skymap g6512b7a353+7813d3658b
Loading...
Searching...
No Matches
showVisitSkyMap Namespace Reference

Functions

 bboxToRaDec (bbox, wcs)
 
 getValueAtPercentile (values, percentile=0.5)
 
 get_cmap (n, name="gist_rainbow")
 
 getBandPlotStyle (band, defaultColor)
 
 configureBandStyle (useRubinPlotStyle=False)
 
 queryImageDatasets (butler, whereStr, imageDatasetType=None)
 
 getVisitSummaryForVisit (butler, visit, visitSummaryDatasetType=None)
 
 main (repo, collections, skymapName=None, radec=None, tracts=None, patches=None, visits=None, physicalFilters=None, bands=None, ccds=None, maxVisits=None, visitVetoFile=None, minOverlapFraction=None, showPatch=False, showPatchSelectedTractsOnly=False, showCcds=False, showCcdsAll=False, plotFailsOnly=False, showRawOutlines=False, trimToTracts=False, trimToOverlappingTracts=False, doUnscaledLimitRatio=False, forceScaledLimitRatio=False, maxVisitsForLegend=20, useRubinPlotStyle=False, saveFile=None, dpi=150, ccdKey="detector", imageDatasetType=None, visitSummaryDatasetType=None)
 
 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

 publication_plots = None
 
 set_rubin_plotstyle = None
 
 logger = logging.getLogger("lsst.skymap.bin.showVisitSkyMap")
 
dict DEFAULT_BAND_COLOR_DICT
 
dict DEFAULT_BAND_LINESTYLE_DICT
 
dict BAND_COLOR_DICT = {}
 
dict BAND_LINESTYLE_DICT = {}
 
bool USE_RUBIN_BAND_STYLE = False
 
 parser = argparse.ArgumentParser()
 
 butlerGroup = parser.add_argument_group("Repository and Collections")
 
 selectionGroup = parser.add_argument_group("Selection Filters")
 
 plotGroup = parser.add_argument_group("Plot Content and Layout")
 
 outputGroup = parser.add_argument_group("File Output")
 
 dataGroup = parser.add_argument_group("Dataset Lookup")
 
 runtimeGroup = parser.add_argument_group("Runtime and Logging")
 
 type
 
 help
 
 nargs
 
 metavar
 
 required
 
 default
 
 action
 
 choices
 
 args = parser.parse_args()
 
 level
 
 format
 
 skymapName
 
 radec
 
 tracts
 
 patches
 
 visits
 
 physicalFilters
 
 bands
 
 ccds
 
 maxVisits
 
 visitVetoFile
 
 minOverlapFraction
 
 showPatch
 
 showPatchSelectedTractsOnly
 
 showCcds
 
 showCcdsAll
 
 plotFailsOnly
 
 showRawOutlines
 
 trimToTracts
 
 trimToOverlappingTracts
 
 doUnscaledLimitRatio
 
 forceScaledLimitRatio
 
 maxVisitsForLegend
 
 useRubinPlotStyle
 
 saveFile
 
 dpi
 
 ccdKey
 
 imageDatasetType
 
 visitSummaryDatasetType
 

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 70 of file showVisitSkyMap.py.

◆ configureBandStyle()

showVisitSkyMap.configureBandStyle ( useRubinPlotStyle = False)
Configure global band plotting style dictionaries.

Definition at line 119 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 1224 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 100 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 1391 of file showVisitSkyMap.py.

◆ getBandPlotStyle()

showVisitSkyMap.getBandPlotStyle ( band,
defaultColor )
Get per-band color/linestyle, falling back to per-visit defaults.

Definition at line 110 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 1323 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 1198 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 1160 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 78 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 154 of file showVisitSkyMap.py.

◆ main()

showVisitSkyMap.main ( repo,
collections,
skymapName = None,
radec = None,
tracts = None,
patches = None,
visits = None,
physicalFilters = None,
bands = None,
ccds = None,
maxVisits = None,
visitVetoFile = None,
minOverlapFraction = None,
showPatch = False,
showPatchSelectedTractsOnly = False,
showCcds = False,
showCcdsAll = False,
plotFailsOnly = False,
showRawOutlines = False,
trimToTracts = False,
trimToOverlappingTracts = False,
doUnscaledLimitRatio = False,
forceScaledLimitRatio = False,
maxVisitsForLegend = 20,
useRubinPlotStyle = False,
saveFile = None,
dpi = 150,
ccdKey = "detector",
imageDatasetType = None,
visitSummaryDatasetType = None )

Definition at line 173 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 1130 of file showVisitSkyMap.py.

◆ queryImageDatasets()

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

Definition at line 134 of file showVisitSkyMap.py.

◆ sanitizeTractList()

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

Definition at line 1142 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 1294 of file showVisitSkyMap.py.

Variable Documentation

◆ action

showVisitSkyMap.action

Definition at line 1539 of file showVisitSkyMap.py.

◆ args

showVisitSkyMap.args = parser.parse_args()

Definition at line 1670 of file showVisitSkyMap.py.

◆ BAND_COLOR_DICT

dict showVisitSkyMap.BAND_COLOR_DICT = {}

Definition at line 65 of file showVisitSkyMap.py.

◆ BAND_LINESTYLE_DICT

dict showVisitSkyMap.BAND_LINESTYLE_DICT = {}

Definition at line 66 of file showVisitSkyMap.py.

◆ bands

showVisitSkyMap.bands

Definition at line 1682 of file showVisitSkyMap.py.

◆ butlerGroup

showVisitSkyMap.butlerGroup = parser.add_argument_group("Repository and Collections")

Definition at line 1425 of file showVisitSkyMap.py.

◆ ccdKey

showVisitSkyMap.ccdKey

Definition at line 1701 of file showVisitSkyMap.py.

◆ ccds

showVisitSkyMap.ccds

Definition at line 1683 of file showVisitSkyMap.py.

◆ choices

showVisitSkyMap.choices

Definition at line 1666 of file showVisitSkyMap.py.

◆ dataGroup

showVisitSkyMap.dataGroup = parser.add_argument_group("Dataset Lookup")

Definition at line 1429 of file showVisitSkyMap.py.

◆ default

showVisitSkyMap.default

Definition at line 1448 of file showVisitSkyMap.py.

◆ DEFAULT_BAND_COLOR_DICT

dict showVisitSkyMap.DEFAULT_BAND_COLOR_DICT
Initial value:
1= {
2 "u": "#48A8D4",
3 "g": "#31DE1F",
4 "r": "#B52626",
5 "i": "#2915A4",
6 "z": "#AD03EA",
7 "y": "#2D0201",
8}

Definition at line 48 of file showVisitSkyMap.py.

◆ DEFAULT_BAND_LINESTYLE_DICT

dict showVisitSkyMap.DEFAULT_BAND_LINESTYLE_DICT
Initial value:
1= {
2 "u": "solid",
3 "g": "solid",
4 "r": "solid",
5 "i": "solid",
6 "z": "solid",
7 "y": "solid",
8}

Definition at line 56 of file showVisitSkyMap.py.

◆ doUnscaledLimitRatio

showVisitSkyMap.doUnscaledLimitRatio

Definition at line 1695 of file showVisitSkyMap.py.

◆ dpi

showVisitSkyMap.dpi

Definition at line 1700 of file showVisitSkyMap.py.

◆ forceScaledLimitRatio

showVisitSkyMap.forceScaledLimitRatio

Definition at line 1696 of file showVisitSkyMap.py.

◆ format

showVisitSkyMap.format

Definition at line 1671 of file showVisitSkyMap.py.

◆ help

showVisitSkyMap.help

Definition at line 1436 of file showVisitSkyMap.py.

◆ imageDatasetType

showVisitSkyMap.imageDatasetType

Definition at line 1702 of file showVisitSkyMap.py.

◆ level

showVisitSkyMap.level

Definition at line 1671 of file showVisitSkyMap.py.

◆ logger

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

Definition at line 46 of file showVisitSkyMap.py.

◆ maxVisits

showVisitSkyMap.maxVisits

Definition at line 1684 of file showVisitSkyMap.py.

◆ maxVisitsForLegend

showVisitSkyMap.maxVisitsForLegend

Definition at line 1697 of file showVisitSkyMap.py.

◆ metavar

showVisitSkyMap.metavar

Definition at line 1443 of file showVisitSkyMap.py.

◆ minOverlapFraction

showVisitSkyMap.minOverlapFraction

Definition at line 1686 of file showVisitSkyMap.py.

◆ nargs

showVisitSkyMap.nargs

Definition at line 1441 of file showVisitSkyMap.py.

◆ outputGroup

showVisitSkyMap.outputGroup = parser.add_argument_group("File Output")

Definition at line 1428 of file showVisitSkyMap.py.

◆ parser

showVisitSkyMap.parser = argparse.ArgumentParser()

Definition at line 1424 of file showVisitSkyMap.py.

◆ patches

showVisitSkyMap.patches

Definition at line 1679 of file showVisitSkyMap.py.

◆ physicalFilters

showVisitSkyMap.physicalFilters

Definition at line 1681 of file showVisitSkyMap.py.

◆ plotFailsOnly

showVisitSkyMap.plotFailsOnly

Definition at line 1691 of file showVisitSkyMap.py.

◆ plotGroup

showVisitSkyMap.plotGroup = parser.add_argument_group("Plot Content and Layout")

Definition at line 1427 of file showVisitSkyMap.py.

◆ publication_plots

showVisitSkyMap.publication_plots = None

Definition at line 43 of file showVisitSkyMap.py.

◆ radec

showVisitSkyMap.radec

Definition at line 1677 of file showVisitSkyMap.py.

◆ required

showVisitSkyMap.required

Definition at line 1444 of file showVisitSkyMap.py.

◆ runtimeGroup

showVisitSkyMap.runtimeGroup = parser.add_argument_group("Runtime and Logging")

Definition at line 1430 of file showVisitSkyMap.py.

◆ saveFile

showVisitSkyMap.saveFile

Definition at line 1699 of file showVisitSkyMap.py.

◆ selectionGroup

showVisitSkyMap.selectionGroup = parser.add_argument_group("Selection Filters")

Definition at line 1426 of file showVisitSkyMap.py.

◆ set_rubin_plotstyle

showVisitSkyMap.set_rubin_plotstyle = None

Definition at line 44 of file showVisitSkyMap.py.

◆ showCcds

showVisitSkyMap.showCcds

Definition at line 1689 of file showVisitSkyMap.py.

◆ showCcdsAll

showVisitSkyMap.showCcdsAll

Definition at line 1690 of file showVisitSkyMap.py.

◆ showPatch

showVisitSkyMap.showPatch

Definition at line 1687 of file showVisitSkyMap.py.

◆ showPatchSelectedTractsOnly

showVisitSkyMap.showPatchSelectedTractsOnly

Definition at line 1688 of file showVisitSkyMap.py.

◆ showRawOutlines

showVisitSkyMap.showRawOutlines

Definition at line 1692 of file showVisitSkyMap.py.

◆ skymapName

showVisitSkyMap.skymapName

Definition at line 1676 of file showVisitSkyMap.py.

◆ tracts

showVisitSkyMap.tracts

Definition at line 1678 of file showVisitSkyMap.py.

◆ trimToOverlappingTracts

showVisitSkyMap.trimToOverlappingTracts

Definition at line 1694 of file showVisitSkyMap.py.

◆ trimToTracts

showVisitSkyMap.trimToTracts

Definition at line 1693 of file showVisitSkyMap.py.

◆ type

showVisitSkyMap.type

Definition at line 1435 of file showVisitSkyMap.py.

◆ USE_RUBIN_BAND_STYLE

bool showVisitSkyMap.USE_RUBIN_BAND_STYLE = False

Definition at line 67 of file showVisitSkyMap.py.

◆ useRubinPlotStyle

showVisitSkyMap.useRubinPlotStyle

Definition at line 1698 of file showVisitSkyMap.py.

◆ visits

showVisitSkyMap.visits

Definition at line 1680 of file showVisitSkyMap.py.

◆ visitSummaryDatasetType

showVisitSkyMap.visitSummaryDatasetType

Definition at line 1703 of file showVisitSkyMap.py.

◆ visitVetoFile

showVisitSkyMap.visitVetoFile

Definition at line 1685 of file showVisitSkyMap.py.