universal dispersion script fixes
Former-commit-id: 2ee0815d5e0da2b04f66106581659926b0cb19b3
This commit is contained in:
parent
706701f9ce
commit
d54ff96aaf
|
@ -1,9 +1,8 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
|
||||||
import argparse
|
import argparse, re, random
|
||||||
from scipy.constants import hbar, e as eV, pi, c
|
from scipy.constants import hbar, e as eV, pi, c
|
||||||
import random
|
|
||||||
|
|
||||||
def make_action_sharedlist(opname, listname):
|
def make_action_sharedlist(opname, listname):
|
||||||
class opAction(argparse.Action):
|
class opAction(argparse.Action):
|
||||||
|
@ -90,9 +89,7 @@ begtime=time.time()
|
||||||
|
|
||||||
import qpms
|
import qpms
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import os, sys
|
import os, sys, warnings, math
|
||||||
import warnings
|
|
||||||
import math
|
|
||||||
from matplotlib import pyplot as plt
|
from matplotlib import pyplot as plt
|
||||||
from matplotlib.backends.backend_pdf import PdfPages
|
from matplotlib.backends.backend_pdf import PdfPages
|
||||||
from scipy import interpolate
|
from scipy import interpolate
|
||||||
|
@ -272,7 +269,7 @@ omegalist = list()
|
||||||
filecount = 0
|
filecount = 0
|
||||||
for trfile in os.scandir(translations_dir):
|
for trfile in os.scandir(translations_dir):
|
||||||
filecount += 1
|
filecount += 1
|
||||||
if (skipfreq and (0 == filecount % skipfreq)):
|
if (skipfreq and filecount % skipfreq):
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
npz = np.load(trfile.path, mmap_mode='r')
|
npz = np.load(trfile.path, mmap_mode='r')
|
||||||
|
@ -302,9 +299,9 @@ for trfile in os.scandir(translations_dir):
|
||||||
u2d_translations = tdic['u2d_tr']*hexside*s3
|
u2d_translations = tdic['u2d_tr']*hexside*s3
|
||||||
d2u_translations = tdic['d2u_tr']*hexside*s3
|
d2u_translations = tdic['d2u_tr']*hexside*s3
|
||||||
if gaussianSigma:
|
if gaussianSigma:
|
||||||
unitcell_envelope = np.exp(-np.sum(unitcell_translations**2,axis=-1)/(2*gaussianSigma**2))
|
unitcell_envelope = np.exp(-np.sum(tdic['self_tr']**2,axis=-1)/(2*gaussianSigma**2))
|
||||||
u2d_envelope = np.exp(-np.sum(u2d_translations**2,axis=-1)/(2*gaussianSigma**2))
|
u2d_envelope = np.exp(-np.sum(tdic['u2d_tr']**2,axis=-1)/(2*gaussianSigma**2))
|
||||||
d2u_envelope = np.exp(-np.sum(d2u_translations**2,axis=-1)/(2*gaussianSigma**2))
|
d2u_envelope = np.exp(-np.sum(tdic['d2u_tr']**2,axis=-1)/(2*gaussianSigma**2))
|
||||||
|
|
||||||
|
|
||||||
TMatrices_om = TMatrices_interp(omega)
|
TMatrices_om = TMatrices_interp(omega)
|
||||||
|
@ -385,7 +382,6 @@ klist = np.concatenate((k0Mlist,kMK1list,kK10list,k0K2list,kK2Mlist), axis=0)
|
||||||
|
|
||||||
# In[ ]:
|
# In[ ]:
|
||||||
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
from matplotlib.path import Path
|
from matplotlib.path import Path
|
||||||
import matplotlib.patches as patches
|
import matplotlib.patches as patches
|
||||||
f, ax = plt.subplots(1, figsize=(20,15))
|
f, ax = plt.subplots(1, figsize=(20,15))
|
||||||
|
|
Loading…
Reference in New Issue