Hex example fix K point position; add real freq SVD

Former-commit-id: 5c7c1e2099a649e778beebf9382cd527108db5f4
This commit is contained in:
Marek Nečada 2020-04-27 16:56:31 +03:00
parent 14a5c32202
commit 2f14de7dde
3 changed files with 31 additions and 1 deletions

View File

@ -25,7 +25,7 @@ export B2Y_nmi=$(bc <<< '4*pi/3/'${SEPARATION_nm})
# a K-point coordinates # a K-point coordinates
export KPOINTX_nmi=$(bc <<< '4*pi/3/sqrt(3)'/${SEPARATION_nm}) export KPOINTX_nmi=$(bc <<< '4*pi/3/sqrt(3)'/${SEPARATION_nm})
export KPOINTY_nmi=$(bc <<< '4*pi/3/sqrt(3)'/${SEPARATION_nm}) export KPOINTY_nmi=0.0 #$(bc <<< '4*pi/3/sqrt(3)'/${SEPARATION_nm})
export RADIUS_nm=50 export RADIUS_nm=50
export HEIGHT_nm=50 export HEIGHT_nm=50

View File

@ -0,0 +1,16 @@
#!/bin/bash
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
MISCDIR=../../../misc
source ${SCRIPTDIR}/00_params.sh
${MISCDIR}/lat2d_realfreqsvd.py \
-B $BG_REFINDEX \
-b s${A1X_nm}e-9 s${A1Y_nm}e-9 \
-b s${A2X_nm}e-9 s${A2Y_nm}e-9 \
-p s${P1X_nm}e-9 s${P1Y_nm}e-9 \
-p s${P2X_nm}e-9 s${P2Y_nm}e-9 \
-L 3 -m $METAL -r ${RADIUS_nm}e-9 -H ${HEIGHT_nm}e-9 \
-k s${KPOINTX_nmi}e9 s${KPOINTY_nmi}e9 \
-F 1.3 0.001 1.5 \
-P

View File

@ -114,6 +114,20 @@ def sfloat(string):
else: raise exc else: raise exc
return res return res
def sint(string):
'''Tries to match an int, or an int with prepended 's'
Used as a workaraound for argparse's negative number matcher if '+' is used as a
prefix
'''
try:
res = int(string)
except ValueError as exc:
if string[0] == 's':
res = int(string[1:])
else: raise exc
return res
def material_spec(string): def material_spec(string):
"""Tries to parse a string as a material specification, i.e. a """Tries to parse a string as a material specification, i.e. a
real or complex number or one of the string in built-in Lorentz-Drude models. real or complex number or one of the string in built-in Lorentz-Drude models.