FCT Documentation


Index

Home

Installation

Download

Click here to download the source code for the fast chirp transform library. Place this file in a clean directory and type tar -xf fct.tar. The current implementation requires the FFTW libraries to be installed on your system. Click here to obtain FFTW.

Compile

After downloading and extracting the fct distribution ( see Download), run your favorite text editor on the file Makefile and edit the variables FFTW_include and FFTW_library. These variables tell make where to find the necessary files from the FFTW distribution. Save the Makefile and type make. This should generate the library archive libfct.a and the sample program fct_sample. Run fct_sample. If you see the words "The FCT appears to be working properly." and some version information, then the FCT distribution compiled properly. The test program fct_sample will also create two files: input.data and output.data. These are a series of floating point numbers which represent a chirp signal (input.data) and its FCT (output.data). Once you have tested the FCT and know that it is working properly, place the library archive file libfct.a in a directory that is accessible by your compilers.

Back to index


Using the FCT

The Sample Code

The code sample fct_sample.C has been included with the distribution. This code initializes a 2-D FCT with a quadratic chirp phase function. The FCT is set up to analyze a 1024 point complex data set with a t_0 (linear phase conjugate variable) resolution of 1024 points and a t_1 (quadratic phase conjugate variable) resolution of 128 points. Hence, the result will be a 128x1024 grid of points. The sample code also generates a quadratic chirp test signal and then runs the FCT on this data set. The initial data set is written out as a series of binary floating point complex numbers in the file input.data. The FCT of the data is also written out as a series of binary floating point complex numbers in the file output.data. The resulting grid is stored so that the point (t_0,t_1) is located at index i_real = 2*(t_0 + 1024*t_1) and i_imaginary = ireal+1.

Linking

When linking to the FCT library, make sure you use the following switches on the linker/compiler command line:

-lfct -lfftw -Lfct_library_directory -Lfftw_library_directory

Back to index

Function Overview

Below is a description of the functions included in version 1.0 of the FCT distribution.

set_N_dimensions
Prototype: void set_N_dimensions(int N_dimensions)
Description: This function sets the number of dimensions used in the chirp transform. Version 1.0 only supports 2 dimensions.
Inputs: N_dimensions = number of dimensions
Return Values: None

Back to index

set_N_data
Prototype: void set_N_data(int N_data)
Description: This function sets the total number of complex data points in the initial data set.
Inputs: N_data = number of complex data points
Return Values: None

Back to index

set_phase_function
Prototype: void set_phase_function(int dimension, int N_tau, float (*phase_function)(float))
Description: The function set the phase function for a given dimension. In version 1.0, only the phase function for dimension 1 can be set.
Inputs:
dimension = which dimension this phase function corresponds to. (In Version 1.0, this can only equal 1)
N_tau = the number of complex points in this dimension
phase_function = a pointer to the phase function for the given dimension.
Return Values: None

Back to index

set_N_tau0
Prototype: void set_N_tau0(int N_tau0)
Description: This function sets the length of dimension 0.
Inputs: N_tau0 = the length of dimension 0 in complex data points
Return Values: None

Back to index

initialize
Prototype: int initialize(int type)
Description: This function initializes the FCT. This must be called before calling fcxf() and after calling all of the following: set_N_dimensions(), set_N_data(), set_phase_function(), and set_N_tau0().
Inputs: N_tau0 = the length of dimension 0 in complex data points
Return Values: None

Back to index

get_output_data_length
Prototype: int get_output_data_length(void)
Description: This function return the number of complex data points in the output array generated by the FCT. Use this function to determine how much space to allocate for the output data array.
Inputs: None
Return Values: The number of complex data points in the output array.

Back to index

get_largest_data_segment
Prototype: int get_largest_data_segment(void)
Description: This function returns the largest data segment as determined by the specified phase function. The value of N_tau0 set using set_N_tau0 must be greater then or equal to this value.
Inputs: None
Return Values: The number of complex data points in the largest data segment.

Back to index

fcxf
Prototype: void fcxf(float *input,float *output)
Description: This function performs the fast chirp transform on the input data. Note that the input pointer cannot equal the output pointer.
Inputs:
*input = A pointer to the input data array.
*output = A pointer to the output data array.
Return Values: None

Back to index


Properties of the phase function

The phase function determines the frequency sweep rate and specifies what type of signals the FCT will be detecting. This is discussed further in "Detection of Variable Frequency Signals Using a Fast Chirp Transform". For this implementation of the FCT, the phase function must satisfy three conditions:
  1. Increases monotonically between 0 and 1
  2. Equals 0 at x=0
  3. Equals 1 at x=1

Back to index