diff options
author | Tom Rondeau <tom@trondeau.com> | 2015-05-11 17:42:15 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2015-05-11 17:42:15 -0400 |
commit | 5335005bcfbd671a0760bde08e69ef867b7ffc24 (patch) | |
tree | 8dd723360c008a15bdca110e0724af46010fab3c /gr-analog/include/gnuradio/analog/fastnoise_source_X.h.t | |
parent | 67463e7418cc608040e2a6db535bf9936d24c50c (diff) |
analog: fixes calculation of complex noise sources from the amplitude
setting.
This had been producing 3 dB more power for complex sources than real
sources for the same amplitude setting. Added a noise_power.grc
example file to explore this.
Diffstat (limited to 'gr-analog/include/gnuradio/analog/fastnoise_source_X.h.t')
-rw-r--r-- | gr-analog/include/gnuradio/analog/fastnoise_source_X.h.t | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/gr-analog/include/gnuradio/analog/fastnoise_source_X.h.t b/gr-analog/include/gnuradio/analog/fastnoise_source_X.h.t index a6377ad7fb..850633979c 100644 --- a/gr-analog/include/gnuradio/analog/fastnoise_source_X.h.t +++ b/gr-analog/include/gnuradio/analog/fastnoise_source_X.h.t @@ -47,10 +47,15 @@ namespace gr { typedef boost::shared_ptr<@BASE_NAME@> sptr; /*! \brief Make a fast noise source - * \param type the random distribution to use (see gnuradio/analog/noise_type.h) - * \param ampl a scaling factor for the output; for Gaussian sources, this is the std. dev. - * \param seed seed for random generators. Note that for uniform and - * Gaussian distributions, this should be a negative number. + * \param type the random distribution to use (see + * gnuradio/analog/noise_type.h) + * \param ampl the standard deviation of a 1-d noise process. If + * this is the complex source, this parameter is split + * among the real and imaginary parts: + * <pre>(ampl/sqrt(2))x + j(ampl/sqrt(2))y</pre> + * \param seed seed for random generators. Note that for uniform + * and Gaussian distributions, this should be a negative + * number. * \param samples Number of samples to pre-generate */ static sptr make(noise_type_t type, float ampl, @@ -58,7 +63,17 @@ namespace gr { virtual @TYPE@ sample() = 0; virtual @TYPE@ sample_unbiased() = 0; + /*! + * Set the noise type. Nominally from the + * gr::analog::noise_type_t selections, but only GR_GAUSSIAN and + * GR_UNIFORM are currently available. + */ virtual void set_type(noise_type_t type) = 0; + + /*! + * Set the standard deviation (amplitude) of the 1-d noise + * process. + */ virtual void set_amplitude(float ampl) = 0; virtual noise_type_t type() const = 0; |