Ejemplo n.º 1
0
# ----------------------------------------------------- #

# --------------- Modules Importation ----------------- #
# Importing numerical analysis package and
# morgenstemning color map.
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib import rcParams
from scipy import interpolate
from scipy.optimize import curve_fit
#from scipy.stats import pearsonr
#from numpy import convolve
import scipy.fftpack as fft
import morgenstemning as mrg
ms, msi = mrg.morgenstemning()

# Setting the rc parameters.
rcParams['text.usetex'] = True
rcParams['text.latex.preamble'] = [r"\usepackage[charter]{mathdesign}"]
rcParams['font.family'] = 'serif'
rcParams['font.size'] = 8
rcParams['axes.labelsize'] = 'large'
rcParams['xtick.labelsize'] = 'large'
rcParams['ytick.labelsize'] = 'large'
rcParams['legend.numpoints'] = 3
rcParams['figure.figsize'] = 7, 3

# ---------------- Data Importation ------------------ #
# We import the data for each fibre and rescale the
# frequencies to GHz.
Ejemplo n.º 2
0
# Date mod.	:	October 23rd, 2013						#
# Description:	We compute the (complex) time delays	#
#				for the homoneous, circular cavity		#
#				as a function of the complex part of	#
#				potential. 								#
# ----------------------------------------------------- #

# --------------- Modules Importation ----------------- #
import numpy as np
import matplotlib.pyplot as plt
from scipy.linalg import eigvals
from scipy.special import jn,jvp,hankel1,h1vp,hankel2,h2vp
from scipy.optimize import newton
from scipy.integrate import quadrature
import morgenstemning as mrg
mr, mri = mrg.morgenstemning()

# Setting the rc parameters.
plt.rcParams['text.usetex'] = True
plt.rcParams['text.latex.preamble'] = [r"\usepackage[charter]{mathdesign}"]
plt.rcParams['font.family'] = 'serif'
plt.rcParams['font.size'] = 10
plt.rcParams['legend.numpoints'] = 3

# --------------- Function Definition ----------------- #
def timeDelayEigenfunctionRe(r,m,nc,k):
	eps2 = np.imag(nc*nc)
	return np.real(-1j*k*eps2*2.0*np.pi*r*r*np.conj(jn(m,nc*k*r))*jvp(m,nc*k*r))

def timeDelayEigenfunctionIm(r,m,nc,k):
	eps2 = np.imag(nc*nc)
# -------------------- Information -------------------- #
# Author:       Joey Dumont <*****@*****.**>     #
# Date created: Jun. 17th, 2014							#
# Date mod.:    Jun. 17th, 2014							#
# Description:  We plot tthe values of Ai(z) for large	#
#				arguments. 								#
# ----------------------------------------------------- #

# --------------- Modules Importation ----------------- #
import matplotlib.pyplot as plt
import numpy as np
import morgenstemning as mrg
from matplotlib.colors import LogNorm
ms,msi = mrg.morgenstemning()

from scipy.special import airy

# Setting the rc parameters.
plt.rcParams['text.usetex'] = True
plt.rcParams['text.latex.preamble'] = [r"\usepackage{amsmath}\usepackage[charter]{mathdesign}"]
plt.rcParams['font.family'] = 'serif'
plt.rcParams['font.size'] = 10
plt.rcParams['legend.numpoints'] = 3

ticks = np.arange(0, 1200, 200)
labels = np.arange(-500, 700, 200)

nbPoints = 250
x = np.linspace(-500,500,2*nbPoints+1)
y = np.linspace(-500,500,2*nbPoints+1)
X, Y = np.meshgrid(x,y)
Ejemplo n.º 4
0
# Date mod.	:	October 23rd, 2013						#
# Description:	We compute the (complex) time delays	#
#				for the homoneous, circular cavity		#
#				as a function of the complex part of	#
#				potential. 								#
# ----------------------------------------------------- #

# --------------- Modules Importation ----------------- #
import numpy as np
import matplotlib.pyplot as plt
from scipy.linalg import eigvals
from scipy.special import jn, jvp, hankel1, h1vp, hankel2, h2vp
from scipy.optimize import newton
from scipy.integrate import quadrature
import morgenstemning as mrg
mr, mri = mrg.morgenstemning()

# Setting the rc parameters.
plt.rcParams['text.usetex'] = True
plt.rcParams['text.latex.preamble'] = [r"\usepackage[charter]{mathdesign}"]
plt.rcParams['font.family'] = 'serif'
plt.rcParams['font.size'] = 10
plt.rcParams['legend.numpoints'] = 3


# --------------- Function Definition ----------------- #
def timeDelayEigenfunctionRe(r, m, nc, k):
    eps2 = np.imag(nc * nc)
    return np.real(-1j * k * eps2 * 2.0 * np.pi * r * r *
                   np.conj(jn(m, nc * k * r)) * jvp(m, nc * k * r))