def spotSize(self): """ Returns the beam spot sizes on the input and end mirrors as a tuple (w1,w2). """ (q0, d) = self.waist() w1 = gauss.q2w(q0 - d, wl=self.wl) w2 = gauss.q2w(q0 + self.L - d, wl=self.wl) return (w1, w2)
def waist(self, size=False): """ Return the q-parameter or the radius of the beam at the cavity waist. Parameters ---------- size : boolean, optional if set to true, the first element of the returned tuple will be the waist size, rather than the q-parameter. Returns ------- (q0, d) : (complex, float) This function returns a tuple with two elements. The first element is the q-parameter of the cavity mode at the cavity waist. If size=True is given, it becomes the waist size (1/e^2 radius). The second element is the distance of the cavity waist from the input mirror. """ # q0 = 1j*np.sqrt(self.L)*np.sqrt(-(self.L+self.R1)*(self.L-self.R2)\ # *(self.L+self.R1-self.R2))\ # /(2*self.L+self.R1-self.R2) q0 = 1j*sqrt(-self.L*(self.L+self.R1)**2*(self.L-self.R2)*\ (self.L+self.R1-self.R2)/((-2*self.L-self.R1+self.R2)**2))\ /sqrt(self.L+self.R1) d = self.L * (self.L - self.R2) / (2 * self.L + self.R1 - self.R2) if size: return (gauss.q2w(q0, wl=self.wl), d) else: return (q0, d)
def _qy_changed(self, old, new): self.wy = q2w(self.qy, wl=self.wl / self.n) self.set(trait_change_notify=False, qry=self.qy / self.n) self.q = optimalMatching(self.qx, self.qy)[0]
def _qx_changed(self, old, new): self.wx = q2w(self.qx, wl=self.wl / self.n) self.set(trait_change_notify=False, qrx=self.qx / self.n) self.q = optimalMatching(self.qx, self.qy)[0]