added selecting the correct key for anti-parallel +/-; added math import
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
import math
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from scipy.optimize import fsolve
|
from scipy.optimize import fsolve
|
||||||
|
|
||||||
@ -29,6 +30,8 @@ def K2gap(Kval, fitparam):
|
|||||||
|
|
||||||
|
|
||||||
def antiparallel_rad2k_fit(radial, phi_in_degree, undudict):
|
def antiparallel_rad2k_fit(radial, phi_in_degree, undudict):
|
||||||
|
key = "anti-parallel-" if phi_in_degree < 0 else "anti-parallel+"
|
||||||
|
undudict = undudict[key]["K-value"]
|
||||||
phi = math.radians(phi_in_degree)
|
phi = math.radians(phi_in_degree)
|
||||||
amp1 = getfit(radial, undudict['fitpars_amp1'])
|
amp1 = getfit(radial, undudict['fitpars_amp1'])
|
||||||
amp2 = getfit(radial, undudict['fitpars_amp2'])
|
amp2 = getfit(radial, undudict['fitpars_amp2'])
|
||||||
@ -52,6 +55,8 @@ def getfit(val, fitparam):
|
|||||||
|
|
||||||
|
|
||||||
def antiparallel_k2rad_fit(Kval, phi_in_degree, undudict):
|
def antiparallel_k2rad_fit(Kval, phi_in_degree, undudict):
|
||||||
|
key = "anti-parallel-" if phi_in_degree < 0 else "anti-parallel+"
|
||||||
|
undudict = undudict[key]["K-value"]
|
||||||
phi = math.radians(phi_in_degree)
|
phi = math.radians(phi_in_degree)
|
||||||
amp1 = getfit(Kval, undudict['fitpars_amp1'])
|
amp1 = getfit(Kval, undudict['fitpars_amp1'])
|
||||||
amp2 = getfit(Kval, undudict['fitpars_amp2'])
|
amp2 = getfit(Kval, undudict['fitpars_amp2'])
|
||||||
|
Reference in New Issue
Block a user