import matplotlib.pyplot as plt import sys from math import pi as Pi from Scattering import scattering2D as scat from Utils import utils as ut imag_i = 1.j if (len(sys.argv)!=2): sys.exit("ABORT: filen-string needed") filen = str(sys.argv[1]) # namestring of calculation data_direc = "../../VSC2/AverageDwellTime-20130618/" + filen par = ut.read_input(data_direc) try: nr = int(par['nr']) # number of radius variations nconf = int(par['nconf']) # number of configurations to be averaged over nfreq = int(par['nfreq']) # number of frequency steps scanned over lead_width = float(par['lead_width']) nyout = int(par['nyout']) except KeyError: raw_input("WARNING: parameter missing in pinput.dat") #energs = scat.read_S(data_direc, filen+".0.0")[2] #kvals = np.sqrt(2*energs) #dk = (kvals[-1] - kvals[-3]) / 2.0 dims = np.take(scat.read_S(data_direc + "/scatterdata/", filen + ".0.0")[1]/2, np.arange(1,3*nfreq,3)) nin_max = np.max(dims)
import scipy.sparse.linalg as spsl from cmath import * import matplotlib.pyplot as plt import sys import pickle from Utils import utils as ut from Scattering import scattering2D as scat from Packets import transmission as trans Pi = np.pi I = 0. + 1.J par = ut.read_input('.') try: filen = par['filen'] # namestring of calculation where scatter data is stored pic_filen = par['pic_filen'] # namestring of calculation where waveplots are stored lead_width = float(par['lead_width']) modes_min = float(par['modes_min']) modes_max = float(par['modes_max']) refmodes = int(par['refmodes']) # number of modes to be considered except KeyError: raw_input("WARNING: parameter missing in pinput.dat") expo = 1 kmean = 0.5 * (modes_max + modes_min) * np.pi / lead_width dk = kmean * 10**(-expo) nin_Max = int(0.5 * (modes_max + modes_min)) # nin_Max = n_open_modes
#!/usr/bin/env python import sys import subprocess import os import numpy as np from Utils import utils as ut par = ut.read_input('./') try: filen = par['filen'] modes_min = float(par['modes_min']) modes_max = float(par['modes_max']) nin = int(par['refmodes']) # nin = refmodes ptc = int(par['ptc']) except KeyError: raw_input("WARNING: parameter missing in pinput.dat") nin_Max = int(0.5 * (modes_max + modes_min)) # nin_Max = n_open_modes pos_range = (0, int(0.33*nin-0.5*ptc), int(0.5*nin-0.5*ptc))#, int(0.67*nin-0.5*ptc), nin-ptc) in_str = open("peak.xml", "r").readlines() out_str = [[open("tdtpeak.%i.%i.xml"%(i,j), "w") for i in range(len(pos_range))] for j in range(len(pos_range))] for line in in_str: line = line.strip() #entfernt alle trailing characters vorne und hinten for i in range(len(pos_range)): for j in range(len(pos_range)):