Coder Social home page Coder Social logo

sharpfftw's People

Contributors

jonarw avatar wo80 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sharpfftw's Issues

Autocorrelation of a signal wit FFT

Hello there.
My question do not relate to FFTW directly, I would be thankful if you give me your opinion.
I have a harmonic signal (same shape repeats over and over), in form of short[] array. lets say it have 1M members. What i need to find out is Auto Correlation of this signal. In other words I want to find the frequency, of signal to find out how much it takes for signal to repeat itself. I know there is some method with FFT, which does this. but have no chance to made it.
Do you know how can i use FFT or particularly SharpFFTW to do such?
Here is my non working code:
https://github.com/epsi1on/SimpleOscilloscope/blob/main/src/POC/SimpleOsciloscope.UI/FftFrequencyDetector.cs

and here is how I feed it (line 46 to 80)
https://github.com/epsi1on/SimpleOscilloscope/blob/1a9132965a414055fe3aac3a77c6a8dc022c9f72/src/POC/SimpleOsciloscope.TestConsole/Program.cs#L46

Cheers

heisenbug

Hello. Following code falls randomly at lines #1 or #2 with AccessViolationException only when debugger is not attached. Commenting out line #3 prevents code to fail.

 var N = 4096;
 var input = new RealArray(N);
 var spectrum = new ComplexArray(N);
 var output = new RealArray(N);
 var fft = Plan.Create1(N, input, spectrum, Options.Measure);
 var ifft = Plan.Create1(N, spectrum, output, Options.Measure);

 while (true)
 {
     Console.WriteLine("converting");
     fft.Execute(); // #1
     Console.WriteLine("converting back");
     ifft.Execute(); // #2
     Console.WriteLine("getting result");
     var result = output.ToArray(); // #3
 }

Document implementation fftw3.dll and fftw3f.dll

Hi, sorry for the N00b issue, but I'm having trouble getting the FFTW implementations to work, I've downloaded the dlls and put them in the root directory, and it seems that this code

public static bool LibraryExists()
        {
            try
            {
                var ptr = NativeMethods.fftwf_malloc(8);
                NativeMethods.fftwf_free(ptr);
                return true;
            }
            catch
            {
            }

            return false;
        }

is where the dll is attempting to be found/added, but I can't find any reference in the project how/where to put this dll so it is actually imported and used.

Thanks!
Josh

Crash with munmap_chunk invalid pointer

Hi

Sometimes i got thus error on code:

          var real = new float[points.Length];
          using var input = new RealArray(real);
           using var output = new ComplexArray(points.Length / 2 + 1);
           using var plan = Plan.Create1(points.Length, input, output, Options.Estimate);

           plan.Execute();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.