Пример #1
0
    def compute_principle_points(self, seq):
        """ Returns paraxial p and q rays, plus partial first order data.

        Args:
            seq: a sequence containing interfaces and gaps to be traced.
                  for each iteration, the sequence should return a
                  list containing: **Intfc, Gap, Trfm, Index, Z_Dir**

        Returns:
            (p_ray, q_ray, (efl, pp1, ppk, ffl, bfl))

            - p_ray: [ht, slp, aoi], [1, 0, -]
            - q_ray: [ht, slp, aoi], [0, 1, -]
            - efl: effective focal length
            - pp1: distance of front principle plane from 1st interface
            - ppk: distance of rear principle plane from last interface
            - ffl: front focal length
            - bfl: back focal length
        """
        n_0 = seq[0][mc.Indx]
        z_dir_before = seq[0][mc.Zdir]
        n_k = seq[-1][mc.Indx]
        z_dir_k = seq[-1][mc.Zdir]
        path = [[Surface(), Gap(), None, n_0, z_dir_before]]
        path.extend(seq[1:])
        pp_info = fo.compute_principle_points(iter(path),
                                              n_0=z_dir_before * n_0,
                                              n_k=z_dir_k * n_k)
        return pp_info
Пример #2
0
 def compute_principle_points(self, node, seq):
     n_0 = seq[0][mc.Indx]
     z_dir_before = seq[0][mc.Zdir]
     n_k = seq[-1][mc.Indx]
     z_dir_k = seq[-1][mc.Zdir]
     path = [[Surface(), Gap(), None, n_0, z_dir_before]]
     path.extend(seq[1:])
     pp_info = fo.compute_principle_points(iter(path),
                                           n_0=z_dir_before * n_0,
                                           n_k=z_dir_k * n_k)
     return pp_info