S2kit
1.1
Toolkit for working with functions defined on the sphere
|
Example of source code to convolve two real-valued functions defined on the 2-sphere. Uses seminaive algorithms. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fftw3.h>
#include "s2kit/FST_semi_memo.h"
#include "s2kit/cospml.h"
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
Example of source code to convolve two real-valued functions defined on the 2-sphere. Uses seminaive algorithms.
Precomputes all necessary data in memory prior to transforming.
Reads in a function and filter from files specified at shell level, and dumps output into a specified file.
4*bw*bw
arrays.Sample call:
In this example, the signal and filter function samples are stored in the files:
s64.dat
(signal for bandwidth = 64
)
f64.dat
(filter for bandwidth = 64
)
s128.dat
(signal for bandwidth = 128
)
f128.dat
(filter for bandwidth = 128
)
The signal is a "noisy" bump on the sphere, and the filter is a smooth, symmetric bump at the north pole.
The samples for each are stored in "latitude-major" format. I.e.
The location of the maximum value in the output file tells us where the bump is.
Definition in file test_conv_semi_memo.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 53 of file test_conv_semi_memo.c.