Working with Expressions
In this particular example, the concept of expression is introduced. The expression modul of lmfit
allows to evalute expressions in the form of strings. This allows to link properties of peaks together. Furthermore, mathematical operations can be performed on the result of the expression.
data.csv
_index,Energy,Intensity,Noisy
0,-1.6,0.0,0.04008584898760459
1,-1.5833333333333335,0.003891050583657596,0.04750414409524225
2,-1.5666666666666669,0.003973071404922201,0.03510399915254631
3,-1.5500000000000003,0.00405770964833183,0.05632172083076319
4,-1.5333333333333337,0.0041450777202072485,0.01232860798641571
5,-1.516666666666667,0.004235294117647068,0.05302472496914309
6,-1.5000000000000004,0.0043284838283034685,0.07525857347111906
7,-1.4833333333333338,0.004424778761061949,0.026283276349644155
8,-1.4666666666666672,0.004524318210380788,0.011585214896062204
9,-1.4500000000000006,0.0046272493573264635,0.0915722853744314
10,-1.433333333333334,0.004733727810650881,0.04465407821401557
11,-1.4166666666666674,0.004843918191603862,0.06827239306435148
12,-1.4000000000000008,0.004957994766561084,0.05586439899783531
13,-1.383333333333334,0.005076142131979685,0.0519569913045801
14,-1.3666666666666676,0.005198555956678712,0.04529476745152189
15,-1.3500000000000008,0.0053254437869822225,0.046140549452885406
16,-1.3333333333333344,0.005457025920873108,0.023525144931402578
17,-1.3166666666666675,0.005593536357986327,0.09585723752299317
18,-1.3000000000000012,0.0057352238330412595,0.07127922424213151
19,-1.2833333333333343,0.005882352941176454,0.10508559185076881
20,-1.266666666666668,0.006035205364626978,0.08420060928031715
21,-1.250000000000001,0.006194081211286973,0.017085686334549988
22,-1.2333333333333347,0.006359300476947529,0.03344672102794343
23,-1.216666666666668,0.00653120464441218,0.00830761072647146
24,-1.2000000000000015,0.006710158434296354,0.0691372440712335
25,-1.183333333333335,0.006896551724137925,0.08700263994353065
26,-1.1666666666666683,0.007090801654520351,0.08565019188726043
27,-1.1500000000000017,0.0072933549432738845,0.018466410525855743
28,-1.133333333333335,0.007504690431519682,0.10126968931392635
29,-1.1166666666666685,0.0077253218884119875,0.09002669232719052
30,-1.1000000000000019,0.007955801104972366,0.06492669387530689
31,-1.0833333333333353,0.008196721311475363,0.012283949013776264
32,-1.0666666666666687,0.008448720957521673,0.051160376096648155
33,-1.050000000000002,0.008712487899322318,0.10076720629983352
34,-1.0333333333333354,0.00898876404494378,0.06455063829584042
35,-1.0166666666666688,0.009278350515463833,0.085381815664481
36,-1.0000000000000022,0.009582113388341695,0.10165223781514847
37,-0.9833333333333357,0.009900990099009844,0.025570057103461108
38,-0.966666666666669,0.010235996588001109,0.02228295793177043
39,-0.9500000000000025,0.010588235294117582,0.017739377314671997
40,-0.9333333333333358,0.010958904109588984,0.04422978316861217
41,-0.9166666666666691,0.011349306431273604,0.019761263525689472
42,-0.9000000000000026,0.011760862463247207,0.04629885183574297
43,-0.8833333333333359,0.012195121951219443,0.053064400715557736
44,-0.8666666666666692,0.012653778558875128,0.08947490450789104
45,-0.8500000000000028,0.013138686131386808,0.06483319245975283
46,-0.8333333333333361,0.013651877133105715,0.04409090800604787
47,-0.8166666666666694,0.014195583596214404,0.09857042115474708
48,-0.8000000000000029,0.014772260976610463,0.022608811796422504
49,-0.7833333333333363,0.015384615384615235,0.10076241702814402
50,-0.7666666666666697,0.01603563474387513,0.028729376733513383
51,-0.750000000000003,0.016728624535315855,0.0870234230693911
52,-0.7333333333333365,0.01746724890829681,0.0676497631364179
53,-0.7166666666666699,0.018255578093306146,0.028544877331387865
54,-0.7000000000000033,0.01909814323607401,0.10175610090705829
55,-0.6833333333333367,0.019999999999999855,0.027299661470373895
56,-0.6666666666666701,0.02096680256260904,0.1131043218039902
57,-0.6500000000000035,0.02200488997554988,0.05118797301708643
58,-0.6333333333333369,0.02312138728323678,0.03441361033656606
59,-0.6166666666666702,0.02432432432432412,0.05285021270123045
60,-0.6000000000000036,0.02562277580071142,0.10660843091638031
61,-0.5833333333333369,0.02702702702702668,0.11737509073867693
62,-0.5666666666666704,0.028548770816811748,0.12134799195481201
63,-0.5500000000000038,0.030201342281878873,0.04041597381074299
64,-0.5333333333333372,0.03199999999999956,0.12293189388817057
65,-0.5166666666666706,0.03396226415094291,0.05556963189399414
66,-0.500000000000004,0.03610832497492419,0.08828987053748896
67,-0.48333333333333733,0.0384615384615379,0.13299541447675434
68,-0.4666666666666708,0.04104903078677245,0.1368883871498967
69,-0.4500000000000042,0.04390243902438932,0.12557018387213875
70,-0.4333333333333376,0.04705882352941089,0.10858972370468452
71,-0.41666666666667096,0.05056179775280797,0.14038099626448797
72,-0.4000000000000044,0.054462934947048874,0.14696995552122566
73,-0.38333333333333774,0.058823529411763525,0.11827481099647273
74,-0.36666666666667114,0.0637168141592905,0.12310013634836614
75,-0.3500000000000045,0.06923076923076783,0.12389921713852828
76,-0.3333333333333379,0.07547169811320567,0.12541817310963077
77,-0.31666666666667126,0.08256880733944734,0.08913053803943821
78,-0.3000000000000047,0.09068010075566536,0.158725588571065
79,-0.2833333333333381,0.09999999999999735,0.12271184899825521
80,-0.2666666666666715,0.11076923076922764,0.11988078158746927
81,-0.2500000000000049,0.12328767123287268,0.19089360574178527
82,-0.23333333333333828,0.137931034482754,0.19399955030212906
83,-0.21666666666667167,0.15517241379309754,0.18670514823813245
84,-0.20000000000000503,0.1756097560975534,0.20809899253733338
85,-0.18333333333333843,0.19999999999999216,0.23171652798758308
86,-0.16666666666667185,0.22929936305731488,0.2484093442785573
87,-0.15000000000000524,0.2647058823529294,0.3310743928003237
88,-0.13333333333333863,0.3076923076922934,0.36684994465354487
89,-0.11666666666667203,0.35999999999998283,0.3891363703418967
90,-0.1000000000000054,0.42352941176468273,0.46941956893213543
91,-0.08333333333333881,0.49999999999997286,0.5580343781043237
92,-0.0666666666666722,0.590163934426198,0.5954783032481118
93,-0.0500000000000056,0.6923076923076551,0.741052184253777
94,-0.03333333333333899,0.7999999999999646,0.838197602601856
95,-0.01666666666667238,0.8999999999999696,0.9513897921608991
96,-5.773159728050815e-15,0.972972972972956,0.9991456688422116
97,0.016666666666660834,1.0,1.0900891532152457
98,0.03333333333332744,0.9729729729729932,0.9973225325465217
99,0.04999999999999405,0.9000684869288876,0.906261276926932
100,0.06666666666666066,0.8003319898391893,0.8241812742665023
101,0.08333333333332726,0.6926622009062817,0.7832498289548987
102,0.09999999999999389,0.5905260079579859,0.6185705157749193
103,0.11666666666666048,0.5003698828803956,0.5147752382697125
104,0.1333333333333271,0.423907359037742,0.4950946246505369
105,0.14999999999999367,0.36038627792143624,0.42632631143218236
106,0.1666666666666603,0.3080871943516519,0.3960140991859387
107,0.18333333333332688,0.26510966833725974,0.29118083146951984
108,0.19999999999999352,0.229712352160166,0.2944689348278017
109,0.21666666666666007,0.200422509979045,0.2741346452275327
110,0.23333333333332676,0.17604211948496107,0.23555118065288444
111,0.2499999999999933,0.15561497876280292,0.19611365068308828
112,0.26666666666665995,0.1383841657795379,0.22837404698823588
113,0.2833333333333265,0.12375175116828944,0.13640801157284446
114,0.2999999999999932,0.11124466029010888,0.16703332815641658
115,0.31666666666665977,0.1008615472585792,0.11178903951413714
116,0.3333333333333264,0.09156616328472589,0.1112347183283852
117,0.349999999999993,0.08347578183738227,0.13157636117103375
118,0.3666666666666596,0.07640033803343374,0.09334455581051235
119,0.38333333333332614,0.07018186486213082,0.10827469912745401
120,0.3999999999999928,0.06469119491649024,0.16107569440222647
121,0.41666666666665936,0.05982206629964605,0.1474982352074414
122,0.433333333333326,0.05548654321439518,0.14326598821917524
123,0.44999999999999263,0.05161143975291705,0.13149136546810222
124,0.4666666666666592,0.04813551180660481,0.1244863052388569
125,0.4833333333333258,0.04500723964762217,0.11840749611563044
126,0.4999999999999925,0.042183066953828376,0.060512417201576546
127,0.5166666666666592,0.03962599439990947,0.05089691387743661
128,0.5333333333333257,0.03762979151803755,0.08591736551599109
129,0.5499999999999923,0.0355235772582584,0.06527515557301339
130,0.5666666666666589,0.033602772665341465,0.10263523116034959
131,0.5833333333333255,0.03184727712998013,0.050326502266943594
132,0.5999999999999921,0.0302396665048004,0.12757165389086006
133,0.6166666666666587,0.028764785209156422,0.09875162663963871
134,0.6333333333333253,0.02740940871559529,0.04595424837701159
135,0.6499999999999919,0.026161963071215155,0.06868725856446313
136,0.6666666666666585,0.025055460720915503,0.033624006514590146
137,0.6833333333333251,0.02399553502734928,0.10388950642747008
138,0.6999999999999916,0.02310851127639354,0.030981017827682047
139,0.7166666666666583,0.022205528543641218,0.07266624688472662
140,0.733333333333325,0.021575947349213472,0.11181618425781512
141,0.7499999999999916,0.020807671274259663,0.05541161570195061
142,0.7666666666666581,0.020262538639031612,0.08950539107569572
143,0.7833333333333247,0.019608943762035314,0.023378000215751638
144,0.7999999999999914,0.01900508918247521,0.11575968330990377
145,0.8166666666666581,0.01844758920101576,0.06288914585924078
146,0.8333333333333246,0.017933441506014527,0.025958714742173865
147,0.8499999999999912,0.017459988802825416,0.061836613074917474
148,0.8666666666666578,0.017116223909357433,0.08669454240171902
149,0.8833333333333245,0.01700109250482449,0.10765282431740325
150,0.899999999999991,0.016644697110745524,0.033282136165272536
151,0.9166666666666576,0.016321490303453878,0.08663344505231867
152,0.9333333333333241,0.016030153287369217,0.03933086234094735
153,0.9499999999999907,0.015769582084074696,0.06873146814288243
154,0.9666666666666575,0.01553887828303456,0.026067525652166298
155,0.983333333333324,0.015337342770190972,0.10149349763531684
156,0.9999999999999906,0.015164472389002764,0.04544611853949536
157,1.0166666666666573,0.015019959565844851,0.09398865195658686
158,1.033333333333324,0.014903695013669643,0.032942941505132536
159,1.0499999999999905,0.014815773718070222,0.016909937678527786
160,1.066666666666657,0.014756504512647603,0.03833415978914015
161,1.0833333333333235,0.01472642367105966,0.07038943793886053
162,1.0999999999999903,0.014726313087813518,0.07115226691186685
163,1.1166666666666567,0.014762833800814612,0.11306827133077327
164,1.1333333333333235,0.014828824980555134,0.04662696507791899
165,1.14999999999999,0.014936297382658363,0.026231560872918128
166,1.1666666666666567,0.015092709661536039,0.03491896913865691
167,1.1833333333333231,0.015265693132420408,0.11436028146419884
168,1.19999999999999,0.015480363766871183,0.03892269934030934
169,1.2166666666666563,0.01574034597789587,0.02915320223436095
170,1.2333333333333232,0.016049975876225163,0.04636767780072558
171,1.2499999999999896,0.016445001617509163,0.08707288930534204
172,1.2666666666666564,0.016871150941466195,0.0852459458774799
173,1.283333333333323,0.017365810966736703,0.10961009441709282
174,1.2999999999999896,0.01793794637067392,0.0365951371906682
175,1.3166666666666562,0.018598387284889623,0.024412837387149493
176,1.3333333333333228,0.019360276650060192,0.05541705235363853
177,1.3499999999999894,0.02027741539926165,0.049321115028945414
178,1.366666666666656,0.02139506330100348,0.08076752865412337
179,1.3833333333333226,0.02265340564781228,0.06723594652708242
180,1.3999999999999893,0.024215964657596928,0.06673711988042441
181,1.4166666666666559,0.02582307680845409,0.12478872326635204
182,1.4333333333333225,0.02770646393851211,0.060965602790654876
183,1.449999999999989,0.029925276941982052,0.03770325553334422
184,1.4666666666666557,0.03255400371914528,0.0698887458754342
185,1.4833333333333223,0.03568618792266998,0.12352285506264171
186,1.499999999999989,0.039438183003851726,0.0891652911931678
187,1.5166666666666555,0.04395161588318507,0.044848923579617665
188,1.533333333333322,0.049396347905066126,0.07997288513623901
189,1.5499999999999887,0.05593774572615727,0.14514166034193227
190,1.566666666666655,0.06372917556163323,0.15860749312341846
191,1.583333333333322,0.07281235769968086,0.14756888843535604
192,1.5999999999999883,0.08297912055122572,0.14632662580377548
193,1.6166666666666551,0.08968666903582638,0.1628523411311102
194,1.6333333333333215,0.09956504877300416,0.14713538295135836
195,1.6499999999999884,0.106985658129584,0.20622148484383954
196,1.6666666666666548,0.1105553529287392,0.1630654132822926
197,1.6833333333333216,0.10976166283155749,0.17589287777461948
198,1.699999999999988,0.10550302268599474,0.17521269502277753
199,1.7166666666666548,0.09954066028792553,0.15028352636441972
200,1.7333333333333214,0.09359971188053476,0.1843213781833252
201,1.749999999999988,0.08894698680154246,0.09841014382507488
202,1.7666666666666546,0.08611776697261757,0.09610253643878759
203,1.7833333333333212,0.08549802656897262,0.11788290136818833
204,1.7999999999999878,0.08714704444740207,0.12472961578779661
205,1.8166666666666544,0.09114323548348285,0.18007095347304625
206,1.8333333333333208,0.09741566916226682,0.1968062748513115
207,1.849999999999988,0.10570299682241792,0.16035958814590698
208,1.8666666666666545,0.11534606210318205,0.172274567609071
209,1.8833333333333209,0.12489566539676876,0.14044806277828398
210,1.8999999999999877,0.1324663709406456,0.1562904952289987
211,1.916666666666654,0.1361582465387924,0.18085568772226798
212,1.9333333333333207,0.13517303448186327,0.1505590037511287
213,1.9499999999999873,0.13039310047924793,0.14249147251965252
214,1.9666666666666537,0.12373011438496852,0.1941605795924947
215,1.9833333333333203,0.1172246633030924,0.14329761858493295
216,1.9999999999999871,0.11223132336840552,0.13831206974487778
217,2.0166666666666537,0.10964438113207683,0.13611277529075594
218,2.0333333333333203,0.10970848399307127,0.20400949606791344
219,2.049999999999987,0.11247749074012411,0.14231494223174615
220,2.066666666666653,0.11768922280751624,0.20175062459858167
221,2.08333333333332,0.12473707754788672,0.1881887731426838
222,2.0999999999999868,0.13233632676821225,0.1510163447133285
223,2.1166666666666534,0.1388812549798811,0.15368696710215354
224,2.13333333333332,0.1427420541018731,0.20593486954988302
225,2.1499999999999866,0.14319471281865284,0.2178817592243142
226,2.1666666666666528,0.14110364763997182,0.19073949371894608
227,2.18333333333332,0.13826829089995027,0.21316543180419148
228,2.1999999999999864,0.1363279334870925,0.2002379289667135
229,2.216666666666653,0.13652200547175272,0.17437301933725857
230,2.23333333333332,0.13932494130255624,0.18464291881130807
231,2.2499999999999862,0.14470822166638303,0.184363304689532
232,2.266666666666653,0.1521105848946017,0.16658405391777775
233,2.2833333333333194,0.16061207756974027,0.1750426369830076
234,2.299999999999986,0.16897722924770694,0.19308836593654144
235,2.3166666666666527,0.1759261828247377,0.17837906563374148
236,2.3333333333333193,0.18029139969025185,0.20142144462654596
237,2.3499999999999854,0.18149515421662843,0.20508934969418857
238,2.3666666666666525,0.1797830536574096,0.20834286269816094
239,2.383333333333319,0.1762170482718902,0.18837766203667497
240,2.3999999999999857,0.17226873288254063,0.24183572752354615
241,2.4166666666666523,0.1691475675474199,0.2522185226050003
242,2.433333333333319,0.1671686571423933,0.17205734074527076
243,2.449999999999985,0.16548924618092917,0.20721226255184488
244,2.466666666666652,0.16242034016088563,0.21279455158297994
245,2.4833333333333187,0.15633214078963112,0.24736846285340425
246,2.4999999999999853,0.14661349398571155,0.20852196502274695
247,2.516666666666652,0.13410546069691992,0.1806391973424074
248,2.5333333333333186,0.12044536220806938,0.20434972488407763
249,2.5499999999999847,0.10718928699229796,0.1075183763618777
250,2.566666666666652,0.09532586355221329,0.1401827543414672
251,2.5833333333333184,0.08529339317605522,0.11386166424719965
252,2.599999999999985,0.07709066119281836,0.11724446084028642
253,2.6166666666666516,0.07063904745880455,0.07117402788645898
254,2.633333333333318,0.06568665577483854,0.0974309131763187
255,2.649999999999985,0.062078991816957016,0.14200265323946532
256,2.6666666666666514,0.059617904082309055,0.09492562447501623
257,2.683333333333318,0.058164564233077025,0.1421389824321976
258,2.6999999999999846,0.05756091921572554,0.07605573367039961
259,2.7166666666666512,0.057635772916898795,0.10382729572114666
260,2.7333333333333174,0.058225327937197355,0.07481798050713573
261,2.7499999999999845,0.05915096685973496,0.1264037121723935
262,2.766666666666651,0.06033003213293948,0.10581307933760058
263,2.7833333333333177,0.06181828855366552,0.1106167472108448
264,2.799999999999984,0.06374490759060672,0.15659158429270092
265,2.816666666666651,0.06628981889926785,0.10674697136895686
266,2.833333333333317,0.06958414097301331,0.08445310220152942
267,2.849999999999984,0.07372846515462701,0.07480467594810104
268,2.8666666666666507,0.07885975952308069,0.09644847248292192
269,2.8833333333333173,0.0851664178607698,0.1643175269165928
270,2.899999999999984,0.09277070516830589,0.18361495115480642
271,2.9166666666666505,0.10151164911253709,0.11690115144577215
272,2.9333333333333167,0.11073487266572096,0.1711131370404347
273,2.949999999999984,0.11922007584730741,0.20348762745712848
274,2.9666666666666504,0.12537987745324689,0.22167682817990864
275,2.983333333333317,0.1277625583305999,0.16000379093788122
276,2.9999999999999836,0.1256732739092848,0.14392645244441782
277,3.01666666666665,0.11955130788860958,0.1883469785660102
278,3.033333333333317,0.11079566712510833,0.1642068181738013
279,3.0499999999999834,0.10112180177353332,0.18857514521029167
280,3.0666666666666496,0.09192926638695936,0.17280868069402422
281,3.0833333333333166,0.08404615436832302,0.134628467314825
282,3.099999999999983,0.07780751134483174,0.13386285210569976
283,3.11666666666665,0.07325039227702294,0.08396487835561066
284,3.1333333333333164,0.0702860388364263,0.15877267050322696
285,3.149999999999983,0.06882118316423944,0.0920283209332163
286,3.1666666666666496,0.06876812106173276,0.10778820921143908
287,3.183333333333316,0.07010374023997071,0.13466527491494734
288,3.199999999999983,0.07279255164035678,0.07999524634761879
289,3.216666666666649,0.07675045397804342,0.16873263562642749
290,3.233333333333316,0.08174717338281955,0.09754650689452425
291,3.2499999999999822,0.08735955311363625,0.11661013840164032
292,3.266666666666649,0.09306179365964579,0.15084497345549153
293,3.283333333333316,0.09900498124429352,0.14459687384949413
294,3.2999999999999825,0.10487737930796168,0.20408957183781884
295,3.3166666666666487,0.11069291597185596,0.16758006884720617
296,3.333333333333316,0.11639708496367848,0.11708318142150356
297,3.3499999999999823,0.1217273908908785,0.18798478150218473
298,3.366666666666649,0.1265996020457453,0.160148183476634
299,3.3833333333333155,0.13116896447439702,0.13471980746139514
300,3.399999999999982,0.135966288673545,0.22079258394641407
301,3.4166666666666488,0.14142025008083,0.2303159665558857
302,3.433333333333316,0.14751975109442883,0.14908577630358896
303,3.4499999999999815,0.15352737719387624,0.15682817454394934
304,3.4666666666666486,0.15816409853225305,0.2123752443590348
305,3.483333333333315,0.1601857154835972,0.25100925805522
306,3.499999999999982,0.1589545566775944,0.23146153039900652
307,3.5166666666666484,0.1544852206038986,0.18805464416779438
308,3.533333333333315,0.14869755741153032,0.24784553663840392
309,3.5499999999999816,0.14263605104698895,0.19902371751685077
310,3.566666666666648,0.13741146743857324,0.1825510191735316
311,3.583333333333315,0.133595436797124,0.1999701568195698
312,3.599999999999981,0.1313273368739534,0.16357087271097392
313,3.616666666666648,0.13056686253320388,0.1791463340532458
314,3.633333333333314,0.1312641333278097,0.15526631424132473
315,3.649999999999981,0.1332797358903959,0.22416864012296855
316,3.666666666666648,0.13628483366420036,0.22393455210254365
317,3.6833333333333136,0.13952422967709147,0.23017608797405567
318,3.6999999999999806,0.14204112486636356,0.18809178241849328
319,3.716666666666648,0.14294294009596903,0.22115679272094563
320,3.7333333333333134,0.1414293792565008,0.20291350655903914
321,3.749999999999981,0.13818933933035218,0.19773219069821507
322,3.766666666666648,0.1331860419733018,0.16300076946436381
323,3.7833333333333137,0.12665222914930274,0.15126271662184865
324,3.7999999999999807,0.1187286978126514,0.13961062608773714
325,3.8166666666666473,0.10961484592424504,0.12235089260036777
326,3.8333333333333135,0.09984258973974126,0.10554020646174972
327,3.849999999999981,0.09008223810188593,0.09630778963814783
328,3.866666666666647,0.08085685620230627,0.14855024097349467
329,3.8833333333333138,0.07256316222572513,0.12141840174758514
330,3.89999999999998,0.06510214772133885,0.06602912108625893
331,3.916666666666647,0.058610921444190896,0.08376982793359086
332,3.9333333333333136,0.05272378319996645,0.06843031329554922
333,3.94999999999998,0.04782334744197015,0.09705561814390548
334,3.9666666666666472,0.04352307002441606,0.14312207204289723
335,3.9833333333333134,0.04013926610201627,0.05774696382831518
336,3.99999999999998,0.03746459966304642,0.12531161632300958
337,4.016666666666646,0.03544048418519373,0.03719059938882738
338,4.033333333333314,0.033991331387312106,0.06165896300764242
339,4.049999999999979,0.03302552570019131,0.12500450709332628
340,4.066666666666647,0.03235083401139447,0.07273157129922342
341,4.083333333333313,0.03178395118237268,0.07712593001301667
342,4.09999999999998,0.031763311390900446,0.08850652658374072
343,4.116666666666646,0.03201973702619608,0.04903651204949093
344,4.133333333333312,0.03258483891250205,0.06661071159646981
345,4.149999999999979,0.033434036826116544,0.09203290898258842
346,4.166666666666647,0.03443820935102124,0.05381618065791931
347,4.183333333333312,0.03536756518157945,0.06412169642428014
348,4.19999999999998,0.0359505047177961,0.039351377786521244
349,4.216666666666645,0.03596231076319577,0.09214743776977893
350,4.233333333333313,0.035307682507203744,0.05902830650368873
351,4.249999999999979,0.03406049881290491,0.11097026296574036
352,4.266666666666646,0.032431453015792665,0.07352334818051853
353,4.283333333333312,0.030672135044579777,0.07846761570546937
354,4.299999999999979,0.028966334931621377,0.060235010726177374
355,4.316666666666645,0.027363343807303785,0.08793754203291271
356,4.333333333333313,0.025815923983005612,0.07769771511981848
357,4.349999999999977,0.024223887688296343,0.0733482193458991
358,4.366666666666646,0.022534439228242227,0.11403931281846502
359,4.383333333333312,0.02080220500592597,0.026186032187608368
360,4.399999999999979,0.01906966307887128,0.028696470510765328
361,4.416666666666645,0.017415702302007743,0.11560451392475005
362,4.433333333333312,0.015905951446525034,0.08581308791192593
363,4.449999999999978,0.014547887882829291,0.084196098613148
364,4.466666666666645,0.013426539109273928,0.044018123254219756
365,4.483333333333311,0.012476164752763268,0.09386402308953444
366,4.499999999999979,0.01169175984669532,0.05843994054930919
367,4.516666666666644,0.0110536908237312,0.05323752793775819
368,4.533333333333312,0.010544300517995238,0.07633644202070033
369,4.549999999999978,0.010111764810362156,0.01523921363378955
370,4.566666666666645,0.00972206784273088,0.047475356691962824
371,4.583333333333311,0.009455938247878402,0.07105681947336706
372,4.599999999999977,0.00917693218891364,0.033881874747251406
373,4.616666666666644,0.009188422430469106,0.09591096712239372
374,4.633333333333312,0.009302694296132702,0.03847623068718831
375,4.649999999999976,0.009526867750149264,0.02423022582990563
376,4.666666666666645,0.00986838204117474,0.10400510950996868
377,4.6833333333333105,0.010331111121827347,0.07024737294809552
378,4.699999999999978,0.01090924976026132,0.09163193539944313
379,4.716666666666644,0.011580885210842348,0.012784458166140263
380,4.733333333333311,0.012302396425264627,0.05029867848734215
381,4.749999999999977,0.013040057798095108,0.019932744610301346
382,4.766666666666644,0.01375875631275779,0.07763335953298252
383,4.78333333333331,0.014446891702747667,0.1007212709496305
384,4.799999999999978,0.015096153108483168,0.0586915218872376
385,4.816666666666643,0.0156940023344889,0.02216950701004027
386,4.833333333333311,0.016245522651620947,0.0385195289077894
387,4.8499999999999766,0.01679928445342448,0.06703778909040885
388,4.866666666666644,0.01737505498767164,0.05054984529095409
389,4.88333333333331,0.0181204113718608,0.03236973327205601
390,4.899999999999976,0.019033587276818326,0.03709918094532241
391,4.916666666666642,0.019970639491295936,0.03906122719821302
392,4.9333333333333105,0.02074138628625168,0.08385912851781094
393,4.949999999999976,0.021111052848654666,0.11592162902280766
394,4.966666666666644,0.021112069193101986,0.11375775911546941
395,4.9833333333333085,0.020665350292444727,0.02918050940719069
396,4.999999999999977,0.019932856436185555,0.1032523989896635
397,5.016666666666643,0.01901540556743102,0.026127275818096277
398,5.03333333333331,0.018058869882539637,0.11350301538085514
399,5.049999999999976,0.017125363876573842,0.0906419645653427
400,5.066666666666643,0.016172326663091947,0.10283789514537561
401,5.083333333333309,0.015272093379256828,0.042386297551869505
402,5.0999999999999766,0.014377044247257916,0.10593588197511383
403,5.116666666666641,0.013569579387075379,0.04237772570149551
404,5.13333333333331,0.012938043359667311,0.07108850793229546
405,5.149999999999976,0.012491246058805286,0.10963642327936736
406,5.166666666666642,0.01227021526391276,0.05252390088650753
407,5.183333333333309,0.012229573379522967,0.04574070796370117
408,5.199999999999976,0.012411790448933363,0.09220529615083256
409,5.216666666666642,0.012631955771594887,0.0816785225494727
410,5.2333333333333085,0.012861890526208767,0.07188229485121816
411,5.249999999999975,0.012952664129169731,0.02409502154099854
412,5.266666666666643,0.012832477224745792,0.08337890489259249
413,5.283333333333308,0.012455702351086588,0.02080144275609425
414,5.299999999999976,0.01199385158593986,0.08429739184168439
415,5.316666666666642,0.011501102142697736,0.10776647432227095
416,5.333333333333309,0.011128819379458171,0.051264321726549794
417,5.349999999999975,0.01097831551997038,0.08154179372979696
418,5.366666666666641,0.010927316390904133,0.08943273396775268
419,5.383333333333308,0.010806211169280888,0.039265954765806375
420,5.399999999999976,0.010614974257290192,0.04758947025979246
421,5.416666666666641,0.010271581326610123,0.026110149094807876
422,5.433333333333309,0.009834131065227129,0.031241968192985508
423,5.449999999999974,0.009297598301658177,0.06702955051376791
424,5.466666666666642,0.008697139372068055,0.04104820967065601
425,5.483333333333308,0.008024116887538398,0.051299642764440004
426,5.499999999999975,0.007315731922365474,0.020382663198439007
427,5.516666666666641,0.006565652453779356,0.09678895757674429
428,5.533333333333308,0.005844794880350924,0.059759725345220525
429,5.549999999999974,0.005177767365665529,0.024650537178989816
430,5.566666666666642,0.004587412844911594,0.04972397406604411
431,5.583333333333307,0.0040798944721002,0.04099962650614641
432,5.599999999999975,0.0036506665421485577,0.10364486796293348
433,5.61666666666664,0.00329037815035334,0.07087849639919612
434,5.633333333333308,0.0029886090930426146,0.08939116579903277
435,5.649999999999974,0.002735690107776864,0.023752795280553657
436,5.666666666666641,0.002523366843905612,0.07271133554887105
437,5.683333333333306,0.0023300631942332127,0.05737877312847629
438,5.699999999999974,0.002180374898760963,0.009108552783666846
439,5.71666666666664,0.002054958204967324,0.07030854971015259
440,5.733333333333308,0.0019505886000300875,0.02742925544908511
441,5.7499999999999725,0.0018648527274811324,0.08657362296315117
442,5.766666666666641,0.0017960239663209377,0.09429140025272574
443,5.783333333333307,0.001720481626512626,0.05803455152053702
444,5.799999999999974,0.0016830996415389443,0.0362323260556584
445,5.81666666666664,0.0016262300718450644,0.02642125372844058
446,5.833333333333307,0.001611919732637923,0.08347999814639187
447,5.849999999999973,0.0016048014922694148,0.06401208946896393
448,5.86666666666664,0.0016347432507004985,0.0638634796791788
449,5.883333333333305,0.0016857628276620254,0.028740443554091905
450,5.899999999999974,0.001761334740481444,0.028556548170348257
451,5.91666666666664,0.001865932288006437,0.0368212595215135
452,5.933333333333306,0.001989512518215736,0.011432613570233936
453,5.949999999999973,0.0021607489243893377,0.02252610142287861
454,5.96666666666664,0.002386736856454915,0.06384511167211483
455,5.983333333333306,0.0026530571609377643,0.0699097058166323
456,5.9999999999999725,0.002969667659174261,0.04508418178508705
457,6.016666666666639,0.0033068140847257966,0.013770139061926978
458,6.033333333333307,0.003620015633850385,0.07954653208314325
459,6.049999999999972,0.0038444166455045207,0.020214807395928736
460,6.06666666666664,0.003916571185462839,0.03398607889134341
461,6.0833333333333055,0.0038092320327282624,0.07152472457079527
462,6.099999999999973,0.0035494402458889464,0.08788744108101931
463,6.11666666666664,0.00320043214610638,0.004978651141980639
464,6.133333333333305,0.0028268467668079366,0.07248147824052714
465,6.149999999999972,0.002472937473226955,0.025983969958468845
466,6.16666666666664,0.002160175622001572,0.08452943691844837
467,6.183333333333305,0.001894251048772865,0.04933810055449538
468,6.199999999999973,0.001672608969388938,0.041572913540058154
469,6.216666666666638,0.0014894646029960984,0.06331665872830984
470,6.233333333333306,0.0013384345380275796,0.06963299084369011
471,6.249999999999972,0.0012136748094292323,0.08889908591433758
472,6.266666666666639,0.0011102474053009976,0.03232907775171962
473,6.283333333333305,0.0010241407634558619,0.059539744691306816
474,6.299999999999972,0.0009521598820936355,0.05993299903153821
475,6.316666666666638,0.0008917842772384375,0.02182859852791141
476,6.3333333333333055,0.0008410336313034932,0.0748450273972514
477,6.349999999999971,0.0007882098897912334,0.06686474187219103
478,6.36666666666664,0.0007525906554877921,0.036263341804205894
479,6.383333333333304,0.0007228641949372934,0.04608648852016809
480,6.399999999999972,0.0006982868399087982,0.06920000913455861
481,6.416666666666638,0.0006671157541095356,0.017672684434735905
482,6.433333333333305,0.000645005379493612,0.011133562115067497
483,6.449999999999973,0.0006333058086720105,0.09428115599799881
484,6.466666666666638,0.000625184442884534,0.030471966952502656
485,6.483333333333304,0.0006205035025779992,0.05841094966074938
486,6.499999999999972,0.0006192046745116873,0.09311383370730295
487,6.516666666666639,0.0006213057378856704,0.04252882297527014
488,6.533333333333305,0.0006039945868221229,0.03734071613869019
489,6.5499999999999705,0.0006137252238044462,0.08300628603097364
490,6.566666666666638,0.0006047776936573755,0.008004442575358517
491,6.5833333333333055,0.0006231581830360969,0.07248163505213108
492,6.599999999999971,0.0006337680871982241,0.07125755115374183
493,6.616666666666637,0.0006624848892488697,0.0880849632020957
494,6.633333333333304,0.0006973192371910539,0.009615494133953663
495,6.649999999999972,0.0007392569480711444,0.06186006279233216
496,6.666666666666638,0.0007895426603224253,0.01910356536312838
497,6.683333333333303,0.0008330084196076873,0.029427767131208597
498,6.69999999999997,0.0009054639619342336,0.022238123333011287
499,6.716666666666638,0.0009923357464075885,0.044836789186418806
500,6.733333333333304,0.0010968178118700965,0.024202650240627285
501,6.74999999999997,0.0012229540649686605,0.05136859630153404
502,6.766666666666636,0.0013758345184867965,0.04127156374099452
503,6.783333333333305,0.0015617780277680387,0.02174097522562799
504,6.7999999999999705,0.0017884101805828436,0.013803589262814598
505,6.816666666666636,0.002064429183181777,0.04683060174888396
506,6.833333333333304,0.002387968244156822,0.07867549497431205
507,6.849999999999971,0.002787075005635288,0.09915796322478466
508,6.866666666666637,0.0032330643719318663,0.0773416168548849
509,6.8833333333333035,0.0037448433409505576,0.006039375681516537
510,6.899999999999969,0.004266115855053602,0.046097461457942274
511,6.916666666666638,0.004733392359982105,0.07806769389441762
512,6.933333333333303,0.0050731049261991245,0.027670987768509604
513,6.949999999999969,0.005228483226228465,0.07482363580224312
514,6.966666666666637,0.005177871012632568,0.08123899111254584
515,6.983333333333304,0.004933801139556769,0.08763959802273057
516,6.99999999999997,0.004516681615965384,0.02142238280732058
517,7.016666666666636,0.004025914623300037,0.08773817440529472
518,7.033333333333303,0.0035069432009657746,0.05283304691948566
519,7.0499999999999705,0.003011562010941419,0.0464327252824427
520,7.066666666666636,0.0025693287122871486,0.021087520756170056
521,7.083333333333302,0.002180151797621449,0.005518639162491096
522,7.0999999999999694,0.0018631067214146704,0.03511065385599154
523,7.116666666666637,0.0016005279884154326,0.06263558203247062
524,7.1333333333333035,0.001383752803081267,0.024837384168368077
525,7.149999999999968,0.0012045262550681973,0.09911590878992671
526,7.166666666666636,0.0010557189196281143,0.019012342292723305
527,7.183333333333303,0.0009314598629566572,0.027824538713341913
528,7.199999999999969,0.0008270276372756256,0.041870985321227086
529,7.216666666666634,0.0007386662934833399,0.06728799294346474
530,7.233333333333302,0.000663398632862216,0.07616328639071791
531,7.249999999999972,0.0005988630824781945,0.09224236782975401
532,7.2666666666666355,0.0005431803012114177,0.045985709437151356
533,7.283333333333301,0.0004948475983603272,0.03880545173268148
534,7.299999999999968,0.00045265671581789455,0.039522778444956025
535,7.316666666666637,0.00041563027155241765,0.036557418349147525
536,7.333333333333303,0.0003829727316072356,0.008801725918456283
537,7.349999999999967,0.0003540325485166859,0.08684465089327713
538,7.366666666666635,0.0003282728337111797,0.030877967719610395
539,7.383333333333303,0.00030524854341540544,0.00456254467743439
540,7.399999999999968,0.0002845886426487827,0.08782395531127031
541,7.416666666666633,0.0002659820854651423,0.007910879386425715
542,7.433333333333301,0.00024916673278896844,0.07940114797356139
543,7.44999999999997,0.00023392054231395035,0.010778728770944471
544,7.466666666666634,0.0002200545248037094,0.09634394533190835
545,7.4833333333333,0.00020740708106580888,0.005982378568712616
546,7.499999999999968,0.00019583942400428853,0.0056958633095433074
547,7.5166666666666355,0.00018523185810550465,0.031061579059935174
548,7.533333333333301,0.0001754807401376867,0.08292270487080648
549,7.549999999999968,0.00016649598393723487,0.060577443984111794
550,7.566666666666634,0.00015819900201364986,0.05726689159531049
551,7.583333333333303,0.00015052099962416344,0.09626332562644373
552,7.599999999999967,0.00014340155465021373,0.08111515346418312
553,7.616666666666633,0.000136787430317109,0.04569290750956551
554,7.633333333333299,0.0001306315784814117,0.09106755646970781
555,7.649999999999968,0.00012489229957700896,0.019803021333298393
556,7.666666666666633,0.00010650950352080627,0.06579719703911381
557,7.683333333333299,0.00010176233346638824,0.08038186630171122
558,7.699999999999966,9.732407586281645e-05,0.09090506624221892
559,7.716666666666634,9.316862596969085e-05,0.04897089723751216
560,7.7333333333333,8.927256629278886e-05,0.022935319963214386
561,7.749999999999966,8.56148429229433e-05,0.04636224144789152
562,7.766666666666634,8.217648623838878e-05,0.007280443731825942
563,7.783333333333301,7.894036918914812e-05,0.008495599258638261
564,7.799999999999968,7.589099752037563e-05,0.05644568432413881
565,7.816666666666632,7.301432722262195e-05,0.04120697849113344
566,7.833333333333299,7.029760526128519e-05,0.030512176351782654
567,7.849999999999967,6.772923026716017e-05,0.0778464398803931
568,7.866666666666633,6.529863039051561e-05,0.0015680766565689575
569,7.883333333333299,6.299615595285945e-05,0.05332633581903208
570,7.899999999999967,6.0812984889811416e-05,0.08482273453171654
571,7.916666666666633,5.874103927838362e-05,0.0032446273762019107
572,7.933333333333299,5.677291149306076e-05,0.062116292943274226
573,7.949999999999965,5.490179874591324e-05,0.08442040506820496
574,7.966666666666634,5.312144494355774e-05,0.07516689349499696
575,7.9833333333333,5.1426088943718254e-05,0.027338756537680576
576,7.999999999999966,4.98104184211338e-05,0.016426973781625862
577,8.016666666666632,4.826952866034603e-05,0.05563780062926791
578,8.0333333333333,4.6798885684662046e-05,0.013486897435698596
579,8.049999999999969,4.53942932088713e-05,0.0069111592467258325
580,8.066666666666633,4.4051862970251115e-05,0.04549838779349733
581,8.083333333333298,4.2767988049800565e-05,0.012534499314918205
582,8.099999999999964,4.1539318844953935e-05,0.06481783181791115
583,8.116666666666633,4.036274139750162e-05,0.03999314798336396
584,8.133333333333299,3.9235357817086094e-05,0.06561250403964072
585,8.149999999999965,3.815446857233749e-05,0.09278489572488863
586,8.166666666666632,3.711755644916656e-05,0.07149030091853995
587,8.1833333333333,3.61222719995814e-05,0.0999902449823203
588,8.199999999999966,3.516642032512129e-05,0.07827493663038784
589,8.216666666666631,3.424794905708405e-05,0.020378032608375004
590,8.233333333333297,3.3364937411496084e-05,0.011812664901281102
591,8.249999999999966,3.2515586210577025e-05,0.07046309982581693
592,8.266666666666632,3.169820877454257e-05,0.09157882479314909
593,8.283333333333298,3.091122259820148e-05,0.04193416658757385
594,8.299999999999965,3.0153141736128785e-05,0.009790890411524585
595,8.316666666666633,2.9422569828415296e-05,0.0003137504328578474
596,8.333333333333298,2.871819370623216e-05,0.07076679873929936
597,8.349999999999964,2.8038777522851057e-05,0.0456701092227214
598,8.36666666666663,2.7383157361414957e-05,0.010454728339419204
599,8.383333333333299,2.6750236275772788e-05,0.0011284051960105607
600,8.399999999999965,2.6138979725131995e-05,0.0866336965739858
601,8.41666666666663,2.554841136723832e-05,0.07646460030576208
602,8.433333333333298,2.4977609178303214e-05,0.04744358893910104
603,8.449999999999966,2.442570187103044e-05,0.0831461690088301
604,8.466666666666631,2.3891865584884343e-05,0.07086347134430489
605,8.483333333333297,2.3375320825236138e-05,0.07801307162535605
606,8.499999999999964,2.287532963025233e-05,0.09658577087462375
607,8.516666666666632,2.2391192946387017e-05,0.08257142023998251
608,8.533333333333298,9.977292417469016e-06,0.08746372845026505
609,8.549999999999963,9.766995564215325e-06,0.09089118609650658
610,8.566666666666633,9.563269467577353e-06,0.023187631388885382
How to define expressions
For this reason, the input file has to be modified so that the expression can be evalutated and linked to the main peak. Peak 1 is the main peak, and all parameters (amplitude
, center
, fwhmg
, fwhml
) can be optimized.
"1": {
"pseudovoigt": {
"amplitude": {
"max": 2,
"min": 0,
"vary": true,
"value": 1
},
"center": {
"max": 2,
"min": -2,
"vary": true,
"value": 0
},
"fwhmg": {
"max": 0.4,
"min": 0.02,
"vary": true,
"value": 0.01
},
"fwhml": {
"max": 0.4,
"min": 0.01,
"vary": true,
"value": 0.01
}
}
},
The attributes amplitude
and center
of Peak 2 are linked to Peak 1. The keyword expr
is enough, but has to follow the correct notation:
- Name of the peak type like:
pseudovoigt
orgaussian
or ... - Name of the peak attribute like:
amplitude
orcenter
or ... - Number of the peak like:
1
or2
or ... - Optional, the attribute can be further extended by mathematical expression.
Peak 2 is linked to Peak 1 by the keyword expr
plus the mathematical operations:
\
: Division by factor of3
.+
: Addition by the value of1.73
.
"2": {
"pseudovoigt": {
"amplitude": {
"expr": "pseudovoigt_amplitude_1 / 3"
},
"center": {
"expr": "pseudovoigt_center_1 + 1.73"
},
"fwhmg": {
"max": 0.5,
"min": 0.02,
"vary": true,
"value": 0.01
},
"fwhml": {
"max": 0.5,
"min": 0.01,
"vary": true,
"value": 0.01
}
}
},
And peak 4 is linked to peak 2, which is actually linked to peak 1, by the value of 0.35
.
"4": {
"gaussian": {
"amplitude": {
"max": 2,
"min": 0,
"vary": true,
"value": 1
},
"center": {
"expr": "pseudovoigt_center_2 + 0.35"
},
"fwhmg": {
"max": 0.4,
"min": 0.02,
"vary": true,
"value": 0.01
}
}
}
}
}
Fit of a pseudo 2p3d-RIXS spectra with fixed conditions of the amplitude and center for peak-2.