<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to noise_gen</title><link>https://sourceforge.net/p/infos/wiki/noise_gen/</link><description>Recent changes to noise_gen</description><atom:link href="https://sourceforge.net/p/infos/wiki/noise_gen/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 08 Sep 2016 15:58:08 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/infos/wiki/noise_gen/feed" rel="self" type="application/rss+xml"/><item><title>noise_gen modified by A. Smith</title><link>https://sourceforge.net/p/infos/wiki/noise_gen/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,5 +1,5 @@
 ###noise_gen
-The ‘noise_gen’ function generates a spectrum of noise. This is done by taking white noise (normally distributed, uncorrelated) in the time domain and processing it according to the acquisition and processing parameters for a given spectrum. Acquisition and processing information is provided in a ‘par’ structure, which contains the fields ‘par.dX’ for each dimension X. This is described in section 2.3, although note that no information on signal decay is necessary. The result is then very similar to spectrum noise, although discrepancies may occur because of the presence of artifacts, and any frequency filtering within the spectral width. The format of the output of ‘noise_gen’ follows that of all ‘spec’ variables (see section 2.1). Note that the frequency axes are arbitrary, so they will always be centered at a frequency of zero. The noise returned by ‘noise_gen’ will always have an rms of 1.
+The ‘noise_gen’ function generates a spectrum of noise. This is done by taking white noise (normally distributed, uncorrelated) in the time domain and processing it according to the acquisition and processing parameters for a given spectrum. Acquisition and processing information is provided in a [‘par’](/p/infos/wiki/par_struct) structure, which contains the fields [‘par.dX’](/p/infos/wiki/dn_struct) for each dimension X. Note that no information on signal decay is necessary. The result is then very similar to spectrum noise, although discrepancies may occur because of the presence of artifacts, and any frequency filtering within the spectral width. The format of the output of ‘noise_gen’ follows that of all [‘spec’](/p/infos/wiki/spec_struct) variables. Note that the frequency axes are arbitrary, so they will always be centered at a frequency of zero. The noise returned by ‘noise_gen’ will always have an rms of 1.

 To generate a noise spectrum:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">A. Smith</dc:creator><pubDate>Thu, 08 Sep 2016 15:58:08 -0000</pubDate><guid>https://sourceforge.nete6013beb8c62d80eb6c74ee9be1a7a1c4b053054</guid></item><item><title>noise_gen modified by A. Smith</title><link>https://sourceforge.net/p/infos/wiki/noise_gen/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,5 +1,5 @@
 ###noise_gen
-The ‘noise_gen’ function generates spectrum of noise. This is done by taking Gaussian (white) noise in the time domain and processing it according to the acquisition and processing parameters for a given spectrum. Acquisition and processing information is provided in a ‘par’ structure, which contains the fields ‘par.dX’ for each dimension X. This is described in section 2.3, although note that no information on signal decay is necessary. The result is then very similar to spectrum noise, although discrepancies may occur because of the presence of artifacts, and any frequency filtering within the spectral width. The format of the output of ‘noise_gen’ follows that of all ‘spec’ variables (see section 2.1). Note that the frequency axes are arbitrary, so they will always be centered at a frequency of zero. The noise returned by ‘noise_gen’ will always have an rms of 1.
+The ‘noise_gen’ function generates a spectrum of noise. This is done by taking white noise (normally distributed, uncorrelated) in the time domain and processing it according to the acquisition and processing parameters for a given spectrum. Acquisition and processing information is provided in a ‘par’ structure, which contains the fields ‘par.dX’ for each dimension X. This is described in section 2.3, although note that no information on signal decay is necessary. The result is then very similar to spectrum noise, although discrepancies may occur because of the presence of artifacts, and any frequency filtering within the spectral width. The format of the output of ‘noise_gen’ follows that of all ‘spec’ variables (see section 2.1). Note that the frequency axes are arbitrary, so they will always be centered at a frequency of zero. The noise returned by ‘noise_gen’ will always have an rms of 1.

 To generate a noise spectrum:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">A. Smith</dc:creator><pubDate>Thu, 08 Sep 2016 13:20:07 -0000</pubDate><guid>https://sourceforge.net807697962c3f9389079687fc047f8c5b85c2af4c</guid></item><item><title>noise_gen modified by A. Smith</title><link>https://sourceforge.net/p/infos/wiki/noise_gen/</link><description>&lt;div class="markdown_content"&gt;&lt;h3 id="noise_gen"&gt;noise_gen&lt;/h3&gt;
&lt;p&gt;The ‘noise_gen’ function generates spectrum of noise. This is done by taking Gaussian (white) noise in the time domain and processing it according to the acquisition and processing parameters for a given spectrum. Acquisition and processing information is provided in a ‘par’ structure, which contains the fields ‘par.dX’ for each dimension X. This is described in section 2.3, although note that no information on signal decay is necessary. The result is then very similar to spectrum noise, although discrepancies may occur because of the presence of artifacts, and any frequency filtering within the spectral width. The format of the output of ‘noise_gen’ follows that of all ‘spec’ variables (see section 2.1). Note that the frequency axes are arbitrary, so they will always be centered at a frequency of zero. The noise returned by ‘noise_gen’ will always have an rms of 1.&lt;/p&gt;
&lt;p&gt;To generate a noise spectrum:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;noise_spec=noise_gen(par);
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Noise generation is useful for visual evaluation of fit quality. This is because the form of the spectrum noise heavily influences the appearance of lineshapes with low signal to noise. Furthermore, the FitSpec function may opt to fit a spectrum feature that appears to be the result of overlapping peaks with only a single peak, and when a fit is viewed with spectrum noise, it becomes apparent that the feature is likely to be a result of a single peak and spectrum noise. The following example demonstrates how to generate a calculated spectrum with noise after spectrum fitting. Note that if FitSpec runs a noise evaluation, then the output variable, ‘fit’, contains the rms of the input spectrum.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;fit=FitSpec(spec);
calc_spec=fit.spec;
noise_spec=noise_gen(calc_spec.par);
calc_spec.S=add_spec_nD(calc_spec,noise_spec,[1 fit.noise.rms]);
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Here, we have taken the fitted spectrum out of the results from FitSpec. Then, a noise spectrum is generated, using the acquisition and processing parameters of the calculated spectrum (these are the same as the original spectrum). Finally, the calculated spectrum and the noise spectrum are added together, using ‘&lt;a class="" href="/p/infos/wiki/add_spec_nD"&gt;add_spec_nD&lt;/a&gt;’, with a weight of 1 for the calculated spectrum and a weight of the spectrum RMS (fit.noise.rms) for the noise spectrum, so that the synthetic spectrum has the same noise level as the original experimental spectrum.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">A. Smith</dc:creator><pubDate>Thu, 08 Sep 2016 13:19:00 -0000</pubDate><guid>https://sourceforge.netebb2db514759ce4f5c668c77103a0d748ecba141</guid></item></channel></rss>