Пример #1
0
    def setUp(self):
        self.slope = (1.329, 0.9833, 1.003)
        self.offset = (0.011, 0.013, 0.11)
        self.power = (.993, .998, 1.0113)
        self.sat = 1.01

        self.file = buildCDL(self.slope, self.offset, self.power, self.sat)

        # Build our cdl
        with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
            f.write(enc(self.file))
            self.filename = f.name

        self.cdl = cdl_convert.parse_cdl(self.filename)[0]
Пример #2
0
    def setUp(self):
        # Note that there are limits to the floating point precision here.
        # Python will not parse numbers exactly with numbers with more
        # significant whole and decimal digits
        self.slope = (137829.329, 4327890.9833, 3489031.003)
        self.offset = (-3424.011, -342789423.013, -4238923.11)
        self.power = (3271893.993, .0000998, 0.0000000000000000113)
        self.sat = 1798787.01

        self.file = buildCDL(self.slope, self.offset, self.power, self.sat)

        # Build our cdl
        with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
            f.write(enc(self.file))
            self.filename = f.name

        self.cdl = cdl_convert.parse_cdl(self.filename)[0]