SPINspiral
SPINspiral is a parameter-estimation code for gravitational-wave signals detected by LIGO/Virgo
|
00001 /* 00002 00003 SPINspiral: parameter estimation on binary inspirals detected by LIGO, including spins of the binary members 00004 include/remez.h: 3rd-party routines 00005 00006 00007 Copyright 1995, 1998 Jake Janovetz (janovetz@uiuc.edu) 00008 00009 00010 This file is part of SPINspiral. 00011 00012 SPINspiral is free software: you can redistribute it and/or modify 00013 it under the terms of the GNU General Public License as published by 00014 the Free Software Foundation, either version 3 of the License, or 00015 (at your option) any later version. 00016 00017 SPINspiral is distributed in the hope that it will be useful, 00018 but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 GNU General Public License for more details. 00021 00022 You should have received a copy of the GNU General Public License 00023 along with SPINspiral. If not, see <http://www.gnu.org/licenses/>. 00024 00025 */ 00026 00027 00028 //Copied from remez.c, extracted from http://www.janovetz.com/jake/remez/remez-19980711.zip 00029 00030 /************************************************************************** 00031 * Parks-McClellan algorithm for FIR filter design (C version) 00032 *************************************************************************/ 00033 00034 00035 #ifndef __REMEZ_H__ 00036 #define __REMEZ_H__ 00037 00038 #define BANDPASS 1 00039 #define DIFFERENTIATOR 2 00040 #define HILBERT 3 00041 00042 #define NEGATIVE 0 00043 #define POSITIVE 1 00044 00045 #define Pi 3.1415926535897932 00046 #define Pi2 6.2831853071795865 00047 00048 #define GRIDDENSITY 16 00049 #define MAXITERATIONS 40 00050 00051 /* Function prototype for remez() - the only function that should need be 00052 * called from external code 00053 */ 00054 void remez(double h[], int numtaps, 00055 int numband, double bands[], double des[], double weight[], 00056 int type); 00057 00058 00059 void CreateDenseGrid(int r, int numtaps, int numband, double bands[], 00060 double des[], double weight[], int *gridsize, 00061 double Grid[], double D[], double W[], 00062 int symmetry); 00063 void InitialGuess(int r, int Ext[], int gridsize); 00064 void CalcParms(int r, int Ext[], double Grid[], double D[], double W[], 00065 double ad[], double x[], double y[]); 00066 double ComputeA(double freq, int r, double ad[], double x[], double y[]); 00067 void CalcError(int r, double ad[], double x[], double y[], 00068 int gridsize, double Grid[], 00069 double D[], double W[], double E[]); 00070 void Search(int r, int Ext[], 00071 int gridsize, double E[]); 00072 void FreqSample(int N, double A[], double h[], int symm); 00073 short isDone(int r, int Ext[], double E[]); 00074 00075 00076 #endif /* __REMEZ_H__ */ 00077