1
$\begingroup$

as you can see below, I have developed a code that allows me to fit the present dataset via a Lorentzian. Now what I should do is to develop a sum of three Lorentzians based on this model so that this sum is the Lorentzian I have developed, exactly as it is clearly visible in the figure.

data = {{4370, 0.004`}, {4371.2`, 0.008`}, {4372.4`, 
   0.008`}, {4373.6`, 0.008`}, {4374.8`, 0.008`}, {4376, 
   0.008`}, {4377.2`, 0.008`}, {4378.4`, 0.008`}, {4379.6`, 
   0.008`}, {4380.8`, 0.008`}, {4382, 0.008`}, {4383.2`, 
   0.008`}, {4384.4`, 0.008`}, {4385.6`, 0.008`}, {4386.8`, 
   0.008`}, {4388, 0.008`}, {4389.2`, 0.008`}, {4390.4`, 
   0.008`}, {4391.6`, 0.008`}, {4392.8`, 0.008`}, {4394, 
   0.008`}, {4395.2`, 0.008`}, {4396.4`, 0.008`}, {4397.6`, 
   0.012`}, {4398.8`, 0.008`}, {4400, 0.008`}, {4401.2`, 
   0.012`}, {4402.4`, 0.012`}, {4403.6`, 0.008`}, {4404.8`, 
   0.012`}, {4406, 0.012`}, {4407.2`, 0.012`}, {4408.4`, 
   0.012`}, {4409.6`, 0.012`}, {4410.8`, 0.012`}, {4412, 
   0.012`}, {4413.2`, 0.012`}, {4414.4`, 0.012`}, {4415.6`, 
   0.012`}, {4416.8`, 0.016`}, {4418, 0.016`}, {4419.2`, 
   0.012`}, {4420.4`, 0.016`}, {4421.6`, 0.016`}, {4422.8`, 
   0.012`}, {4424, 0.012`}, {4425.2`, 0.016`}, {4426.4`, 
   0.016`}, {4427.6`, 0.016`}, {4428.8`, 0.016`}, {4430, 
   0.016`}, {4431.2`, 0.016`}, {4432.4`, 0.016`}, {4433.6`, 
   0.016`}, {4434.8`, 0.016`}, {4436, 0.02`}, {4437.2`, 
   0.02`}, {4438.4`, 0.02`}, {4439.6`, 0.02`}, {4440.8`, 
   0.02`}, {4442, 0.02`}, {4443.2`, 0.024`}, {4444.4`, 
   0.024`}, {4445.6`, 0.024`}, {4446.8`, 0.02`}, {4448, 
   0.024`}, {4449.2`, 0.02`}, {4450.4`, 0.024`}, {4451.6`, 
   0.024`}, {4452.8`, 0.024`}, {4454, 0.024`}, {4455.2`, 
   0.024`}, {4456.4`, 0.024`}, {4457.6`, 0.024`}, {4458.8`, 
   0.024`}, {4460, 0.024`}, {4461.2`, 0.024`}, {4462.4`, 
   0.024`}, {4463.6`, 0.024`}, {4464.8`, 0.024`}, {4466, 
   0.024`}, {4467.2`, 0.024`}, {4468.4`, 0.024`}, {4469.6`, 
   0.028`}, {4470.8`, 0.028`}, {4472, 0.028`}, {4473.2`, 
   0.028`}, {4474.4`, 0.028`}, {4475.6`, 0.028`}, {4476.8`, 
   0.028`}, {4478, 0.024`}, {4479.2`, 0.028`}, {4480.4`, 
   0.028`}, {4481.6`, 0.028`}, {4482.8`, 0.028`}, {4484, 
   0.028`}, {4485.2`, 0.028`}, {4486.4`, 0.028`}, {4487.6`, 
   0.028`}, {4488.8`, 0.032`}, {4490, 0.028`}, {4491.2`, 
   0.028`}, {4492.4`, 0.032`}, {4493.6`, 0.032`}, {4494.8`, 
   0.032`}, {4496, 0.028`}, {4497.2`, 0.032`}, {4498.4`, 
   0.032`}, {4499.6`, 0.036`}, {4500.8`, 0.032`}, {4502, 
   0.032`}, {4503.2`, 0.032`}, {4504.4`, 0.032`}, {4505.6`, 
   0.032`}, {4506.8`, 0.032`}, {4508, 0.036`}, {4509.2`, 
   0.036`}, {4510.4`, 0.036`}, {4511.6`, 0.036`}, {4512.8`, 
   0.036`}, {4514, 0.036`}, {4515.2`, 0.036`}, {4516.4`, 
   0.036`}, {4517.6`, 0.036`}, {4518.8`, 0.036`}, {4520, 
   0.036`}, {4521.2`, 0.036`}, {4522.4`, 0.036`}, {4523.6`, 
   0.036`}, {4524.8`, 0.036`}, {4526, 0.04`}, {4527.2`, 
   0.04`}, {4528.4`, 0.04`}, {4529.6`, 0.04`}, {4530.8`, 
   0.04`}, {4532, 0.04`}, {4533.2`, 0.04`}, {4534.4`, 
   0.04`}, {4535.6`, 0.04`}, {4536.8`, 0.044`}, {4538, 
   0.04`}, {4539.2`, 0.04`}, {4540.4`, 0.04`}, {4541.6`, 
   0.044`}, {4542.8`, 0.04`}, {4544, 0.04`}, {4545.2`, 
   0.04`}, {4546.4`, 0.044`}, {4547.6`, 0.044`}, {4548.8`, 
   0.044`}, {4550, 0.048`}, {4551.2`, 0.048`}, {4552.4`, 
   0.048`}, {4553.6`, 0.048`}, {4554.8`, 0.048`}, {4556, 
   0.048`}, {4557.2`, 0.048`}, {4558.4`, 0.048`}, {4559.6`, 
   0.048`}, {4560.8`, 0.048`}, {4562, 0.048`}, {4563.2`, 
   0.052`}, {4564.4`, 0.048`}, {4565.6`, 0.052`}, {4566.8`, 
   0.052`}, {4568, 0.048`}, {4569.2`, 0.052`}, {4570.4`, 
   0.052`}, {4571.6`, 0.052`}, {4572.8`, 0.052`}, {4574, 
   0.056`}, {4575.2`, 0.056`}, {4576.4`, 0.056`}, {4577.6`, 
   0.056`}, {4578.8`, 0.052`}, {4580, 0.056`}, {4581.2`, 
   0.056`}, {4582.4`, 0.056`}, {4583.6`, 0.056`}, {4584.8`, 
   0.056`}, {4586, 0.06`}, {4587.2`, 0.056`}, {4588.4`, 
   0.06`}, {4589.6`, 0.06`}, {4590.8`, 0.06`}, {4592, 
   0.06`}, {4593.2`, 0.06`}, {4594.4`, 0.06`}, {4595.6`, 
   0.06`}, {4596.8`, 0.06`}, {4598, 0.064`}, {4599.2`, 
   0.064`}, {4600.4`, 0.068`}, {4601.6`, 0.064`}, {4602.8`, 
   0.064`}, {4604, 0.068`}, {4605.2`, 0.068`}, {4606.4`, 
   0.068`}, {4607.6`, 0.068`}, {4608.8`, 0.068`}, {4610, 
   0.072`}, {4611.2`, 0.072`}, {4612.4`, 0.072`}, {4613.6`, 
   0.072`}, {4614.8`, 0.072`}, {4616, 0.072`}, {4617.2`, 
   0.072`}, {4618.4`, 0.072`}, {4619.6`, 0.072`}, {4620.8`, 
   0.072`}, {4622, 0.076`}, {4623.2`, 0.076`}, {4624.4`, 
   0.076`}, {4625.6`, 0.076`}, {4626.8`, 0.076`}, {4628, 
   0.076`}, {4629.2`, 0.08`}, {4630.4`, 0.08`}, {4631.6`, 
   0.084`}, {4632.8`, 0.084`}, {4634, 0.084`}, {4635.2`, 
   0.088`}, {4636.4`, 0.084`}, {4637.6`, 0.088`}, {4638.8`, 
   0.088`}, {4640, 0.088`}, {4641.2`, 0.088`}, {4642.4`, 
   0.088`}, {4643.6`, 0.092`}, {4644.8`, 0.092`}, {4646, 
   0.092`}, {4647.2`, 0.092`}, {4648.4`, 0.096`}, {4649.6`, 
   0.096`}, {4650.8`, 0.1`}, {4652, 0.1`}, {4653.2`, 0.1`}, {4654.4`, 
   0.1`}, {4655.6`, 0.1`}, {4656.8`, 0.104`}, {4658, 
   0.104`}, {4659.2`, 0.104`}, {4660.4`, 0.104`}, {4661.6`, 
   0.104`}, {4662.8`, 0.104`}, {4664, 0.108`}, {4665.2`, 
   0.108`}, {4666.4`, 0.108`}, {4667.6`, 0.112`}, {4668.8`, 
   0.112`}, {4670, 0.112`}, {4671.2`, 0.112`}, {4672.4`, 
   0.116`}, {4673.6`, 0.12`}, {4674.8`, 0.12`}, {4676, 
   0.12`}, {4677.2`, 0.12`}, {4678.4`, 0.12`}, {4679.6`, 
   0.12`}, {4680.8`, 0.124`}, {4682, 0.124`}, {4683.2`, 
   0.124`}, {4684.4`, 0.124`}, {4685.6`, 0.12`}, {4686.8`, 
   0.124`}, {4688, 0.124`}, {4689.2`, 0.128`}, {4690.4`, 
   0.132`}, {4691.6`, 0.132`}, {4692.8`, 0.132`}, {4694, 
   0.136`}, {4695.2`, 0.136`}, {4696.4`, 0.136`}, {4697.6`, 
   0.14`}, {4698.8`, 0.136`}, {4700, 0.14`}, {4701.2`, 
   0.14`}, {4702.4`, 0.144`}, {4703.6`, 0.144`}, {4704.8`, 
   0.144`}, {4706, 0.148`}, {4707.2`, 0.152`}, {4708.4`, 
   0.148`}, {4709.6`, 0.152`}, {4710.8`, 0.152`}, {4712, 
   0.152`}, {4713.2`, 0.152`}, {4714.4`, 0.156`}, {4715.6`, 
   0.156`}, {4716.8`, 0.156`}, {4718, 0.16`}, {4719.2`, 
   0.156`}, {4720.4`, 0.156`}, {4721.6`, 0.16`}, {4722.8`, 
   0.16`}, {4724, 0.164`}, {4725.2`, 0.164`}, {4726.4`, 
   0.168`}, {4727.6`, 0.168`}, {4728.8`, 0.172`}, {4730, 
   0.172`}, {4731.2`, 0.172`}, {4732.4`, 0.172`}, {4733.6`, 
   0.172`}, {4734.8`, 0.172`}, {4736, 0.176`}, {4737.2`, 
   0.176`}, {4738.4`, 0.18`}, {4739.6`, 0.18`}, {4740.8`, 
   0.184`}, {4742, 0.184`}, {4743.2`, 0.184`}, {4744.4`, 
   0.184`}, {4745.6`, 0.184`}, {4746.8`, 0.184`}, {4748, 
   0.188`}, {4749.2`, 0.188`}, {4750.4`, 0.188`}, {4751.6`, 
   0.188`}, {4752.8`, 0.192`}, {4754, 0.192`}, {4755.2`, 
   0.192`}, {4756.4`, 0.196`}, {4757.6`, 0.196`}, {4758.8`, 
   0.196`}, {4760, 0.2`}, {4761.2`, 0.2`}, {4762.4`, 0.2`}, {4763.6`, 
   0.2`}, {4764.8`, 0.204`}, {4766, 0.204`}, {4767.2`, 
   0.204`}, {4768.4`, 0.204`}, {4769.6`, 0.208`}, {4770.8`, 
   0.208`}, {4772, 0.204`}, {4773.2`, 0.208`}, {4774.4`, 
   0.212`}, {4775.6`, 0.212`}, {4776.8`, 0.212`}, {4778, 
   0.216`}, {4779.2`, 0.216`}, {4780.4`, 0.216`}, {4781.6`, 
   0.22`}, {4782.8`, 0.22`}, {4784, 0.22`}, {4785.2`, 
   0.22`}, {4786.4`, 0.22`}, {4787.6`, 0.224`}, {4788.8`, 
   0.224`}, {4790, 0.224`}, {4791.2`, 0.228`}, {4792.4`, 
   0.228`}, {4793.6`, 0.228`}, {4794.8`, 0.228`}, {4796, 
   0.228`}, {4797.2`, 0.232`}, {4798.4`, 0.228`}, {4799.6`, 
   0.232`}, {4800.8`, 0.236`}, {4802, 0.232`}, {4803.2`, 
   0.236`}, {4804.4`, 0.236`}, {4805.6`, 0.236`}, {4806.8`, 
   0.236`}, {4808, 0.24`}, {4809.2`, 0.24`}, {4810.4`, 
   0.24`}, {4811.6`, 0.244`}, {4812.8`, 0.244`}, {4814, 
   0.244`}, {4815.2`, 0.248`}, {4816.4`, 0.248`}, {4817.6`, 
   0.248`}, {4818.8`, 0.248`}, {4820, 0.252`}, {4821.2`, 
   0.252`}, {4822.4`, 0.252`}, {4823.6`, 0.252`}, {4824.8`, 
   0.252`}, {4826, 0.256`}, {4827.2`, 0.256`}, {4828.4`, 
   0.256`}, {4829.6`, 0.256`}, {4830.8`, 0.26`}, {4832, 
   0.26`}, {4833.2`, 0.264`}, {4834.4`, 0.264`}, {4835.6`, 
   0.264`}, {4836.8`, 0.264`}, {4838, 0.268`}, {4839.2`, 
   0.268`}, {4840.4`, 0.268`}, {4841.6`, 0.272`}, {4842.8`, 
   0.276`}, {4844, 0.276`}, {4845.2`, 0.276`}, {4846.4`, 
   0.276`}, {4847.6`, 0.276`}, {4848.8`, 0.276`}, {4850, 
   0.28`}, {4851.2`, 0.276`}, {4852.4`, 0.28`}, {4853.6`, 
   0.28`}, {4854.8`, 0.28`}, {4856, 0.284`}, {4857.2`, 
   0.28`}, {4858.4`, 0.284`}, {4859.6`, 0.284`}, {4860.8`, 
   0.284`}, {4862, 0.288`}, {4863.2`, 0.284`}, {4864.4`, 
   0.284`}, {4865.6`, 0.288`}, {4866.8`, 0.288`}, {4868, 
   0.288`}, {4869.2`, 0.292`}, {4870.4`, 0.292`}, {4871.6`, 
   0.292`}, {4872.8`, 0.292`}, {4874, 0.292`}, {4875.2`, 
   0.296`}, {4876.4`, 0.3`}, {4877.6`, 0.3`}, {4878.8`, 0.3`}, {4880, 
   0.3`}, {4881.2`, 0.3`}, {4882.4`, 0.3`}, {4883.6`, 0.3`}, {4884.8`,
    0.304`}, {4886, 0.304`}, {4887.2`, 0.304`}, {4888.4`, 
   0.308`}, {4889.6`, 0.304`}, {4890.8`, 0.308`}, {4892, 
   0.308`}, {4893.2`, 0.308`}, {4894.4`, 0.308`}, {4895.6`, 
   0.308`}, {4896.8`, 0.308`}, {4898, 0.312`}, {4899.2`, 
   0.312`}, {4900.4`, 0.312`}, {4901.6`, 0.308`}, {4902.8`, 
   0.312`}, {4904, 0.312`}, {4905.2`, 0.312`}, {4906.4`, 
   0.312`}, {4907.6`, 0.316`}, {4908.8`, 0.316`}, {4910, 
   0.316`}, {4911.2`, 0.316`}, {4912.4`, 0.316`}, {4913.6`, 
   0.32`}, {4914.8`, 0.316`}, {4916, 0.316`}, {4917.2`, 
   0.32`}, {4918.4`, 0.32`}, {4919.6`, 0.32`}, {4920.8`, 
   0.32`}, {4922, 0.32`}, {4923.2`, 0.32`}, {4924.4`, 
   0.32`}, {4925.6`, 0.32`}, {4926.8`, 0.32`}, {4928, 
   0.32`}, {4929.2`, 0.324`}, {4930.4`, 0.32`}, {4931.6`, 
   0.324`}, {4932.8`, 0.324`}, {4934, 0.324`}, {4935.2`, 
   0.328`}, {4936.4`, 0.328`}, {4937.6`, 0.324`}, {4938.8`, 
   0.328`}, {4940, 0.328`}, {4941.2`, 0.328`}, {4942.4`, 
   0.328`}, {4943.6`, 0.328`}, {4944.8`, 0.328`}, {4946, 
   0.328`}, {4947.2`, 0.324`}, {4948.4`, 0.328`}, {4949.6`, 
   0.328`}, {4950.8`, 0.328`}, {4952, 0.328`}, {4953.2`, 
   0.332`}, {4954.4`, 0.328`}, {4955.6`, 0.328`}, {4956.8`, 
   0.332`}, {4958, 0.328`}, {4959.2`, 0.328`}, {4960.4`, 
   0.332`}, {4961.6`, 0.328`}, {4962.8`, 0.328`}, {4964, 
   0.328`}, {4965.2`, 0.332`}, {4966.4`, 0.328`}, {4967.6`, 
   0.328`}, {4968.8`, 0.328`}, {4970, 0.328`}, {4971.2`, 
   0.328`}, {4972.4`, 0.328`}, {4973.6`, 0.324`}, {4974.8`, 
   0.328`}, {4976, 0.328`}, {4977.2`, 0.328`}, {4978.4`, 
   0.328`}, {4979.6`, 0.328`}, {4980.8`, 0.328`}, {4982, 
   0.328`}, {4983.2`, 0.324`}, {4984.4`, 0.324`}, {4985.6`, 
   0.324`}, {4986.8`, 0.324`}, {4988, 0.324`}, {4989.2`, 
   0.324`}, {4990.4`, 0.324`}, {4991.6`, 0.324`}, {4992.8`, 
   0.324`}, {4994, 0.316`}, {4995.2`, 0.316`}, {4996.4`, 
   0.316`}, {4997.6`, 0.316`}, {4998.8`, 0.316`}, {5000, 
   0.316`}, {5001.2`, 0.316`}, {5002.4`, 0.316`}, {5003.6`, 
   0.312`}, {5004.8`, 0.312`}, {5006, 0.312`}, {5007.2`, 
   0.312`}, {5008.4`, 0.312`}, {5009.6`, 0.312`}, {5010.8`, 
   0.312`}, {5012, 0.308`}, {5013.2`, 0.312`}, {5014.4`, 
   0.308`}, {5015.6`, 0.308`}, {5016.8`, 0.308`}, {5018, 
   0.304`}, {5019.2`, 0.308`}, {5020.4`, 0.304`}, {5021.6`, 
   0.308`}, {5022.8`, 0.308`}, {5024, 0.3`}, {5025.2`, 
   0.304`}, {5026.4`, 0.304`}, {5027.6`, 0.3`}, {5028.8`, 
   0.3`}, {5030, 0.304`}, {5031.2`, 0.3`}, {5032.4`, 0.3`}, {5033.6`, 
   0.3`}, {5034.8`, 0.296`}, {5036, 0.296`}, {5037.2`, 
   0.296`}, {5038.4`, 0.296`}, {5039.6`, 0.296`}, {5040.8`, 
   0.296`}, {5042, 0.296`}, {5043.2`, 0.292`}, {5044.4`, 
   0.292`}, {5045.6`, 0.288`}, {5046.8`, 0.288`}, {5048, 
   0.288`}, {5049.2`, 0.288`}, {5050.4`, 0.288`}, {5051.6`, 
   0.288`}, {5052.8`, 0.284`}, {5054, 0.284`}, {5055.2`, 
   0.284`}, {5056.4`, 0.284`}, {5057.6`, 0.284`}, {5058.8`, 
   0.284`}, {5060, 0.28`}, {5061.2`, 0.284`}, {5062.4`, 
   0.28`}, {5063.6`, 0.28`}, {5064.8`, 0.28`}, {5066, 
   0.276`}, {5067.2`, 0.276`}, {5068.4`, 0.276`}, {5069.6`, 
   0.276`}, {5070.8`, 0.276`}, {5072, 0.272`}, {5073.2`, 
   0.268`}, {5074.4`, 0.268`}, {5075.6`, 0.268`}, {5076.8`, 
   0.268`}, {5078, 0.268`}, {5079.2`, 0.264`}, {5080.4`, 
   0.26`}, {5081.6`, 0.264`}, {5082.8`, 0.26`}, {5084, 
   0.26`}, {5085.2`, 0.26`}, {5086.4`, 0.26`}, {5087.6`, 
   0.26`}, {5088.8`, 0.256`}, {5090, 0.256`}, {5091.2`, 
   0.256`}, {5092.4`, 0.252`}, {5093.6`, 0.252`}, {5094.8`, 
   0.252`}, {5096, 0.252`}, {5097.2`, 0.252`}, {5098.4`, 
   0.252`}, {5099.6`, 0.252`}, {5100.8`, 0.252`}, {5102, 
   0.248`}, {5103.2`, 0.248`}, {5104.4`, 0.244`}, {5105.6`, 
   0.244`}, {5106.8`, 0.244`}, {5108, 0.244`}, {5109.2`, 
   0.244`}, {5110.4`, 0.24`}, {5111.6`, 0.24`}, {5112.8`, 
   0.236`}, {5114, 0.24`}, {5115.2`, 0.236`}, {5116.4`, 
   0.236`}, {5117.6`, 0.232`}, {5118.8`, 0.232`}, {5120, 
   0.232`}, {5121.2`, 0.232`}, {5122.4`, 0.232`}, {5123.6`, 
   0.228`}, {5124.8`, 0.228`}, {5126, 0.228`}, {5127.2`, 
   0.228`}, {5128.4`, 0.224`}, {5129.6`, 0.224`}, {5130.8`, 
   0.224`}, {5132, 0.224`}, {5133.2`, 0.22`}, {5134.4`, 
   0.22`}, {5135.6`, 0.22`}, {5136.8`, 0.22`}, {5138, 
   0.22`}, {5139.2`, 0.216`}, {5140.4`, 0.216`}, {5141.6`, 
   0.216`}, {5142.8`, 0.212`}, {5144, 0.212`}, {5145.2`, 
   0.212`}, {5146.4`, 0.212`}, {5147.6`, 0.208`}, {5148.8`, 
   0.208`}, {5150, 0.208`}, {5151.2`, 0.204`}, {5152.4`, 
   0.204`}, {5153.6`, 0.204`}, {5154.8`, 0.204`}, {5156, 
   0.2`}, {5157.2`, 0.204`}, {5158.4`, 0.2`}, {5159.6`, 
   0.2`}, {5160.8`, 0.196`}, {5162, 0.196`}, {5163.2`, 
   0.196`}, {5164.4`, 0.192`}, {5165.6`, 0.192`}, {5166.8`, 
   0.192`}, {5168, 0.188`}, {5169.2`, 0.192`}, {5170.4`, 
   0.188`}, {5171.6`, 0.188`}, {5172.8`, 0.188`}, {5174, 
   0.188`}, {5175.2`, 0.184`}, {5176.4`, 0.184`}, {5177.6`, 
   0.184`}, {5178.8`, 0.18`}, {5180, 0.18`}, {5181.2`, 
   0.18`}, {5182.4`, 0.18`}, {5183.6`, 0.18`}, {5184.8`, 
   0.176`}, {5186, 0.176`}, {5187.2`, 0.176`}, {5188.4`, 
   0.172`}, {5189.6`, 0.172`}, {5190.8`, 0.172`}, {5192, 
   0.168`}, {5193.2`, 0.168`}, {5194.4`, 0.172`}, {5195.6`, 
   0.164`}, {5196.8`, 0.168`}, {5198, 0.164`}, {5199.2`, 
   0.164`}, {5200.4`, 0.16`}, {5201.6`, 0.16`}, {5202.8`, 
   0.16`}, {5204, 0.16`}, {5205.2`, 0.16`}, {5206.4`, 
   0.156`}, {5207.6`, 0.156`}, {5208.8`, 0.152`}, {5210, 
   0.152`}, {5211.2`, 0.152`}, {5212.4`, 0.148`}, {5213.6`, 
   0.148`}, {5214.8`, 0.148`}, {5216, 0.148`}, {5217.2`, 
   0.148`}, {5218.4`, 0.148`}, {5219.6`, 0.148`}, {5220.8`, 
   0.144`}, {5222, 0.14`}, {5223.2`, 0.14`}, {5224.4`, 
   0.14`}, {5225.6`, 0.136`}, {5226.8`, 0.136`}, {5228, 
   0.136`}, {5229.2`, 0.136`}, {5230.4`, 0.132`}, {5231.6`, 
   0.132`}, {5232.8`, 0.132`}, {5234, 0.128`}, {5235.2`, 
   0.128`}, {5236.4`, 0.124`}, {5237.6`, 0.128`}, {5238.8`, 
   0.124`}, {5240, 0.124`}, {5241.2`, 0.124`}, {5242.4`, 
   0.124`}, {5243.6`, 0.12`}, {5244.8`, 0.12`}, {5246, 
   0.12`}, {5247.2`, 0.12`}, {5248.4`, 0.12`}, {5249.6`, 
   0.12`}, {5250.8`, 0.12`}, {5252, 0.116`}, {5253.2`, 
   0.12`}, {5254.4`, 0.112`}, {5255.6`, 0.112`}, {5256.8`, 
   0.112`}, {5258, 0.112`}, {5259.2`, 0.108`}, {5260.4`, 
   0.108`}, {5261.6`, 0.108`}, {5262.8`, 0.108`}, {5264, 
   0.108`}, {5265.2`, 0.108`}, {5266.4`, 0.104`}, {5267.6`, 
   0.104`}, {5268.8`, 0.1`}, {5270, 0.104`}, {5271.2`, 
   0.1`}, {5272.4`, 0.1`}, {5273.6`, 0.1`}, {5274.8`, 0.096`}, {5276, 
   0.096`}, {5277.2`, 0.096`}, {5278.4`, 0.092`}, {5279.6`, 
   0.092`}, {5280.8`, 0.092`}, {5282, 0.092`}, {5283.2`, 
   0.088`}, {5284.4`, 0.088`}, {5285.6`, 0.088`}, {5286.8`, 
   0.088`}, {5288, 0.088`}, {5289.2`, 0.088`}, {5290.4`, 
   0.088`}, {5291.6`, 0.084`}, {5292.8`, 0.084`}, {5294, 
   0.084`}, {5295.2`, 0.084`}, {5296.4`, 0.08`}, {5297.6`, 
   0.08`}, {5298.8`, 0.08`}, {5300, 0.076`}, {5301.2`, 
   0.08`}, {5302.4`, 0.076`}, {5303.6`, 0.076`}, {5304.8`, 
   0.072`}, {5306, 0.072`}, {5307.2`, 0.072`}, {5308.4`, 
   0.072`}, {5309.6`, 0.072`}, {5310.8`, 0.072`}, {5312, 
   0.072`}, {5313.2`, 0.068`}, {5314.4`, 0.072`}, {5315.6`, 
   0.068`}, {5316.8`, 0.068`}, {5318, 0.068`}, {5319.2`, 
   0.068`}, {5320.4`, 0.068`}, {5321.6`, 0.068`}, {5322.8`, 
   0.068`}, {5324, 0.068`}, {5325.2`, 0.064`}, {5326.4`, 
   0.064`}, {5327.6`, 0.064`}, {5328.8`, 0.06`}, {5330, 
   0.06`}, {5331.2`, 0.06`}, {5332.4`, 0.06`}, {5333.6`, 
   0.06`}, {5334.8`, 0.06`}, {5336, 0.06`}, {5337.2`, 
   0.06`}, {5338.4`, 0.06`}, {5339.6`, 0.06`}, {5340.8`, 
   0.056`}, {5342, 0.056`}, {5343.2`, 0.056`}, {5344.4`, 
   0.056`}, {5345.6`, 0.056`}, {5346.8`, 0.056`}, {5348, 
   0.056`}, {5349.2`, 0.052`}, {5350.4`, 0.052`}, {5351.6`, 
   0.052`}, {5352.8`, 0.056`}, {5354, 0.052`}, {5355.2`, 
   0.052`}, {5356.4`, 0.048`}, {5357.6`, 0.048`}, {5358.8`, 
   0.052`}, {5360, 0.052`}, {5361.2`, 0.048`}, {5362.4`, 
   0.048`}, {5363.6`, 0.048`}, {5364.8`, 0.048`}, {5366, 
   0.048`}, {5367.2`, 0.048`}, {5368.4`, 0.048`}, {5369.6`, 
   0.048`}, {5370.8`, 0.044`}, {5372, 0.048`}, {5373.2`, 
   0.044`}, {5374.4`, 0.04`}, {5375.6`, 0.044`}, {5376.8`, 
   0.044`}, {5378, 0.044`}, {5379.2`, 0.04`}, {5380.4`, 
   0.044`}, {5381.6`, 0.04`}, {5382.8`, 0.04`}, {5384, 
   0.04`}, {5385.2`, 0.04`}, {5386.4`, 0.04`}, {5387.6`, 
   0.04`}, {5388.8`, 0.04`}, {5390, 0.04`}, {5391.2`, 
   0.04`}, {5392.4`, 0.04`}, {5393.6`, 0.04`}, {5394.8`, 
   0.036`}, {5396, 0.036`}, {5397.2`, 0.036`}, {5398.4`, 
   0.036`}, {5399.6`, 0.036`}, {5400.8`, 0.036`}, {5402, 
   0.036`}, {5403.2`, 0.036`}, {5404.4`, 0.036`}, {5405.6`, 
   0.036`}, {5406.8`, 0.036`}, {5408, 0.036`}, {5409.2`, 
   0.032`}, {5410.4`, 0.032`}, {5411.6`, 0.036`}, {5412.8`, 
   0.036`}, {5414, 0.036`}, {5415.2`, 0.036`}, {5416.4`, 
   0.032`}, {5417.6`, 0.036`}, {5418.8`, 0.032`}, {5420, 
   0.032`}, {5421.2`, 0.032`}, {5422.4`, 0.032`}, {5423.6`, 
   0.028`}, {5424.8`, 0.032`}, {5426, 0.032`}, {5427.2`, 
   0.028`}, {5428.4`, 0.028`}, {5429.6`, 0.032`}, {5430.8`, 
   0.028`}, {5432, 0.028`}, {5433.2`, 0.028`}, {5434.4`, 
   0.028`}, {5435.6`, 0.028`}, {5436.8`, 0.028`}, {5438, 
   0.028`}, {5439.2`, 0.028`}, {5440.4`, 0.028`}, {5441.6`, 
   0.028`}, {5442.8`, 0.028`}, {5444, 0.024`}, {5445.2`, 
   0.028`}, {5446.4`, 0.024`}, {5447.6`, 0.024`}, {5448.8`, 
   0.024`}, {5450, 0.024`}, {5451.2`, 0.024`}, {5452.4`, 
   0.024`}, {5453.6`, 0.024`}, {5454.8`, 0.024`}, {5456, 
   0.024`}, {5457.2`, 0.024`}, {5458.4`, 0.024`}, {5459.6`, 
   0.024`}, {5460.8`, 0.024`}, {5462, 0.024`}, {5463.2`, 
   0.024`}, {5464.4`, 0.024`}, {5465.6`, 0.024`}, {5466.8`, 
   0.024`}, {5468, 0.024`}, {5469.2`, 0.024`}, {5470.4`, 
   0.024`}, {5471.6`, 0.024`}, {5472.8`, 0.024`}, {5474, 
   0.024`}, {5475.2`, 0.024`}, {5476.4`, 0.024`}, {5477.6`, 
   0.02`}, {5478.8`, 0.024`}, {5480, 0.02`}, {5481.2`, 
   0.02`}, {5482.4`, 0.02`}, {5483.6`, 0.02`}, {5484.8`, 
   0.02`}, {5486, 0.02`}, {5487.2`, 0.02`}, {5488.4`, 
   0.02`}, {5489.6`, 0.016`}, {5490.8`, 0.016`}, {5492, 
   0.016`}, {5493.2`, 0.016`}, {5494.4`, 0.016`}, {5495.6`, 
   0.016`}, {5496.8`, 0.016`}, {5498, 0.016`}, {5499.2`, 
   0.016`}, {5500.4`, 0.016`}, {5501.6`, 0.016`}, {5502.8`, 
   0.016`}, {5504, 0.016`}, {5505.2`, 0.016`}, {5506.4`, 
   0.016`}, {5507.6`, 0.008`}, {5508.8`, 0.012`}, {5510, 
   0.012`}, {5511.2`, 0.012`}, {5512.4`, 0.012`}, {5513.6`, 
   0.012`}, {5514.8`, 0.008`}, {5516, 0.012`}, {5517.2`, 
   0.008`}, {5518.4`, 0.012`}, {5519.6`, 0.008`}, {5520.8`, 
   0.012`}, {5522, 0.008`}, {5523.2`, 0.008`}, {5524.4`, 
   0.012`}, {5525.6`, 0.008`}, {5526.8`, 0.008`}, {5528, 
   0.008`}, {5529.2`, 0.008`}, {5530.4`, 0.008`}, {5531.6`, 
   0.008`}, {5532.8`, 0.008`}, {5534, 0.008`}, {5535.2`, 
   0.008`}, {5536.4`, 0.008`}, {5537.6`, 0.008`}, {5538.8`, 
   0.008`}, {5540, 0.008`}, {5541.2`, 0.008`}, {5542.4`, 
   0.008`}, {5543.6`, 0.008`}, {5544.8`, 0.008`}, {5546, 
   0.004`}, {5547.2`, 0.008`}, {5548.4`, 0.008`}, {5549.6`, 
   0.004`}, {5550.8`, 0.004`}, {5552, 0.008`}, {5553.2`, 
   0.008`}, {5554.4`, 0.004`}, {5555.6`, 0.004`}, {5556.8`, 
   0.004`}, {5558, 0.004`}, {5559.2`, 0.004`}, {5560.4`, 
   0.004`}, {5561.6`, 0.008`}, {5562.8`, 0.004`}, {5564, 
   0.004`}, {5565.2`, 0.004`}, {5566.4`, 0.004`}, {5567.6`, 
   0.004`}, {5568.8`, 0.004`}, {5570, 0.004`}, {5571.2`, 0}, {5572.4`,
    0.004`}, {5573.6`, 0.004`}}
