FFT and filter utilities.
More...
|
| fftw_complex * | makeFilter (size_t evalue, size_t ArrayLength) |
| | @ . More...
|
| |
| size_t | fftfit (struct myarr input, int *total, const int *base, double *corvalue, fftw_complex *filterFFT, int verb, double *subpos) |
| | @ shift. More...
|
| |
| fftw_complex * | convolute (struct myarr array, fftw_complex *filter) |
| | @ frequency domain. More...
|
| |
| size_t | getmaxfftw (fftw_complex *array, size_t ArrayLength) |
| | @ frequency domain. More...
|
| |
| 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. More...
|
| |
| void | writefftw (fftw_complex *arr, size_t ArrayLength, const char *file) |
| | Write the given array in the frequency domain to a file. More...
|
| |
| void | remove50hz (size_t ArrayLength, int *array, unsigned int rate) |
| | Remove the 50Hz component from the input array. More...
|
| |
| void | normalise (size_t ArrayLength, fftw_complex *inData) |
| | Normalise the input array in the frequency domain. More...
|
| |
| void | rescale (int *total, size_t ArrayLength) |
| | Rescale the input array to fit within the range of a 16-bit signed integer. More...
|
| |
| int | getshift (struct myarr xarr, struct myarr yarr) |
| | Get the shift between the two input arrays. More...
|
| |
FFT and filter utilities.
◆ convolute()
| fftw_complex * convolute |
( |
struct myarr |
array, |
|
|
fftw_complex * |
filter |
|
) |
| |
@ frequency domain.
- Parameters
-
| array | The input array to convolute. |
| filter | The filter in the frequency domain to convolute with. |
- Returns
- A pointer to the result of the convolution in the frequency domain.
◆ crosscor()
| 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.
- Parameters
-
| ArrayLength | The length of the input and reference arrays. |
| array | The input array in the frequency domain to cross-correlate. |
| ref | The reference array in the frequency domain to cross-correlate with. |
- Returns
- A pointer to the result of the cross-correlation in the frequency domain.
◆ fftfit()
| size_t fftfit |
( |
struct myarr |
input, |
|
|
int * |
total, |
|
|
const int * |
base, |
|
|
double * |
corvalue, |
|
|
fftw_complex * |
filterFFT, |
|
|
int |
verb, |
|
|
double * |
subpos |
|
) |
| |
@ shift.
- Parameters
-
| input | The input array to fit. |
| total | A pointer to an integer where the total shift will be stored. |
| base | A pointer to an integer where the base shift will be stored. |
| corvalue | A pointer to a double where the correlation value will be stored. |
| filterFFT | The filter in the frequency domain. |
| verb | An integer indicating whether to print verbose output (1 for yes, 0 for no). |
| subpos | A pointer to a double where the subpixel position will be stored. |
- Returns
- The total shift as a size_t.
◆ getmaxfftw()
| size_t getmaxfftw |
( |
fftw_complex * |
array, |
|
|
size_t |
ArrayLength |
|
) |
| |
@ frequency domain.
- Parameters
-
| array | The input array in the frequency domain to search for the maximum value. |
| ArrayLength | The length of the input array. |
- Returns
- The maximum value found in the input array as a size_t.
◆ getshift()
| int getshift |
( |
struct myarr |
xarr, |
|
|
struct myarr |
yarr |
|
) |
| |
Get the shift between the two input arrays.
- Parameters
-
| xarr | The first input array to compare. |
| yarr | The second input array to compare. |
- Returns
- The shift between the two input arrays as an integer.
◆ makeFilter()
| fftw_complex * makeFilter |
( |
size_t |
evalue, |
|
|
size_t |
ArrayLength |
|
) |
| |
@ .
- Parameters
-
| evalue | The evalue to use for the filter. |
| ArrayLength | The length of the array to filter. |
- Returns
- A pointer to the filter in the frequency domain.
◆ normalise()
| void normalise |
( |
size_t |
ArrayLength, |
|
|
fftw_complex * |
inData |
|
) |
| |
Normalise the input array in the frequency domain.
- Parameters
-
| ArrayLength | The length of the input array. |
| inData | The input array in the frequency domain to normalise. |
◆ remove50hz()
| void remove50hz |
( |
size_t |
ArrayLength, |
|
|
int * |
array, |
|
|
unsigned int |
rate |
|
) |
| |
Remove the 50Hz component from the input array.
- Parameters
-
| ArrayLength | The length of the input array. |
| array | The input array to remove the 50Hz component from. |
| rate | The sampling rate of the input array. |
◆ rescale()
| void rescale |
( |
int * |
total, |
|
|
size_t |
ArrayLength |
|
) |
| |
Rescale the input array to fit within the range of a 16-bit signed integer.
- Parameters
-
| total | A pointer to an integer where the total shift will be stored. |
| ArrayLength | The length of the input array. |
◆ writefftw()
| void writefftw |
( |
fftw_complex * |
arr, |
|
|
size_t |
ArrayLength, |
|
|
const char * |
file |
|
) |
| |
Write the given array in the frequency domain to a file.
- Parameters
-
| arr | The input array in the frequency domain to write to a file. |
| ArrayLength | The length of the input array. |
| file | The name of the file to write the array to. |