def _air_ref(self, period): """ Return a :Anallo: corresponding to this :Light: in free space. The :Anallo: will have `len(anallo.k_z) == 2 * num_pw'. """ if (period) in self._air_anallos: return self._air_anallos[(period)] else: air = ThinFilm(period=period, material=materials.Air) an = Anallo(air, self) an.is_air_ref = True kz = an.calc_kz() an.k_z = np.append(kz, kz) # Save this for future reference (we'll be back) self._air_anallos[(period)] = an return an
def _air_ref(self, period): """ Return a :Anallo: corresponding to this :Light: in free space. The :Anallo: will have `len(anallo.k_z) == 2 * num_pw'. """ if (period) in self._air_anallos: return self._air_anallos[(period)] else: air = ThinFilm(period = period, material = materials.Air) an = Anallo(air, self) an.is_air_ref = True kz = an.calc_kz() an.k_z = np.append(kz, kz) # Save this for future reference (we'll be back) self._air_anallos[(period)] = an return an
def calc_modes(self, light): an = Anallo(self, light) an.calc_modes() return an