ListPlot[data, PlotTheme -> "Detailed"]
model = a/((b - t)^2 + d) + c;
result = NonlinearModelFit[data, {model}, {a, {b, 4956}, c, d}, t]
Show[ListPlot[data], 
 Plot[result[t], {t, 4370, 5600}, PlotRange -> Full]]
max = NMaximize[result[t], t][[1]] 
min = NMinimize[result[t], t][[1]] 
minmax = data[[All, 1]] // MinMax
fwhm = t /. NSolve[{result[t] == (max + min)/2, 4370 < t < 5600}, t] //
    Differences // First
max1 = FindMaximum[result[t], t] // First
min1 = FindMinimum[{result[t], 4370 < t < 5600}, t] // First
middle = max1 + min1/2
t1t2 = NSolve[{result[t] == (max1 + min1)/2, 4370 < t < 5600}, t]
fwhm1 = t /. 
    NSolve[{result[t] == (max1 + min1)/2, 4370 < t < 5600}, t] // 
   Differences // First

To be clear, we are talking about a D2 transition of the cesium atom.

enter image description here

I have already tried several times to create a model with the sum of three Lorentzians of the type a1,a3,b1,b2,b3,c1,..., but I have not been able to obtain very interesting results.
Would any of you be able to help me?

$\endgroup$
4
  • $\begingroup$ Does this answer on multi-gaussian peak fitting help? $\endgroup$ Commented Jul 12, 2022 at 20:37
  • $\begingroup$ Not really, because in my case I don't have multi-peaks, but I need a model of a sum of lorentzians $\endgroup$ Commented Jul 12, 2022 at 20:53
  • $\begingroup$ So devise a model that is a sum of three Lorentzians and use the same techniques you have used so far. Please try that for yourself and report on what didn't work for you. Have you seen this Q&A (A strategy to create good initial guess for Lorentzian model fit) that stemmed from your question you deleted this morning? $\endgroup$
    – MarcoB
    Commented Jul 12, 2022 at 22:03
  • $\begingroup$ Are we going to be co-authors on that paper now? 😉 $\endgroup$
    – rhermans
    Commented Jul 13, 2022 at 7:58

