[CSC 335] Questions for Project
Andrew J. Pounds
pounds_aj at mercer.edu
Thu Oct 30 10:26:51 EDT 2025
Here is my recommended method of solution...
* Read nmr.in which will include the data file name (which could be
nmr.dat)
* Read the data file
* Make sure the data is ordered properly
* Based on your baseline, find the TMS peak and adjust the position of
the x-elements so TMS is at zero.
* Filter your data
* 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
* Find the locations of the peaks using spline and bisection
* 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)
* Integrate the peaks based on the locations found in the previous step
* Calculate the hydrogen ratios
* Produce the properly formatted output
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.
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.
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.
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.
There is no guarantee that you will find peaks. If you find no peaks
then there should be no peaks shown in your table.
On 10/30/25 09:31, wrote:
> Dear Dr. Pounds,
>
> I have a couple of additional questions regarding the project as I am
> finishing up.
>
> *
> 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.
> o
> My current process ( if it helps answer the question )
> +
> Sort data by X ascending
> +
> Horizontally shift the data for the peak
> +
> Filter data
> +
> Vertically adjust data for baseline
> +
> Create the spline function
> +
> Get bounds for my integrals (using the spline function)
> +
> Integrate (using the spline function)
> *
> Calculating the Location:
> o
> I do ( xB-xA)/2
> o
> 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
> *
> What assumptions can we make about the test data that will be used?
> *
> One place in the project pdf mentions the input file being nmr.in
> and another /nmr.dat/. Which is correct?
> *
> Can we assume that the data will cross our baseline at least 1 time?
>
>
> Regards,
>
>
--
*Andrew J. Pounds, Ph.D.*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University, Macon, GA, 31207 (478) 301-5627 /
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20251030/e0521fa2/attachment.htm>
More information about the csc335
mailing list