LALPulsar  6.1.0.1-89842e6
DopplerFullScan.c File Reference

Functions for handling "full" multi-dimensional search-grids for CFS. as opposed to the "factored" grids implemented in DopplerScan.[ch]. More...

Prototypes

int XLALInitFactoredGrid (DopplerFullScanState *scan, const DopplerFullScanInit *init)
 Initialize Doppler-scanner to emulate an old-style factored template grid: 'sky x f0dot x f1dot x f2dot x f3dot'. More...
 
int nextPointInFactoredGrid (PulsarDopplerParams *pos, DopplerFullScanState *scan)
 return current grid-point and step forward one template in 'factored' grids (sky x f0dot x f1dot ... More...
 
int XLALLoadFullGridFile (DopplerFullScanState *scan, const DopplerFullScanInit *init)
 load a full multi-dim template grid from the file init->gridFile, the file-format is: lines of 6 columns, which are: More...
 
DopplerFullScanState * XLALInitDopplerFullScan (const DopplerFullScanInit *init)
 Set up a full multi-dimensional grid-scan. More...
 
void InitDopplerFullScan (LALStatus *status, DopplerFullScanState **scan, const DopplerFullScanInit *init)
 
int XLALGetDopplerSpinRange (PulsarSpinRange *spinRange, const DopplerFullScanState *scan)
 Return the spin-range spanned by the given template bank stored in the opaque DopplerFullScanState. More...
 
REAL8 XLALNumDopplerTemplates (DopplerFullScanState *scan)
 Return (and compute if not done so yet) the total number of Doppler templates of the DopplerScan scan. More...
 
int XLALNextDopplerPos (PulsarDopplerParams *pos, DopplerFullScanState *scan)
 Function to step through the full template grid point by point. More...
 
static void XLALREAL8VectorListDestroy (REAL8VectorList *head)
 
void XLALDestroyDopplerFullScan (DopplerFullScanState *scan)
 Destroy the a full DopplerFullScanState structure. More...
 
static REAL8VectorListXLALREAL8VectorListAddEntry (REAL8VectorList *head, const REAL8Vector *entry)
 
static double F1DotAgeBrakingBound (const void *data, const size_t dim UNUSED, const gsl_matrix *cache UNUSED, const gsl_vector *point)
 
int XLALSetLatticeTilingF1DotAgeBrakingBound (LatticeTiling *tiling, const size_t freq_dimension, const size_t f1dot_dimension, const double age, const double min_braking, const double max_braking)
 Set a first spindown bound derived from spindown age and braking indices. More...
 
static double F2DotBrakingBound (const void *data, const size_t dim UNUSED, const gsl_matrix *cache UNUSED, const gsl_vector *point)
 
int XLALSetLatticeTilingF2DotBrakingBound (LatticeTiling *tiling, const size_t freq_dimension, const size_t f1dot_dimension, const size_t f2dot_dimension, const double min_braking, const double max_braking)
 Set a second spindown bound derived from braking indices. More...
 

Detailed Description

Functions for handling "full" multi-dimensional search-grids for CFS. as opposed to the "factored" grids implemented in DopplerScan.[ch].

Author
Reinhard Prix, Karl Wette
Date
2006, 2007, 2008

Definition in file DopplerFullScan.c.

Go to the source code of this file.

Data Structures

struct  factoredGridScan_t
 
struct  REAL8VectorList
 doubly linked list of REAL8-vectors (physical vectors) More...
 
struct  DopplerFullScanState
 --— internal [opaque] type to store the state of a FULL multidimensional grid-scan --— More...
 
struct  F1DotAgeBrakingBoundInfo
 
struct  F2DotBrakingBoundInfo
 

Macros

#define MIN(x, y)   (x < y ? x : y)
 
#define MAX(x, y)   (x > y ? x : y)
 
#define TRUE   (1==1)
 
#define FALSE   (1==0)
 

Macro Definition Documentation

◆ MIN

#define MIN (   x,
  y 
)    (x < y ? x : y)

Definition at line 42 of file DopplerFullScan.c.

◆ MAX

#define MAX (   x,
  y 
)    (x > y ? x : y)

Definition at line 43 of file DopplerFullScan.c.

◆ TRUE

#define TRUE   (1==1)

Definition at line 45 of file DopplerFullScan.c.

◆ FALSE

#define FALSE   (1==0)

Definition at line 46 of file DopplerFullScan.c.

Function Documentation

◆ XLALInitFactoredGrid()

int XLALInitFactoredGrid ( DopplerFullScanState *  scan,
const DopplerFullScanInit init 
)

Initialize Doppler-scanner to emulate an old-style factored template grid: 'sky x f0dot x f1dot x f2dot x f3dot'.

This is a compatiblity-mode with the previous implementation currently also used in ComputeFstatistic.c.

Parameters
scan[bout] initialized Doppler scan state
[in]initinitialization parameters

Definition at line 302 of file DopplerFullScan.c.

◆ nextPointInFactoredGrid()

int nextPointInFactoredGrid ( PulsarDopplerParams pos,
DopplerFullScanState *  scan 
)

return current grid-point and step forward one template in 'factored' grids (sky x f0dot x f1dot ...

) return 0 = OK, -1 = ERROR

Definition at line 541 of file DopplerFullScan.c.

