0
$\begingroup$

I have a dataset. I have plotted using "Listloglinearplot". Now I need to find the FWHM (full width half maxima) of the same, However I dont know which mathematical eqution describes best to fit my dataset to find out FWHM. I have the following data and plot:

dataset={{0., 0.0518175}, {1., 0.0306299}, {1.9, 0.610295}, {2., 
  1.32653}, {2.2, 4.01183}, {2.5, 6.37931}, {3., 6.50091}, {5., 
  6.54052}, {6., 6.57276}, {8.2, 6.59119}, {15., 6.56125}, {20., 
  6.5267}, {30., 6.4484}, {45., 6.2987}, {60., 6.11953}, {75., 
  5.84962}, {90., 5.43738}, {100., 4.96757}, {105., 4.54382}, {120., 
  3.42917}, {135., 2.23092}, {150., 1.55222}, {165., 0.679385}, {180.,
   0.444479}}
dataplot = 
 ListLogLinearPlot[dataset, 
  PlotStyle -> {Dashing[{.0071, 0.005, 0.005}], Blue}, 
  PlotMarkers -> {\[FilledCircle], 15}, Frame -> True, 
  FrameStyle -> Directive[Black, Thickness[0.002]], 
  FrameLabel -> {Style["x", Black, FontFamily -> "Times New Roman", 
     FontSize -> 26], 
    Style["y", Black, FontFamily -> "Times", FontSize -> 26]}, 
  PlotRange -> {{0, 190}, {1, 7.2}}, FrameTicks -> Automatic, 
  ImageSize -> 650, 
  BaseStyle -> {FontFamily -> "Times", FontSize -> 10}]

Can anyone please help me with the mathematical equation?

Thank you.

$\endgroup$
2
  • $\begingroup$ Why the log scale for the graph when one of the values on the horizontal axis is zero? But even if the zero is ignored, do you need the difference (associated with FWHM) in the logs or the original scale? (And it does appear odd that you've only accepted one answer in the several questions you've asked previously.) $\endgroup$
    – JimB
    Jan 14, 2021 at 6:29
  • $\begingroup$ I have plotted to visualize x axis clearly in log scale and omitted the first data. I need the difference in original scale. log scale is only for visualisation. $\endgroup$
    – P Pyne
    Jan 14, 2021 at 10:08

1 Answer 1

3
$\begingroup$
Clear["Global`*"]

dataset = {{0., 0.0518175}, {1., 0.0306299}, {1.9, 0.610295}, {2., 
    1.32653}, {2.2, 4.01183}, {2.5, 6.37931}, {3., 6.50091}, {5., 
    6.54052}, {6., 6.57276}, {8.2, 6.59119}, {15., 6.56125}, {20., 
    6.5267}, {30., 6.4484}, {45., 6.2987}, {60., 6.11953}, {75., 
    5.84962}, {90., 5.43738}, {100., 4.96757}, {105., 4.54382}, {120., 
    3.42917}, {135., 2.23092}, {150., 1.55222}, {165., 0.679385}, {180., 
    0.444479}};

f = Interpolation[dataset, InterpolationOrder -> 1];

The peak of the function is

max = MaxValue[{f[x], 0 < x < 180}, x]

(* 6.59119 *)

The full width at half maximum (FWHM) is

FWHM = Subtract @@ 
  Reverse[HM = (x /. FindRoot[f[x] == max/2, {x, #}] & /@ {2.1, 125})]

(* 119.525 *)

pts = {Log[#], max/2} & /@ HM;

dataplot = ListLogLinearPlot[dataset,
  PlotStyle -> {Dashing[{.0071, 0.005, 0.005}], Blue},
  PlotMarkers -> {●, 15},
  Joined -> True, Frame -> True,
  FrameStyle -> Directive[Black, Thickness[0.002]],
  FrameLabel -> {Style["x", Black, FontFamily -> "Times New Roman", 
     FontSize -> 26], 
    Style["y", Black, FontFamily -> "Times", FontSize -> 26]},
  PlotRange -> {{1, 190}, {1, 7.2}},
  FrameTicks -> Automatic,
  ImageSize -> 360,
  BaseStyle -> {FontFamily -> "Times", FontSize -> 10},
  Epilog -> {Text[StringForm["FWHM = ``", FWHM], {Log[15], max/2}, {0, -2}],
    Red, Line[pts]}]

enter image description here

$\endgroup$
1
  • $\begingroup$ @ Bob thank you for your help $\endgroup$
    – P Pyne
    Jan 14, 2021 at 10:08

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.