Sha256: c5a6be11e6e36ff1f166faf40dbe1ee58768a770a80e78d5dce596702e644851

Contents?: true

Size: 872 Bytes

Versions: 6

Compression:

Stored size: 872 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe 'windows' do
  it 'should produce a window that looks like...' do
    size = 512
    
    window_classes = [
      #SPCore::RectangularWindow,
      #SPCore::HannWindow,
      #SPCore::HammingWindow,
      #SPCore::CosineWindow,
      #SPCore::LanczosWindow,
      #SPCore::TriangularWindow,
      #SPCore::BartlettWindow,
      #SPCore::GaussianWindow,
      #SPCore::BartlettHannWindow,
      #SPCore::BlackmanWindow,
      #SPCore::NuttallWindow,
      #SPCore::BlackmanHarrisWindow,
      #SPCore::BlackmanNuttallWindow,
      #SPCore::FlatTopWindow
    ]
    
    windows = {}
    window_classes.each do |window_class|
      windows[window_class.to_s] = window_class.new(size).data
    end
    
    if windows.any?
      Plotter.new(:title => "windows").plot_1d windows
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spcore-0.1.8 spec/windows/window_spec.rb
spcore-0.1.7 spec/windows/window_spec.rb
spcore-0.1.6 spec/windows/window_spec.rb
spcore-0.1.5 spec/windows/window_spec.rb
spcore-0.1.4 spec/windows/window_spec.rb
spcore-0.1.3 spec/windows/window_spec.rb