◆ XLALLoadFullGridFile()

int XLALLoadFullGridFile ( DopplerFullScanState *  scan,
const DopplerFullScanInit init 
)

load a full multi-dim template grid from the file init->gridFile, the file-format is: lines of 6 columns, which are:

Freq Alpha Delta f1dot f2dot f3dot

Note
*) this function returns the effective spinRange covered by the read-in template bank by storing it in scan->spinRange, potentially overwriting any previous user-input values in there.

*) a possible future extension should probably clip the template-bank to the user-specified ranges, then return the effective ranges spanned by the resultant template bank.

*) in order to avoid surprises until such a feature is implemented, we currently return an error if any of the input spinRanges are non-zero

Definition at line 727 of file DopplerFullScan.c.

◆ XLALInitDopplerFullScan()

DopplerFullScanState* XLALInitDopplerFullScan ( const DopplerFullScanInit init)

Set up a full multi-dimensional grid-scan.

Currently this only emulates a 'factored' grid-scan with 'sky x Freq x f1dot ...' , but keeps all details within the DopplerScan module for future extension to real multidimensional grids.

NOTE: Use 'XLALNextDopplerPos()' to step through this template grid.

Parameters
[in]initinitialization parameters

Definition at line 106 of file DopplerFullScan.c.

◆ InitDopplerFullScan()

void InitDopplerFullScan ( LALStatus status,
DopplerFullScanState **  scan,
const DopplerFullScanInit init 
)
Deprecated:
Use XLALInitDopplerFullScan() instead.
Parameters
statuspointer to LALStatus structure
[out]scaninitialized Doppler scan state
[in]initinitialization parameters

Definition at line 252 of file DopplerFullScan.c.

◆ XLALGetDopplerSpinRange()

int XLALGetDopplerSpinRange ( PulsarSpinRange spinRange,
const DopplerFullScanState *  scan 
)

Return the spin-range spanned by the given template bank stored in the opaque DopplerFullScanState.

Note
The user cannot directly access any internal fields of that opaque type, which is why we need this API.

Definition at line 281 of file DopplerFullScan.c.

◆ XLALNumDopplerTemplates()

REAL8 XLALNumDopplerTemplates ( DopplerFullScanState *  scan)

Return (and compute if not done so yet) the total number of Doppler templates of the DopplerScan scan.

Definition at line 381 of file DopplerFullScan.c.

◆ XLALNextDopplerPos()

int XLALNextDopplerPos ( PulsarDopplerParams pos,
DopplerFullScanState *  scan 
)

Function to step through the full template grid point by point.

Normal return = 0, errors return -1, end of scan is signalled by return = 1

Definition at line 417 of file DopplerFullScan.c.

◆ XLALREAL8VectorListDestroy()

static void XLALREAL8VectorListDestroy ( REAL8VectorList head)
static

Definition at line 608 of file DopplerFullScan.c.

◆ XLALDestroyDopplerFullScan()

void XLALDestroyDopplerFullScan ( DopplerFullScanState *  scan)

Destroy the a full DopplerFullScanState structure.

Definition at line 636 of file DopplerFullScan.c.

◆ XLALREAL8VectorListAddEntry()

static REAL8VectorList* XLALREAL8VectorListAddEntry ( REAL8VectorList head,
const REAL8Vector entry 
)
static

Definition at line 673 of file DopplerFullScan.c.

◆ F1DotAgeBrakingBound()

static double F1DotAgeBrakingBound ( const void *  data,
const size_t dim  UNUSED,
const gsl_matrix *cache  UNUSED,
const gsl_vector *  point 
)
static

Definition at line 878 of file DopplerFullScan.c.

◆ XLALSetLatticeTilingF1DotAgeBrakingBound()

int XLALSetLatticeTilingF1DotAgeBrakingBound ( LatticeTiling *  tiling,
const size_t  freq_dimension,
const size_t  f1dot_dimension,
const double  age,
const double  min_braking,
const double  max_braking 
)

Set a first spindown bound derived from spindown age and braking indices.

Parameters
[in]tilingLattice tiling
[in]freq_dimensionFrequency dimension
[in]f1dot_dimensionFirst spindown dimension
[in]ageSpindown age
[in]min_brakingMinimum braking index
[in]max_brakingMaximum braking index

Definition at line 897 of file DopplerFullScan.c.

◆ F2DotBrakingBound()

static double F2DotBrakingBound ( const void *  data,
const size_t dim  UNUSED,
const gsl_matrix *cache  UNUSED,
const gsl_vector *  point 
)
static

Definition at line 933 of file DopplerFullScan.c.

◆ XLALSetLatticeTilingF2DotBrakingBound()

int XLALSetLatticeTilingF2DotBrakingBound ( LatticeTiling *  tiling,
const size_t  freq_dimension,
const size_t  f1dot_dimension,
const size_t  f2dot_dimension,
const double  min_braking,
const double  max_braking 
)

Set a second spindown bound derived from braking indices.

Parameters
[in]tilingLattice tiling
[in]freq_dimensionFrequency dimension
[in]f1dot_dimensionFirst spindown dimension
[in]f2dot_dimensionSecond spindown dimension
[in]min_brakingMinimum braking index
[in]max_brakingMaximum braking index

Definition at line 953 of file DopplerFullScan.c.