Spike
Loading...
Searching...
No Matches
Spike::WhiteNoiseSignal Class Reference

Implements a band limited white gaussian noise get_value. More...

#include <WhiteNoiseSignal.h>

Public Member Functions

 WhiteNoiseSignal (double alpha, double f_low, double f_high, const TimeFrame &time_frame)
 Construct WhiteNoiseSignal from parameters.
 
 WhiteNoiseSignal (const std::string &input_file, const TimeFrame &time_frame)
 Construct WhiteNoiseSignal from input file.
 
void calculate_signal ()
 Generate the white noise, i.e. fill the signal_values.
 
double signal (double t) const
 Return get_value, i.e. white noise at time t.
 
void set_alpha (double alpha_new)
 Sets the amplitude for the white noise signal.
 
const std::vector< double > & get_values () const
 Returns the white noise signal vector.
 
const std::vector< std::complex< double > > & get_frequencies () const
 Returns the frequencies.
 
double get_alpha () const
 Returns the amplitude.
 
double get_variance () const
 Returns the variance.
 
void print (std::ostream &out) const override
 Prints white noise signal to out stream.
 
- Public Member Functions inherited from Spike::Signal
 Signal (const TimeFrame &time_frame)
 Constructs signal from given time frame.
 
double get_value (size_t i) const
 Returns the signal value at index i.
 

Additional Inherited Members

- Protected Attributes inherited from Spike::Signal
const TimeFrametime_frame
 reference to time frame
 
std::vector< double > signal_values
 array containing the signal values
 

Detailed Description

Implements a band limited white gaussian noise get_value.

Constructor & Destructor Documentation

◆ WhiteNoiseSignal() [1/2]

Spike::WhiteNoiseSignal::WhiteNoiseSignal ( double alpha,
double f_low,
double f_high,
const TimeFrame & time_frame )

Construct WhiteNoiseSignal from parameters.

Parameters
alphaAmplitude
f_lowLower cut-off frequency
f_highHigher cut-off frequency
time_frametime frame

◆ WhiteNoiseSignal() [2/2]

Spike::WhiteNoiseSignal::WhiteNoiseSignal ( const std::string & input_file,
const TimeFrame & time_frame )

Construct WhiteNoiseSignal from input file.

Parameters
input_fileInput file in .ini format
time_frametime frame

Member Function Documentation

◆ get_alpha()

double Spike::WhiteNoiseSignal::get_alpha ( ) const
inline

Returns the amplitude.

Returns
amplitude

◆ get_frequencies()

const std::vector< std::complex< double > > & Spike::WhiteNoiseSignal::get_frequencies ( ) const
inline

Returns the frequencies.

Returns
white noise frequencies

◆ get_values()

const std::vector< double > & Spike::WhiteNoiseSignal::get_values ( ) const
inline

Returns the white noise signal vector.

Returns
white noise vector

◆ get_variance()

double Spike::WhiteNoiseSignal::get_variance ( ) const
inline

Returns the variance.

Returns
variance

◆ print()

void Spike::WhiteNoiseSignal::print ( std::ostream & out) const
inlineoverridevirtual

Prints white noise signal to out stream.

Parameters
outout stream

Implements Spike::Signal.

◆ set_alpha()

void Spike::WhiteNoiseSignal::set_alpha ( double alpha_new)
inline

Sets the amplitude for the white noise signal.

Parameters
alpha_newnew amplitude

◆ signal()

double Spike::WhiteNoiseSignal::signal ( double t) const

Return get_value, i.e. white noise at time t.

Parameters
tTime
Returns
Signal, i.e. white noise at time t

The documentation for this class was generated from the following files: