Exemple #1
0
    def createCam(camType):
        """Create the camera object.

        Parameters
        ----------
        camType : enum 'CamType'
            Camera type.

        Returns
        -------
        LsstCam, LsstFamCam, or ComCam
            Camera object.

        Raises
        ------
        ValueError
            The camera type does not match.
        """

        if camType == CamType.LsstCam:
            return LsstCam()
        elif camType == CamType.LsstFamCam:
            return LsstFamCam()
        elif camType == CamType.ComCam:
            return ComCam()
        else:
            raise ValueError("The camera type does not match.")
Exemple #2
0
class TestLsstFamCam(unittest.TestCase):
    """Test the LsstCam class."""
    def setUp(self):

        self.cam = LsstFamCam()
        self.cam.setObsMetaData(0, 0, 0, mjd=59580.0)

    def testGetWfsCcdList(self):

        wfsList = self.cam.getWfsCcdList()
        self.assertEqual(len(wfsList), 189)

    def testGetWavefrontSensor(self):

        wfsData = self.cam.getWavefrontSensor()
        self.assertEqual(len(wfsData), 189)
Exemple #3
0
class TestLsstFamCam(unittest.TestCase):
    """Test the LsstCam class."""

    def setUp(self):

        self.cam = LsstFamCam()
        self.cam.setObsMetaData(0, 0, 0, mjd=59580.0)

    def testGetWfsCcdList(self):

        wfsList = self.cam.getWfsCcdList()
        self.assertEqual(len(wfsList), 189)

    def testGetWavefrontSensor(self):

        wfsData = self.cam.getWavefrontSensor()
        self.assertEqual(len(wfsData), 189)
Exemple #4
0
    def setUp(self):

        self.cam = LsstFamCam()
        self.cam.setObsMetaData(0, 0, 0, mjd=59580.0)
Exemple #5
0
    def setUp(self):

        self.cam = LsstFamCam()
        self.cam.setObsMetaData(0, 0, 0, mjd=59580.0)