tico 0.1
Mechanical Watch Terminal Timegrapher
myfft.h
Go to the documentation of this file.
1#pragma once
2
3#include "myarr.h"
4
5#include <fftw3.h>
18fftw_complex* makeFilter(size_t evalue, size_t ArrayLength);
19
35size_t fftfit(struct myarr input,
36 int* total,
37 const int* base,
38 double* corvalue,
39 fftw_complex* filterFFT,
40 int verb,
41 double* subpos);
42
50fftw_complex* convolute(struct myarr array, fftw_complex* filter);
51
60size_t getmaxfftw(fftw_complex* array, size_t ArrayLength);
61
73fftw_complex* crosscor(size_t ArrayLength,
74 fftw_complex* array,
75 fftw_complex* ref);
76
84void writefftw(fftw_complex* arr, size_t ArrayLength, const char* file);
85
93void remove50hz(size_t ArrayLength, int* array, unsigned int rate);
94
101void normalise(size_t ArrayLength, fftw_complex* inData);
102
110void rescale(int* total, size_t ArrayLength);
111
119int getshift(struct myarr xarr, struct myarr yarr);
120
size_t getmaxfftw(fftw_complex *array, size_t ArrayLength)
@ frequency domain.
Definition: myfft.c:383
fftw_complex * crosscor(size_t ArrayLength, fftw_complex *array, fftw_complex *ref)
Perform cross-correlation between the input array and the reference array in the frequency domain.
Definition: myfft.c:186
void normalise(size_t ArrayLength, fftw_complex *inData)
Normalise the input array in the frequency domain.
Definition: myfft.c:421
void remove50hz(size_t ArrayLength, int *array, unsigned int rate)
Remove the 50Hz component from the input array.
Definition: myfft.c:73
fftw_complex * makeFilter(size_t evalue, size_t ArrayLength)
@ .
Definition: myfft.c:13
int getshift(struct myarr xarr, struct myarr yarr)
Get the shift between the two input arrays.
Definition: myfft.c:248
size_t fftfit(struct myarr input, int *total, const int *base, double *corvalue, fftw_complex *filterFFT, int verb, double *subpos)
@ shift.
Definition: myfft.c:278
void rescale(int *total, size_t ArrayLength)
Rescale the input array to fit within the range of a 16-bit signed integer.
Definition: myfft.c:351
void writefftw(fftw_complex *arr, size_t ArrayLength, const char *file)
Write the given array in the frequency domain to a file.
Definition: myfft.c:406
fftw_complex * convolute(struct myarr array, fftw_complex *filter)
@ frequency domain.
Definition: myfft.c:139
A struct to hold an array of integers or an array of doubles, along with the length of the arrays.
Definition: myarr.h:14