shapelet_basis

API documentation for shapelet_basis.c

A function to create a look-up shapelet basis function array, with relevant constants definitions.

Defines

sbf_N

101

Number of orders of basis functions (from 0 to 100 inclusive)

sbf_L

10001

Number of samples of each order of the basis functions

sbf_c

5000

If shapelet basis function is B(x), this is the array index where x=0

sbf_dx

0.01

If shapelet basis function is B(x), this is the x sampling resolution

Functions

float *create_sbf(float *sbf)

Create the 1D shapelet basis function look-up array sbf

sbf should have sbf_N * sbf_L * sizeof(float) of memory allocated.

Each 1D basis function is \(B_n(x, \beta)\), with \(n\) the basis function order, and \(\beta \) the scaling factor. For all stored arrays, I have set \(\beta=1\). Pre-written arrays of basis function orders \(n=0\) to \(n=100\) are then copied into sbf, each of length sbf_L. Each samples over the range \(-500\leq x \leq 500 \), with a resolution \( \Delta x = 0.01 \)

This single lookup array can then be used to generate 2D shapelet basis functions later on varying \(\beta\) values via a scaling factor.

Parameters

sbf[in] An array with sbf_N * sbf_L * sizeof(float) of memory allocated

Returns

The populated sbf array