Class: SpectrumAnalyzer::Generator
- Inherits:
-
Object
- Object
- SpectrumAnalyzer::Generator
- Defined in:
- lib/spectrum-analyzer/clients/generator.rb
Instance Method Summary collapse
- #build_spectrum ⇒ Object
-
#initialize ⇒ Generator
constructor
A new instance of Generator.
- #quick_analyze ⇒ Object
- #set_file(file) ⇒ Object
Constructor Details
#initialize ⇒ Generator
Returns a new instance of Generator.
3 4 5 6 7 8 |
# File 'lib/spectrum-analyzer/clients/generator.rb', line 3 def initialize @config = SpectrumAnalyzer.configuration @file = build_file_info @spectrum = SpectrumAnalyzer.spectrum @window_functions = SpectrumAnalyzer::WindowFunctions.new(@config.window_size) end |
Instance Method Details
#build_spectrum ⇒ Object
21 22 23 24 |
# File 'lib/spectrum-analyzer/clients/generator.rb', line 21 def build_spectrum generate_spectrum() analyze_spectrum() end |
#quick_analyze ⇒ Object
14 15 16 17 18 19 |
# File 'lib/spectrum-analyzer/clients/generator.rb', line 14 def quick_analyze #For each FFT window built #check for hit #return true if found #return false end |
#set_file(file) ⇒ Object
10 11 12 |
# File 'lib/spectrum-analyzer/clients/generator.rb', line 10 def set_file(file) @file = file end |