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
##


Populating the interactive namespace from numpy and matplotlib

Lens for OPO probe (L5, L6)


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()


mode_overlop: 0.166681750926
Optics --- 
	lens_1: @423.2
	lens_2: @579.0
Beams --- 
	Probe: z0 378 w0 0.33@0.00155
	OPO: z0 1200.0 w0 0.33@0.00155

Lens for OPO pump (L3, L4)


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()


mode_overlop: 0.993816070209
Optics --- 
	lens_1: @265.2
	lens_2: @578.6
Beams --- 
	SHG: z0 0 w0 0.24@0.000755
	OPO: z0 1054.0 w0 0.24@0.000755

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()


Optics --- 
	lens_1: @100.0
Beams --- 
	Test: z0 0.0 w0 0.1@0.000755

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()