Mathematica Asked on December 28, 2020
Can someone help me fitting STS spectra using the Dynes formula (Phys. Rev. Lett. 41, 1509 (1978).) to find a superconducting gap?
I try to fit using FindFit in Mathematica but it gives several errors.
I followed a paper PRL 97, 077003 (2006). Below is data and code.
datasc = {{-0.014077264599286`,
0.621374900897037`}, {-0.013973006869221`,
0.609528968750012`}, {-0.013798116482755`,
0.627588351705338`}, {-0.013715858487083`,
0.611786648294662`}, {-0.013500742735483`,
0.628132880203356`}, {-0.013414668753502`,
0.610916468086312`}, {-0.013229439846755`,
0.631494845303488`}, {-0.013125118453006`,
0.612097140053849`}, {-0.012934051594806`,
0.626374435217287`}, {-0.012854012091447`,
0.610850134818836`}, {-0.012598842638496`,
0.601056568949004`}, {-0.012537885254975`,
0.620878264164867`}, {-0.012305973211707`,
0.610478738746756`}, {-0.012271085837907`,
0.625431259549181`}, {-0.011993571312948`,
0.612454822876588`}, {-0.011968504522993`,
0.630514986602161`}, {-0.01169664555298`,
0.612188638228786`}, {-0.01167678162866`,
0.629527622637399`}, {-0.011415394792257`,
0.609389576190281`}, {-0.011440316485095`,
0.628956782222543`}, {-0.011136623691867`,
0.608681193475558`}, {-0.011093343898403`,
0.627809689325877`}, {-0.010812429893927`,
0.619172855302405`}, {-0.010497534983665`,
0.625378781737344`}, {-0.010523435937582`,
0.611256245835949`}, {-0.010229403549494`,
0.630564416934257`}, {-0.010249464374139`,
0.61259620994217`}, {-0.010020419504093`,
0.6104029811793`}, {-0.00991285975574`,
0.627305507535661`}, {-0.009622607973917`,
0.630118010788891`}, {-0.009663123587291`,
0.612258942663926`}, {-0.009354332666272`,
0.63071887790393`}, {-0.009378609476602`,
0.615652117629415`}, {-0.009080717801676`,
0.621758398491997`}, {-0.00899056445973`,
0.608948476815756`}, {-0.00872228970898`,
0.613673954098563`}, {-0.008425875070833`,
0.619662025118672`}, {-0.008425515616974`,
0.60820742882466`}, {-0.008134027840954`,
0.614712501770054`}, {-0.007846240932651`,
0.618434374838869`}, {-0.007550654740761`,
0.615054113172628`}, {-0.007243325886054`,
0.613828943960593`}, {-0.006967183962889`,
0.612283062538786`}, {-0.00667551645994`,
0.613060837337174`}, {-0.006383880213848`,
0.614834663987215`}, {-0.006092299644033`,
0.618382707998014`}, {-0.005800672188932`,
0.620436674231333`}, {-0.005509127759859`,
0.625136403195606`}, {-0.005217667333589`,
0.632513021511196`}, {-0.004926105322533`,
0.636652471308915`}, {-0.004634582382549`,
0.642036985921199`}, {-0.004343031116038`,
0.646518828542922`}, {-0.004051622458938`,
0.655545157737814`}, {-0.003772250036151`,
0.667865972712596`}, {-0.00366713516368`,
0.688545606658834`}, {-0.00342450607074`,
0.698472452924415`}, {-0.003286289322349`,
0.716250472069554`}, {-0.003154001950943`,
0.729326953042744`}, {-0.003048503809543`,
0.744022417233924`}, {-0.003151844983597`,
0.71340550765073`}, {-0.002971519290126`,
0.761467595625831`}, {-0.003019708573044`,
0.727771680199391`}, {-0.002844498158325`,
0.777883960707346`}, {-0.002914154166045`,
0.744195074904004`}, {-0.002727189643915`,
0.79530874343943`}, {-0.002821826293555`,
0.759592723742558`}, {-0.002642968470188`,
0.812644105982333`}, {-0.002519036965884`,
0.828466329636686`}, {-0.002336845987854`,
0.838391107698959`}, {-0.002108221985937`,
0.835012980714093`}, {-0.002103304565986`,
0.819148302333172`}, {-0.001978245554458`,
0.802980128550625`}, {-0.001949083937668`,
0.787003887789556`}, {-0.001920590002079`,
0.770965466141595`}, {-0.0018714044611`,
0.752794371757219`}, {-0.001819478464308`,
0.736917697110244`}, {-0.001777445805495`,
0.716224398641115`}, {-0.001724471539087`,
0.689988937162361`}, {-0.001656483721415`,
0.66416779593861`}, {-0.001637990051923`,
0.638184611063144`}, {-0.001565886851625`,
0.608714585043004`}, {-0.001664019228756`,
0.622625088363212`}, {-0.001506699396215`,
0.573874343293045`}, {-0.00146264231169`,
0.543083681119503`}, {-0.001530471701334`,
0.592023670025779`}, {-0.001418620991149`,
0.513432697917294`}, {-0.00137456477642`,
0.482669753258076`}, {-0.001300483187387`,
0.445748666613443`}, {-0.001245781717195`,
0.417494005312882`}, {-0.00134184047482`,
0.496133622820742`}, {-0.001314367748511`,
0.46569203555471`}, {-0.001209185192296`,
0.388337247189158`}, {-0.001143087887211`,
0.35938374354704`}, {-0.001101323842015`,
0.331246049306193`}, {-0.001049368078854`,
0.302257615281949`}, {-0.001003410149356`,
0.274270056819032`}, {-0.000953298968899`,
0.246721503992733`}, {-0.000893540464598`,
0.223598485618516`}, {-0.000857309446664`,
0.201150358390479`}, {-0.000799688292059`,
0.180361979756463`}, {-0.000730238990537`,
0.160279144188762`}, {-0.00069434644365`,
0.143200149306438`}, {-0.000627583257036`,
0.128236496969664`}, {-0.000562644175495`,
0.111042234053786`}, {-0.000454165263903`,
0.094630174611252`}, {-0.000427165060343`,
0.079246312279387`}, {-0.000277052304208`,
0.067545617483627`}, {8.95723930117998`*^-7,
0.068958320030246`}, {0.000250036883371`,
0.08940576022664`}, {0.000375147120137`,
0.111446293341068`}, {0.000470956046531`,
0.133554762342206`}, {0.000523247248205`,
0.153229800614112`}, {0.0006304134636`,
0.178648993321026`}, {0.000591135347893`,
0.162777677199165`}, {0.000676058949982`,
0.202869086719592`}, {0.000706151791654`,
0.223368574068378`}, {0.000775243121094`,
0.243535879071121`}, {0.000802254940545`,
0.265699538859238`}, {0.000860884410613`,
0.290390128813601`}, {0.000903531331643`,
0.315529618091829`}, {0.000938897600098`,
0.339437697197663`}, {0.001008855835747`,
0.371780121885675`}, {0.000951847620589`,
0.357559558626954`}, {0.001047689470837`,
0.401815553667819`}, {0.000995097994467`,
0.38768535178627`}, {0.001112908345438`,
0.436063977458799`}, {0.001055986612901`,
0.419087501347263`}, {0.001158892131484`,
0.463587298634479`}, {0.001196109825749`,
0.493753257730929`}, {0.001098331579813`,
0.478065596476135`}, {0.001259259532789`,
0.52559173632938`}, {0.001150335176095`,
0.510929577156858`}, {0.001299111304853`,
0.558391812551469`}, {0.001255330866771`,
0.545157398709772`}, {0.00135106332732`,
0.592899278787421`}, {0.001316248853628`,
0.575623674551817`}, {0.00141536011533`,
0.621322252628074`}, {0.001451774093575`,
0.651003675295928`}, {0.001521513965593`,
0.682020085469781`}, {0.001574186230706`,
0.705647571180845`}, {0.001437128562864`,
0.667029187572421`}, {0.001438074082797`,
0.636898619059911`}, {0.001608270198757`,
0.730816389215224`}, {0.001681262801214`,
0.752495373424801`}, {0.001709224147172`,
0.771484847023913`}, {0.001761331768095`,
0.792908691603088`}, {0.0018770060158`,
0.81615678326117`}, {0.001986951268767`,
0.835152564287953`}, {0.00222907134579`,
0.833945152048013`}, {0.002377082821118`,
0.817751153372454`}, {0.002495510898134`,
0.801175839901887`}, {0.002566092187385`,
0.785259501295318`}, {0.002668605150616`,
0.770341208095317`}, {0.002798648613402`,
0.751643034102159`}, {0.002706188224861`,
0.787413931450476`}, {0.00291853329353`,
0.731158192142659`}, {0.002812817086329`,
0.769598043754509`}, {0.003046509590189`,
0.716544884532343`}, {0.002959265230404`,
0.750408286944645`}, {0.003201753171143`,
0.702890348459542`}, {0.003349084026966`,
0.686638518852289`}, {0.003528961284927`,
0.670189038780854`}, {0.00377255205135`,
0.659672218749916`}, {0.003955210654086`,
0.648481954534802`}, {0.004205465025327`,
0.643050983047486`}, {0.004451245919526`,
0.638411149350498`}, {0.004703488566741`,
0.637524053889655`}, {0.004828823680508`,
0.627189848481303`}, {0.005097681631404`,
0.630526908705533`}, {0.005365991413525`,
0.630029189219484`}, {0.005572075572802`,
0.624166122929211`}, {0.005841576322171`,
0.625955419680669`}, {0.006108745354861`,
0.62157040947486`}, {0.006314801704728`,
0.616593536376132`}, {0.006558201509692`,
0.617685045175992`}, {0.006734746274635`,
0.612701290452214`}, {0.006986980600888`,
0.622668612296609`}, {0.007257507514469`,
0.620605412421748`}, {0.007376081086264`,
0.612974386079443`}, {0.007578027710992`,
0.624634163722843`}, {0.007835679906185`,
0.618174732063782`}, {0.00810276968715`,
0.615951054739356`}, {0.008174396458644`,
0.608505515053486`}, {0.008450441761347`,
0.610038605678995`}, {0.008598823165027`,
0.603803129256345`}, {0.008780928787131`,
0.616447916194029`}, {0.00904918817906`,
0.617555964123237`}, {0.00933196212934`,
0.620067409192536`}, {0.009476559824052`,
0.612899604048426`}, {0.00964301669801`,
0.622727280921563`}, {0.009883347450192`,
0.611642062538332`}, {0.010163085871242`,
0.612299732862663`}, {0.010431265569676`,
0.615947346818052`}, {0.010637433157183`,
0.607425700953146`}, {0.010905638424187`,
0.610258529846062`}, {0.011209916269718`,
0.60946059574565`}, {0.011177702993744`,
0.601949480407052`}, {0.011495108099969`,
0.617518462096271`}, {0.011739617968388`,
0.610071926408163`}, {0.011791132926655`,
0.630339751037249`}, {0.012017833524653`,
0.61478334624002`}, {0.012089305980085`,
0.635062973292159`}, {0.012315723272229`,
0.610875440177862`}, {0.012363474852439`,
0.630115360084819`}, {0.012399329072465`,
0.614257714496783`}, {0.012655359199836`,
0.623983025162363`}, {0.01265582023848`,
0.609291260350478`}, {0.01293394180091`,
0.619221694141888`}, {0.012930047977916`,
0.602467749489191`}, {0.013105420704901`,
0.59459376511476`}, {0.01337198399432`,
0.603150433981797`}, {0.013413840920136`,
0.583789369335022`}, {0.013663600411843`,
0.605556131025231`}, {0.013667001281174`,
0.581684024125753`}, {0.013815887797337`,
0.581365491012884`}, {0.013963768803193`,
0.599508498930052`}, {0.01390282037346`,
0.587616974098408`}, {0.014114444925602`, 0.604028907955355`}};
ListPlot[%]
kB = 8.617 10^-5;
q = 1.60217 10^-19;
T = 3.2;
DOS = NIntegrate[
No Re[(En - I [CapitalGamma])/
Sqrt[(En - I [CapitalGamma])^2 + [CapitalDelta]^2]] (-D[1/(
Exp[(En - V)/(kB T)] + 1), V]), {En, 0, 10},
MaxRecursion -> 100];
FindFit[datasc, DOS, {[CapitalGamma], [CapitalDelta], No}, V]
Data can be scaled to mV as
data = Table[{datasc[[i, 1]] 10^3, datasc[[i, 2]]}, {i,
Length[datasc]}];
Then we use parameter $10^{-3}/(kT)=3.6265521643263314$ and function (we put x=Ea-V
)
dos[No_?NumericQ, [CapitalGamma]_?NumericQ, [CapitalDelta]_?
NumericQ, V_?NumericQ] :=
No Sign[V] NIntegrate[
Re[(x + V - I [CapitalGamma])/
Sqrt[(x + V - I [CapitalGamma])^2 - [CapitalDelta]^2]] ( (
E^(3.6265521643263314 x))/(1 + E^(
3.6265521643263314 x))^2), {x, -60, 60},
PrecisionGoal -> 5] // Quiet;
The best fit with this function is
ff =
FindFit[data,
dos[No, [CapitalGamma], [CapitalDelta],
V], {No, [CapitalGamma], [CapitalDelta]}, V]
Out[]= {No -> 2.22042, [CapitalGamma] ->
0.249188, [CapitalDelta] -> 1.54661}
It looks with data
as follows
Show[ListPlot[data, PlotRange -> All, Frame -> True,
FrameLabel -> {"Bias voltag (mV)", "Normalized Conductance"}],
Plot[dos[No, [CapitalGamma], [CapitalDelta], V] /. ff, {V, -15,
15}, PlotRange -> All]]
It is not the best fit since we used Sign[V]
. Probably it can be corrected around V=0
. For instance, we can use Abs
instead of Re
and Infinity
as a limit of integration, but it is not much better than version shown in Figure 1:
dos1[
No_?NumericQ, [CapitalGamma]_?NumericQ, [CapitalDelta]_?NumericQ,
V_?NumericQ] := -No NIntegrate[
Abs[(x + V - I [CapitalGamma])/
Sqrt[(x + V - I [CapitalGamma])^2 - [CapitalDelta]^2]] ( (
E^(3.6265521643263314` x))/(1 + E^(
3.6265521643263314` x))^2), {x, -Infinity, Infinity},
PrecisionGoal -> 5] // Quiet;
f1 =
FindFit[data,
dos1[No, [CapitalGamma], [CapitalDelta],
V], {No, [CapitalGamma], [CapitalDelta]}, V]
(*Out[]= {No -> -2.08873, [CapitalGamma] ->
0.360637, [CapitalDelta] -> -2.04026}*)
Show[
ListPlot[data, PlotRange -> All, Frame -> True,
FrameLabel -> {"Bias voltag (mV)", "Normalized Conductance"}],
Plot[dos1[No, [CapitalGamma], [CapitalDelta], V] /. f1, {V, -15,
15}, PlotRange -> All]]
Now we can fixed $Gamma=0.2$ as in the paper and define new function
[CapitalGamma] = .2;
dos2[No_?NumericQ, N1_?NumericQ, [CapitalDelta]_?NumericQ,
V_?NumericQ] :=
NIntegrate[ (No Sign[
V] Re[(x + V - I [CapitalGamma])/
Sqrt[(x + V - I [CapitalGamma])^2 - [CapitalDelta]^2]] -
N1 Abs[(x + V - I [CapitalGamma])/
Sqrt[(x + V - I [CapitalGamma])^2 - [CapitalDelta]^2]]) ( (
E^(3.6265521643263314` x))/(1 + E^(
3.6265521643263314` x))^2), {x, -60, 60}, PrecisionGoal -> 5] //
Quiet;
With this function we have
f2 =
FindFit[data,
dos2[No, N1, [CapitalDelta], V], {No, N1, [CapitalDelta]}, V]
(*Out[]= {No -> 1.79784, N1 -> -0.386709, [CapitalDelta] -> 1.62088}*)
It is looks much better than dos, dos1
, and we can improve it by varying $Gamma$
Show[ListPlot[data, PlotRange -> All, Frame -> True,
FrameLabel -> {"Bias voltag (mV)", "Normalized Conductance"}],
Plot[dos2[No, N1, [CapitalDelta], V] /. f2, {V, -15, 15},
PlotRange -> All]]
Answered by Alex Trounev on December 28, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP