Lemma is an Electromagnetics API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

filter.cpp 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // ===========================================================================
  2. //
  3. // Filename: utfilter.cpp
  4. //
  5. // Created: 07/20/2010 10:12:07 AM
  6. // Compiler: Tested with g++, icpc, and MSVC 2010
  7. //
  8. // Author: Trevor Irons (ti)
  9. //
  10. // Organisation: Colorado School of Mines (CSM)
  11. // United States Geological Survey (USGS)
  12. //
  13. // Email: tirons@mines.edu, tirons@usgs.gov
  14. //
  15. // This program is free software: you can redistribute it and/or modify
  16. // it under the terms of the GNU General Public License as published by
  17. // the Free Software Foundation, either version 3 of the License, or
  18. // (at your option) any later version.
  19. //
  20. // This program is distributed in the hope that it will be useful,
  21. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. // GNU General Public License for more details.
  24. //
  25. // You should have received a copy of the GNU General Public License
  26. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  27. //
  28. // ===========================================================================
  29. /**
  30. @author Trevor Irons
  31. @date 07/20/2010
  32. @version 0.0
  33. **/
  34. #include "WindowFilter.h"
  35. using namespace Lemma;
  36. int main() {
  37. auto Hamming = WindowFilter::NewSP();
  38. Hamming->SetWindowType( HANNING );
  39. Hamming->SetSamplingInterval(1e-4);
  40. Hamming->SetBandwidth(300);
  41. Hamming->SetNumberOfSamples(1./1e-4);
  42. std::cout << Hamming->GetFilterCoefficients() //.transpose()
  43. << std::endl;
  44. }