In [2]:
%pylab inline
'''
modematching is a homemade package directory
----------------------------------------------
'''
from modematching import Optical_Path as OP
'''
----------------------------------------------
'''
import numpy as np
from ipywidgets import interact
from IPython.display import Image
from matplotlib import pyplot as plt
##
In [8]:
@interact(dz_lens1=(-500, 500, .1),dz_lens2=(-500, 500, .1),dz_SHG=(-500, 500, 0.1))
def plot_mode_overlap(dz_lens1=0, dz_lens2=0,dz_SHG=0):
a=OP.load_yml(filename='OPO_probe')
a.move_optics(opticsname='lens_1', dz=dz_lens1)
a.move_optics(opticsname='lens_2', dz=dz_lens2)
a.move_beam(beamname='OPO',dz=dz_SHG)
b=a.plotdata_OP()
for yn in b[1]:
plt.plot(b[0],yn)
print ('mode_overlop: '+str(a.modematching[0]))
a.show_path()
In [5]:
@interact(dz_lens1=(-500, 500, .1),dz_lens2=(-500, 500, .1),dz_SHG=(-500, 500, 0.1))
def plot_mode_overlap(dz_lens1=0, dz_lens2=0,dz_SHG=0):
a=OP.load_yml(filename='OPO')
a.move_optics(opticsname='lens_1', dz=dz_lens1)
a.move_optics(opticsname='lens_2', dz=dz_lens2)
a.move_beam(beamname='OPO',dz=dz_SHG)
b=a.plotdata_OP()
for yn in b[1]:
plt.plot(b[0],yn)
print ('mode_overlop: '+str(a.modematching[0]))
a.show_path()
In [2]:
@interact(dz_lens1=(-500, 500, .1),dz_SHG=(-500, 500, 0.1))
def plot_mode_overlap(dz_lens1=0,dz_SHG=0):
a=OP.load_yml(filename='Test')
a.move_optics(opticsname='lens_1', dz=dz_lens1)
a.move_beam(beamname='Test',dz=dz_SHG)
b=a.plotdata_OP()
for yn in b[1]:
plt.plot(b[0],yn)
a.show_path()
In [ ]:
# all units are in mm
@interact(dz_lens1=(-500, 500, .1), dz_lens2=(-500, 500, .1), dz_lens3=(-500, 500, .1),
dz_lens4=(-500, 500, .1), dz_lens5=(-500, 500, .1),dz_SHG=(-500, 500, 0.1))
def plot_mode_overlap(dz_lens1=0, dz_lens2=0, dz_lens3=0, dz_lens4=0, dz_lens5=0, dz_SHG=0):
a=OP.load_yml(filename='default')
a.move_optics(opticsname='lens_1', dz=dz_lens1)
a.move_optics(opticsname='lens_2', dz=dz_lens2)
a.move_optics(opticsname='lens_3', dz=dz_lens3)
a.move_optics(opticsname='lens_4', dz=dz_lens4)
a.move_optics(opticsname='lens_5', dz=dz_lens5)
a.move_beam(beamname='SHG',dz=dz_SHG)
b=a.plotdata_OP()
for yn in b[1]:
plt.plot(b[0],yn)
print ('mode_overlop: '+str(a.modematching[0]))
a.show_path()
In [ ]:
# all units are in mm
@interact(dz_lens1=(-500, 500, .1), dz_lens2=(-500, 500, .01), dz_lens3=(-500, 500, .1),
dz_SHG=(-500, 500, 0.1))
def plot_mode_overlap(dz_lens1=0, dz_lens2=0, dz_lens3=0, dz_SHG=0):
a=OP.load_yml(filename='50-25-300-SHG')
a.move_optics(opticsname='lens_1', dz=dz_lens1)
a.move_optics(opticsname='lens_2', dz=dz_lens2)
a.move_optics(opticsname='lens_3', dz=dz_lens3)
a.move_beam(beamname='SHG',dz=dz_SHG)
b=a.plotdata_OP()
for yn in b[1]:
plt.plot(b[0],yn)
print ('mode_overlop: '+str(a.modematching[0]))
a.show_path()
In [ ]:
# all units are in mm
@interact(dz_lens1=(-500, 500, .1), dz_lens2=(-500, 500, .1), dz_lens3=(-500, 500, .1),
dz_SHG=(-500, 500, 0.1))
def plot_mode_overlap(dz_lens1=0, dz_lens2=0, dz_lens3=0, dz_SHG=0):
a=OP.load_yml(filename='150-75-300-SHG')
a.move_optics(opticsname='lens_1', dz=dz_lens1)
a.move_optics(opticsname='lens_2', dz=dz_lens2)
a.move_optics(opticsname='lens_3', dz=dz_lens3)
a.move_beam(beamname='SHG',dz=dz_SHG)
b=a.plotdata_OP()
for yn in b[1]:
plt.plot(b[0],yn)
print ('mode_overlop: '+str(a.modematching[0]))
a.show_path()