Beispiel #1
0
 def to_jab_cam02ucs(self,
                     xyzw=_CAM_DEFAULT_WHITE_POINT,
                     Yw=100.0,
                     conditions=_CAM_DEFAULT_CONDITIONS,
                     yellowbluepurplecorrect=None,
                     mcat='cat02'):
     """
     See ?luxpy.xyz_to_jab_cam02ucs
     """
     value = xyz_to_jab_cam02ucs(
         self.value,
         xyzw=xyzw,
         Yw=Yw,
         conditions=conditions,
         yellowbluepurplecorrect=yellowbluepurplecorrect,
         mcat=mcat)
     return LAB(value=value,
                relative=self.relative,
                cieobs=self.cieobs,
                dtype='jab_cam02ucs',
                xyzw=xyzw,
                Yw=Yw,
                conditions=conditions,
                yellowbluepurplecorrect=yellowbluepurplecorrect,
                mcat=mcat)
Beispiel #2
0
 def to_jab_cam16ucs(self,
                     xyzw=_CAM_DEFAULT_WHITE_POINT,
                     Yw=100.0,
                     conditions=_CAM_DEFAULT_CONDITIONS,
                     mcat='cat16'):
     """
     See ?luxpy.xyz_to_jab_cam02ucs
     """
     value = xyz_to_jab_cam02ucs(self.value,
                                 xyzw=xyzw,
                                 Yw=Yw,
                                 conditions=conditions,
                                 mcat=mcat)
     return LAB(value=value,
                relative=self.relative,
                cieobs=self.cieobs,
                dtype='jab_cam162ucs',
                xyzw=xyzw,
                Yw=Yw,
                conditions=conditions,
                mcat=mcat)
Beispiel #3
0
                                rfl=rflM,
                                out=2)
    xyz1 = xyz1[:n, 0, :]
    Ill1M = Ill1M[:(n + 1), 0, :]

    xyz2, xyzw2 = lx.spd_to_xyz(Ill2,
                                cieobs=cieobs,
                                relative=True,
                                rfl=rflM,
                                out=2)
    xyz2 = xyz2[:n, :, :]
    Ill2M = Ill2M[:(n + 1), :, :]

    # Module output plot:
    import matplotlib.pyplot as plt
    _cam_o = lambda xyz, xyzw, forward: lx.xyz_to_jab_cam02ucs(xyz, xyzw)

    xyz, xyzw = lx.spd_to_xyz(Ill1,
                              cieobs=cieobs,
                              relative=True,
                              rfl=rflM,
                              out=2)
    jabch = _cam(xyz, xyzw=xyzw, forward=True)
    out_ = _cam_o(xyz, xyzw=xyzw, forward=True)

    plt.figure()
    plt.plot(jabch[..., 1], jabch[..., 2], 'c.')
    plt.plot(out_[..., 1], out_[..., 2], 'r.')
    plt.axis('equal')

    # Single data for sample and illuminant: