Attempt to extract a frame for displaying a product called ``name``
from the ```debugDisplay`` variable.
Per the above, an instance of `Info` can return an arbitrary object
(or nothing) as its ``display`` attribute. It is convenient -- though not
required -- that it be a dictionary mapping data products to frame
numbers, as shown in the `lsstDebug.Info` example. Given such a dictionary,
this function extracts and returns the appropriate frame number. If
``debugDisplay`` is not a collection, or if ``name`` is not found within
it, we return `None`.
Parameters
----------
debugDisplay : `object`
The contents of lsstDebug.Info(__name__).display.
name : `str`
The name of the data product to be displayed.
Returns
-------
frame : `int`
A frame number, or `None`.
Definition at line 90 of file lsstDebug.py.
92 Attempt to extract a frame for displaying a product called ``name`` 93 from the ```debugDisplay`` variable. 95 Per the above, an instance of `Info` can return an arbitrary object 96 (or nothing) as its ``display`` attribute. It is convenient -- though not 97 required -- that it be a dictionary mapping data products to frame 98 numbers, as shown in the `lsstDebug.Info` example. Given such a dictionary, 99 this function extracts and returns the appropriate frame number. If 100 ``debugDisplay`` is not a collection, or if ``name`` is not found within 101 it, we return `None`. 105 debugDisplay : `object` 106 The contents of lsstDebug.Info(__name__).display. 108 The name of the data product to be displayed. 113 A frame number, or `None`. 115 if hasattr(debugDisplay,
"__contains__")
and name
in debugDisplay:
116 return debugDisplay[name]
119 def getDebugFrame(debugDisplay, name)