libftsh
A Fast Transform for Spherical Harmonics
|
Discrete Cosine Transform based on FFTW. More...
#include "libftsh.h"
Defines | |
#define | ENTEREXIT 0 |
Functions | |
void | dctw (REAL *fcn, Ftrigtw_Plan *main_plan, int dir) |
void | rfftw_to_NR_format (REAL *data_nr, REAL *data_rfftw, int numpts, int dir) |
void | dctw_init (Ftrigtw_Plan *main_plan, int flags, int numpts) |
Discrete Cosine Transform based on FFTW.
Summary:
void dctw | ( | REAL * | fcn, |
Ftrigtw_Plan * | main_plan, | ||
int | dir | ||
) |
Computes the disrete cosine transform of fcn and puts the coefficients back into fcn
This is the DCT at half integer points.
INPUTS:
OUTPUT: fcn.
numpts-1 k (j+0.5) fcn[k]= SUM fcn[j] cos( PI ---------------- ) *norm j=0 numpts set for L^2 normalization.
NOTES:
void dctw_init | ( | Ftrigtw_Plan * | main_plan, |
int | flags, | ||
int | numpts | ||
) |
This routine initializes for dctw
We initialize trigonometic things used by the lct and dct portions, and call the initailizer for the fftw real transform (forward). INPUTS: - main_plan -- a structure that will hold the things we generate Memory for its fields is allocated in this routine. - flags -- flags passed directly to the rfftw initializer - numpts -- the number of points on which we will transform MUST be even OUTPUTS: main_plan is filled in: NOTES: - comment better
keep these always as double so we don't lose precision
void rfftw_to_NR_format | ( | REAL * | data_nr, |
REAL * | data_rfftw, | ||
int | numpts, | ||
int | dir | ||
) |
Translates between the formats for the real discrete fourier transform used by the rfftw package and the Numerical Recipies routines. This helps allow the NR DCT routine to call the rfftw.
INPUTS:
OUTPUTS:
NOTES: