Commit 22c05c87 authored by Andreas Freise's avatar Andreas Freise
Browse files

updating FFT aLIGO example to work with current pykat

parent 62e4bea6
...@@ -15,7 +15,7 @@ from pykat.components import * ...@@ -15,7 +15,7 @@ from pykat.components import *
from pykat.external.progressbar import ProgressBar, ETA, Percentage, Bar, Timer from pykat.external.progressbar import ProgressBar, ETA, Percentage, Bar, Timer
from pykat.optics.maps import * from pykat.optics.maps import *
from pykat.optics.gaussian_beams import HG_beam, beam_param from pykat.optics.gaussian_beams import HG_mode, beam_param
from pykat.optics.fft import * from pykat.optics.fft import *
#from pykat.tools.plotting.tools import plot_field, plot_propagation #from pykat.tools.plotting.tools import plot_field, plot_propagation
...@@ -95,7 +95,7 @@ def main(): ...@@ -95,7 +95,7 @@ def main():
# generate roughly mode-matched input beam # generate roughly mode-matched input beam
global laser global laser
gx = beam_param(w0=w0, z=z0) gx = beam_param(w0=w0, z=z0)
beam = HG_beam(gx,gx,0,0) beam = HG_mode(gx,gx,0,0)
laser = beam.Unm(x,y) laser = beam.Unm(x,y)
# some debugging plots # some debugging plots
......
...@@ -10,11 +10,11 @@ import shelve ...@@ -10,11 +10,11 @@ import shelve
import pykat import pykat
from pykat.components import * from pykat.components import *
from pykat.utilities.plotting.tools import printPDF #from pykat.tools.plotting import printPDF
from pykat.external.progressbar import ProgressBar, ETA, Percentage, Bar, Timer from pykat.external.progressbar import ProgressBar, ETA, Percentage, Bar, Timer
from pykat.utilities.plotting.tools import plot_setup import pykat.plotting
from pykat.optics.maps import * from pykat.optics.maps import *
from pykat.optics.gaussian_beams import HG_beam, beam_param from pykat.optics.gaussian_beams import HG_mode, beam_param
from pykat.optics.fft import * from pykat.optics.fft import *
from aligo import * from aligo import *
...@@ -35,6 +35,7 @@ def main(): ...@@ -35,6 +35,7 @@ def main():
#filename='fround_mode_matched_no_map.npy' #filename='fround_mode_matched_no_map.npy'
#filename='fround_mode_matched_10map.npy' #filename='fround_mode_matched_10map.npy'
filename='fround-2014:12:29-19:55:28.npy' filename='fround-2014:12:29-19:55:28.npy'
filename='fround-2016:10:21-16:10:14.npy'
print(" --- loading data from file {0} ---".format(filename)) print(" --- loading data from file {0} ---".format(filename))
global f_round global f_round
f_round=np.load(filename) f_round=np.load(filename)
...@@ -77,7 +78,9 @@ def main(): ...@@ -77,7 +78,9 @@ def main():
np.savetxt(txtfile, power, fmt='%.18e', delimiter=' ') np.savetxt(txtfile, power, fmt='%.18e', delimiter=' ')
# plot scan # plot scan
ax,fig=plot_setup() #ax,fig=plot_setup()
fig=pykat.plotting.figure()
ax=fig.add_subplot(111)
ax.plot(power) ax.plot(power)
ax.set_yscale('log') ax.set_yscale('log')
pl.draw() pl.draw()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment