<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Here is my recommended method of
      solution...</div>
    <div class="moz-cite-prefix">
      <ul>
        <li>Read nmr.in which will include the data file name (which
          could be nmr.dat)</li>
        <li>Read the data file </li>
        <li>Make sure the data is ordered properly</li>
        <li>Based on your baseline, find the TMS peak and adjust the
          position of the x-elements so TMS is at zero.</li>
        <li>Filter your data</li>
        <li>Fit the spline to your filtered data -- its your choice on
          if you want alter the data based on the baseline or just build
          the baseline shift into the next step</li>
        <li>Find the locations of the peaks using spline and bisection</li>
        <li>Find the tops of the peaks based on the maximum data point
          value between the peak beginning and the peak ending (you do
          not have to use your spline for this)</li>
        <li>Integrate the peaks based on the locations found in the
          previous step</li>
        <li>Calculate the hydrogen ratios</li>
        <li>Produce the properly formatted output</li>
      </ul>
    </div>
    <div class="moz-cite-prefix">I thought I mentioned this in class,
      but in the original sample output I posted, I had requested, at
      that time, that the maximum of the peaks be the peak position. 
      Those students in that class had differentiate the spline to to
      find the location of the peak maximums and use that for the
      center.  I AM NOT ASKING YOU TO DO THAT.  Simply printing out the
      position based on (xa+xb)/2 should be sufficient.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">The assumptions about the testdata are
      that is will be similar to what I have given you but that you may
      have to order it correctly. Also, it could contain up to 8192
      points.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">The file containing the actual data
      points will have a .dat extension.  In the example output on page
      4 of the project description there is reference to a file name
      nmr.dat -- that would a file containing the actual points to be
      analyzed.  The input file of options for your program will always
      be called nmr.in.</div>
    <div class="moz-cite-prefix">There should be NO PROMPTING -- your
      program should read nmr.in, and process based on the options
      chosen in nmr.in.   Please make sure that you follow the example
      on page 2 for your input regarding the type of filter, filter
      size, passed, integration technique, etc.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">There is no guarantee that you will
      find peaks.  If you find no peaks then there should be no peaks
      shown in your table.</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 10/30/25 09:31, wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:267e80635b0542fcb429f7aba6cdf0b6@MW6PR01MB8580.prod.exchangelabs.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
        class="elementToProof">
        Dear Dr. Pounds,</div>
      <div
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
        class="elementToProof">
        <br>
      </div>
      <div
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
        class="elementToProof">
        I have a couple of additional questions regarding the project as
        I am finishing up.</div>
      <ul style="margin-top: 0px; margin-bottom: 0px;">
        <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: disc;"
          class="elementToProof">
          <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
            role="presentation" class="elementToProof">
            Should I filter my data before I shift it vertically by the
            baseline or after? I feel like this is a simple math formula
            problem but I am a little stuck.</div>
        </li>
        <ul style="margin-top: 0px; margin-bottom: 0px;">
          <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: circle;"
            class="elementToProof">
            <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
              role="presentation" class="elementToProof">
              My current process ( if it helps answer the question )</div>
          </li>
          <ul style="margin-top: 0px; margin-bottom: 0px;">
            <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: square;"
              class="elementToProof">
              <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
                role="presentation">
                Sort data by X ascending</div>
            </li>
            <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: square;"
              class="elementToProof">
              <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
                role="presentation" class="elementToProof">
                Horizontally shift the data for the peak</div>
            </li>
            <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: square;"
              class="elementToProof">
              <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
                role="presentation">
                Filter data</div>
            </li>
            <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: square;"
              class="elementToProof">
              <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
                role="presentation">
                Vertically adjust data for baseline</div>
            </li>
            <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: square;"
              class="elementToProof">
              <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
                role="presentation" class="elementToProof">
                Create the spline function</div>
            </li>
            <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: square;"
              class="elementToProof">
              <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
                role="presentation">
                Get bounds for my integrals (using the spline function)</div>
            </li>
            <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: square;"
              class="elementToProof">
              <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
                role="presentation" class="elementToProof">
                Integrate (using the spline function)</div>
            </li>
          </ul>
        </ul>
        <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: disc;"
          class="elementToProof">
          <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
            role="presentation">
            Calculating the Location:</div>
        </li>
        <ul style="margin-top: 0px; margin-bottom: 0px;">
          <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: circle;"
            class="elementToProof">
            <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
              role="presentation">
              I do ( xB-xA)/2</div>
          </li>
          <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: circle;"
            class="elementToProof">
            <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
              role="presentation" class="elementToProof">
              I did that and ( xB+xA)/2 on the sample output. Neither
              calculated value matched the location values you had in
              the sample. I believe that this is causing my top value to
              be off as well</div>
          </li>
        </ul>
        <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: disc;"
          class="elementToProof">
          <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
            role="presentation">
            What assumptions can we make about the test data that will
            be used?</div>
        </li>
        <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: disc;"
          class="elementToProof">
          <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
            role="presentation">
            One place in the project pdf mentions the input file being
            nmr.in and another <i>
              nmr.dat</i>. Which is correct?</div>
        </li>
        <li
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); direction: ltr; list-style-type: disc;"
          class="elementToProof">
          <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"
            role="presentation">
            Can we assume that the data will cross our baseline at least
            1 time?</div>
        </li>
      </ul>
      <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
        class="elementToProof">
        <br>
      </div>
      <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
        class="elementToProof">
        Regards,</div>
      <div
style="direction: ltr; line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
        class="elementToProof"><br>
      </div>
      <div
style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"
        class="elementToProof">
        <br>
      </div>
    </blockquote>
    <p><br>
    </p>
    <div class="moz-signature">-- <br>
      <b>Andrew J. Pounds, Ph.D.</b><br>
      <i>Professor of Chemistry and Computer Science</i><br>
      <i>Director of the Computational Science Program</i><br>
      <i>Mercer University, Macon, GA, 31207 (478) 301-5627 </i></div>
  </body>
</html>