Coverage for python/lsst/obs/lsstSim/utils.py : 45%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1import os
2from lsst.afw.cameraGeom import makeCameraFromPath, CameraConfig
3from .lsstSimMapper import LsstSimMapper
5__all__ = ['loadCamera']
8def loadCamera(repoDir):
9 """Load a camera given the path to its description
11 I use this just in testing from the interpreter prompt.
12 In general, it's probably best to do butler.get('camera')
13 @param repoDir: path to the root of the camera description tree
14 """
15 inputPath = os.path.join(repoDir, "description", "camera")
16 camConfigPath = os.path.join(inputPath, "camera.py")
17 camConfig = CameraConfig()
18 camConfig.load(camConfigPath)
19 lsstSimMapper = LsstSimMapper
20 return makeCameraFromPath(camConfig, inputPath, lsstSimMapper.getShortCcdName)