Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
templates.h
Go to the documentation of this file.
1/*
2* Copyright (C) 2010, 2011 Evan Goetz
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; either version 2 of the License, or
7* (at your option) any later version.
8*
9* This program is distributed in the hope that it will be useful,
10* but WITHOUT ANY WARRANTY; without even the implied warranty of
11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12* GNU General Public License for more details.
13*
14* You should have received a copy of the GNU General Public License
15* along with with program; see the file COPYING. If not, write to the
16* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17* MA 02110-1301 USA
18*/
19
20#ifndef __TEMPLATES_H__
21#define __TEMPLATES_H__
22
23#include <lal/RealFFT.h>
24#include "TwoSpectTypes.h"
25
29TwoSpectTemplateVector *createTwoSpectTemplateVector( const UINT4 numTemplates, const UINT4 templateLength );
31TwoSpectTemplateVector *generateTwoSpectTemplateVector( const REAL8 Pmin, const REAL8 Pmax, const REAL8 dfmin, const REAL8 dfmax, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const UINT4 maxvectorlength, const UINT4 minTemplateLength, const UINT4 maxTemplateLength, const UINT4 vectormathflag, const BOOLEAN exactflag );
35
37INT4 makeTemplateGaussians2( TwoSpectTemplate *output, const REAL8 offset, const REAL8 P, const REAL8 deltaf, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const UINT4 minTemplateLength, const UINT4 vectormathflag );
38INT4 makeTemplate( TwoSpectTemplate *output, const candidate intput, const UserInput_t *params, const REAL4FFTPlan *plan );
39INT4 makeTemplate2( TwoSpectTemplate *output, const REAL8 offset, const REAL8 P, const REAL8 deltaf, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const UINT4 minTemplateLength, const UINT4 vectormathflag, const REAL4FFTPlan *plan );
40void insertionSort_template( TwoSpectTemplate *output, const REAL4 weight, const INT4 pixelloc );
41
44
45#endif
unsigned char BOOLEAN
double REAL8
char CHAR
uint32_t UINT4
int32_t INT4
float REAL4
TwoSpectTemplateVector * createTwoSpectTemplateVector(const UINT4 numTemplates, const UINT4 templateLength)
Create a TwoSpectTemplateVector.
Definition: templates.c:94
INT4 writeTwoSpectTemplateVector(const TwoSpectTemplateVector *vector, const CHAR *filename)
Write a TwoSpectTemplateVector to binary file.
Definition: templates.c:222
void insertionSort_template(TwoSpectTemplate *output, const REAL4 weight, const INT4 pixelloc)
Insertion sort for the template weights.
Definition: templates.c:938
TwoSpectTemplateVector * generateTwoSpectTemplateVector(const REAL8 Pmin, const REAL8 Pmax, const REAL8 dfmin, const REAL8 dfmax, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const UINT4 maxvectorlength, const UINT4 minTemplateLength, const UINT4 maxTemplateLength, const UINT4 vectormathflag, const BOOLEAN exactflag)
Generate a TwoSpectTemplateVector containing the template data.
Definition: templates.c:156
void resetTwoSpectTemplate(TwoSpectTemplate *template)
Reset the values in a TwoSpectTemplate.
Definition: templates.c:60
INT4 makeTemplate2(TwoSpectTemplate *output, const REAL8 offset, const REAL8 P, const REAL8 deltaf, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const UINT4 minTemplateLength, const UINT4 vectormathflag, const REAL4FFTPlan *plan)
Make an template based on FFT of sinc squared functions.
Definition: templates.c:771
TwoSpectTemplate * createTwoSpectTemplate(const UINT4 length)
Allocate a new TwoSpectTemplate.
Definition: templates.c:35
void destroyTwoSpectTemplateVector(TwoSpectTemplateVector *vector)
Free a TwoSpectTemplateVector.
Definition: templates.c:120
TwoSpectTemplateVector * readTwoSpectTemplateVector(const CHAR *filename)
Read a TwoSpectTemplateVector from a binary file.
Definition: templates.c:250
REAL8 sqsincxoverxsqminusone(const REAL8 x)
Calculate [sin(pi*x)/(pi*x)/(x^2-1)]^2.
Definition: templates.c:988
REAL8 sincxoverxsqminusone(const REAL8 x)
Calculate sin(pi*x)/(pi*x)/(x^2-1)
Definition: templates.c:963
void destroyTwoSpectTemplate(TwoSpectTemplate *template)
Free a TwoSpectTemplate.
Definition: templates.c:78
INT4 makeTemplateGaussians2(TwoSpectTemplate *output, const REAL8 offset, const REAL8 P, const REAL8 deltaf, const REAL8 Tsft, const REAL8 SFToverlap, const REAL8 Tobs, const UINT4 minTemplateLength, const UINT4 vectormathflag)
Make an estimated template based on FFT of train of Gaussians.
Definition: templates.c:374
INT4 convertTemplateForSpecificFbin(TwoSpectTemplate *output, const TwoSpectTemplate *input, const REAL8 freq, const UserInput_t *params)
Convert an arbitrary frequency bin template into a template for a specific frequency bin.
Definition: templates.c:330
INT4 makeTemplateGaussians(TwoSpectTemplate *output, const candidate input, const UserInput_t *params)
Make an estimated template based on FFT of train of Gaussians.
Definition: templates.c:289
INT4 makeTemplate(TwoSpectTemplate *output, const candidate intput, const UserInput_t *params, const REAL4FFTPlan *plan)
Make an template based on FFT of sinc squared functions.
Definition: templates.c:727