<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Calculating Full Width at 0.01 (FW(0.01)) for Detected Peaks in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Calculating-Full-Width-at-0-01-FW-0-01-for-Detected-Peaks/m-p/809025#M98855</link>
    <description>&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;I have time series data (attached) representing concentration over time, and I want to apply a Savitzky-Golay smoothing first and then detect peaks in JMP. While I know how to perform the peak detection, I’m struggling with how to calculate the Full Width at 0.01 (FW(0.01)) for the identified peak.&lt;/P&gt;&lt;P&gt;Here’s my plan to do it manually thus:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Locate the Peak&lt;/STRONG&gt;: Identify the maximum value of the peak (here 826163 in my table)&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Determine the 0.01 Threshold&lt;/STRONG&gt;: Calculate the value that corresponds to 1% of this height by multiplying the peak height by 0.01 (826163&amp;nbsp; * 0.01 = 8261.63 in my table).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Identify Points at the 0.01 Threshold&lt;/STRONG&gt;:&lt;U&gt; Find the x-values where the signal intersects this threshold on both sides of the peak (HERE IS MY PROBLEM)&lt;/U&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Calculate FW(0.01)&lt;/STRONG&gt;: Once I have the two x-values (x1 and x2) where the signal crosses the 0.01 threshold, calculate the full width as:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;FW(0.01) = x2 - x1.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;However, I’m unsure how to effectively recover the intersection points&amp;nbsp; with the threshold in my smoothed data: X1 and X2. I could use a dichotomous method or interpolation, but I'm looking for a more straightforward/precise approach. Is there any way to do it using Profiler, Invert Smoothing or another method ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SophieCuvillier_1-1730211025237.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69632iEBD6C3C0D791FBC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SophieCuvillier_1-1730211025237.png" alt="SophieCuvillier_1-1730211025237.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 29 Oct 2024 14:15:07 GMT</pubDate>
    <dc:creator>SophieCuvillier</dc:creator>
    <dc:date>2024-10-29T14:15:07Z</dc:date>
    <item>
      <title>Calculating Full Width at 0.01 (FW(0.01)) for Detected Peaks</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-Full-Width-at-0-01-FW-0-01-for-Detected-Peaks/m-p/809025#M98855</link>
      <description>&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;I have time series data (attached) representing concentration over time, and I want to apply a Savitzky-Golay smoothing first and then detect peaks in JMP. While I know how to perform the peak detection, I’m struggling with how to calculate the Full Width at 0.01 (FW(0.01)) for the identified peak.&lt;/P&gt;&lt;P&gt;Here’s my plan to do it manually thus:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Locate the Peak&lt;/STRONG&gt;: Identify the maximum value of the peak (here 826163 in my table)&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Determine the 0.01 Threshold&lt;/STRONG&gt;: Calculate the value that corresponds to 1% of this height by multiplying the peak height by 0.01 (826163&amp;nbsp; * 0.01 = 8261.63 in my table).&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Identify Points at the 0.01 Threshold&lt;/STRONG&gt;:&lt;U&gt; Find the x-values where the signal intersects this threshold on both sides of the peak (HERE IS MY PROBLEM)&lt;/U&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Calculate FW(0.01)&lt;/STRONG&gt;: Once I have the two x-values (x1 and x2) where the signal crosses the 0.01 threshold, calculate the full width as:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;FW(0.01) = x2 - x1.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;However, I’m unsure how to effectively recover the intersection points&amp;nbsp; with the threshold in my smoothed data: X1 and X2. I could use a dichotomous method or interpolation, but I'm looking for a more straightforward/precise approach. Is there any way to do it using Profiler, Invert Smoothing or another method ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SophieCuvillier_1-1730211025237.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69632iEBD6C3C0D791FBC7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SophieCuvillier_1-1730211025237.png" alt="SophieCuvillier_1-1730211025237.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Oct 2024 14:15:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-Full-Width-at-0-01-FW-0-01-for-Detected-Peaks/m-p/809025#M98855</guid>
      <dc:creator>SophieCuvillier</dc:creator>
      <dc:date>2024-10-29T14:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Full Width at 0.01 (FW(0.01)) for Detected Peaks</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-Full-Width-at-0-01-FW-0-01-for-Detected-Peaks/m-p/809753#M99096</link>
      <description>&lt;P&gt;I will go with the assumption that you will have lines between each of the markers (based on the graph found from table)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$DOWNLOADS/reprex_table.jmp");

m = dt[0, "Smoother(Concentration)"];
peak = Max(m);
threshold = 0.01*peak;

low = Min(Loc(m &amp;gt; threshold));
high = Min(Loc(m[low + 1::N Rows(m)] &amp;lt; threshold) + low);

low_c = m[low-1::low];
low_t = dt[low-1::low, "Time"];
low_i = Interpolate(threshold, low_c, low_t);

high_c = m[high-1::high];
high_t = dt[high-1::high, "Time"];
high_i = Interpolate(threshold, Reverse(high_c), Reverse(high_t));

Show(high_i, low_i);&lt;BR /&gt;&lt;BR /&gt;// Just for visualization
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(528, 454),
	Show Control Panel(0),
	Variables(X(:Time), Y(:"Smoother(Concentration)"n)),
	Elements(Line(X, Y, Legend(6)), Points(X, Y, Legend(7)))
);
rep = Report(gb);

rep[Framebox(1)] &amp;lt;&amp;lt; Add Graphics Script(
	Pen Color("Red");
	Pen Size(1);
	H Line(threshold);
	
	Pen Color("Blue");
	V Line(dt[low, "Time"]);
	V Line(dt[high, "Time"]);
);

Eval(EvalExpr(
	rep[AxisBox(1)] &amp;lt;&amp;lt; Add Ref Line(
		Expr(low_i),
		"Dashed",
		"Black",
		Expr(Char(Round(low_i, 3))),
		1,
		1
	)
));

Eval(EvalExpr(
	rep[AxisBox(1)] &amp;lt;&amp;lt; Add Ref Line(
		Expr(high_i),
		"Dashed",
		"Black",
		Expr(Char(Round(high_i, 3))),
		1,
		1
	)
));

Eval(EvalExpr(
	rep[AxisBox(1)] &amp;lt;&amp;lt; Add Ref Line(
		{Expr(low_i), Expr(high_i)},
		"Solid",
		"Green",
		"FW0.1",
		1,
		0.25;
	)
));

Write();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1730842288815.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69882i5E4F580D159EFA5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1730842288815.png" alt="jthi_0-1730842288815.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1730842340364.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69883iDC064EFBC4FE980F/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_1-1730842340364.png" alt="jthi_1-1730842340364.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 21:34:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-Full-Width-at-0-01-FW-0-01-for-Detected-Peaks/m-p/809753#M99096</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-11-05T21:34:21Z</dc:date>
    </item>
  </channel>
</rss>