1 Answer 1

4
$\begingroup$

Preferably you should have a more detailed model (e.g., amount of expected separation of the Lorentzians).

{tmin, tmax} = MinMax[data[[All, 1]]]

(* {4370, 5573.6} *)

bEst = Mean[MaximalBy[data, Last][[All, 1]]]

(* 4958.9 *)

model = Total[
  a[#]/((b[#] - t)^2 + d[#]) + c/3 & /@ Range[3]]

(* c + a[1]/((-t + b[1])^2 + d[1]) + a[2]/((-t + b[2])^2 + d[2]) + 
 a[3]/((-t + b[3])^2 + d[3]) *)

Let the Lorentzian be positioned such that tmin < b[1] <= b[2] <= b[3] < tmax

Manipulate[
 result = NonlinearModelFit[data,
   {model, tmin < b[1] <= b[2] <= b[3] < tmax,
    a[1] > 0, a[2] > 0, a[3] > 0,
    d[1] > 0, d[2] > 0, d[3] > 0},
   {{a[1], aEst}, {a[2], aEst}, {a[3], aEst}, {b[1], bEst - offset},
    {b[2], bEst}, {b[3], bEst + offset},
    d[1], d[2], d[3], c}, t];
 Column@{result // Normal,
   Show[
    ListPlot[data,
     PlotTheme -> "Detailed",
     PlotStyle -> Red],
    Plot[
     Evaluate@
      Flatten@
       {result[t], (a[#]/((b[#] - t)^2 + d[#]) + c/3 & /@ Range[3]) /. 
         result["BestFitParameters"]}, {t, tmin, tmax},
     PlotLegends -> {"result", "part 1", "part 2", "part 3"},
     PlotRange -> All],
    PlotRange -> All,
    ImageSize -> 300]},
 {{offset, 25}, 0, 50, 5, Appearance -> "Labeled"},
 {{aEst, 650}, 50, 1500, 50, Appearance -> "Labeled"},
 SynchronousUpdating -> False,
 TrackedSymbols :> All]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.