00001 /* 00002 * Copyright (C) 2004, 2005 Reinhard Prix 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with with program; see the file COPYING. If not, write to the 00016 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00017 * MA 02111-1307 USA 00018 */ 00019 00020 /** 00021 * \author Reinhard Prix 00022 * \date 2005 00023 * \file 00024 * \ingroup pulsarCommon 00025 * \brief Some common useful data-types for pulsar-searches. 00026 * 00027 * $Id: PulsarDataTypes.h,v 1.19 2008/01/11 13:28:50 cm Exp $ 00028 * 00029 */ 00030 00031 #ifndef _PULSARDATATYPES_H /* Double-include protection. */ 00032 #define _PULSARDATATYPES_H 00033 00034 #include <gsl/gsl_matrix.h> 00035 00036 #include <lal/LALDatatypes.h> 00037 #include <lal/DetectorSite.h> 00038 #include <lal/Date.h> 00039 #include <lal/SkyCoordinates.h> 00040 #include <lal/LALBarycenter.h> 00041 00042 #include "SFTutils.h" 00043 00044 /* C++ protection. */ 00045 #ifdef __cplusplus 00046 extern "C" { 00047 #endif 00048 00049 NRCSID( PULSARDATATYPESH, "$Id: PulsarDataTypes.h,v 1.19 2008/01/11 13:28:50 cm Exp $"); 00050 00051 /** maximal number of spin-parameters (Freq + spindowns) we can handle */ 00052 #define PULSAR_MAX_SPINS 4 00053 00054 /** Type defining the orbital parameters of a binary pulsar */ 00055 typedef struct { 00056 LIGOTimeGPS tp; /**< time of observed periapsis passage (in SSB) */ 00057 REAL8 argp; /**< argument of periapsis (radians) */ 00058 REAL8 asini; /**< projected, normalized orbital semi-major axis (s) */ 00059 REAL8 ecc; /**< orbital eccentricity */ 00060 REAL8 period; /**< orbital period (sec) */ 00061 } BinaryOrbitParams; 00062 00063 /** Type containing the JKS 'amplitude parameters' {h0, cosi, phi0, psi} */ 00064 typedef struct { 00065 REAL8 h0; /**< overall signal amplitude */ 00066 REAL8 cosi; /**< cos(iota) of inclination angle iota of spin-axis wrt line of sight */ 00067 REAL8 psi; /**< polarization angle psi */ 00068 REAL8 phi0; /**< initial signal-phase (at some reference time) */ 00069 } PulsarAmplitudeParams; 00070 00071 typedef REAL8 PulsarSpins[PULSAR_MAX_SPINS]; 00072 00073 /** Contains a "spin-range", ie spins \f$f^{(k)}\f$ and corresponding bands \f$\Delta f^{(k)}\f$ 00074 * at a given (SSB) reference GPS-time \f$\tau\f$. 00075 * "Canonical" ordering refers to \f$\Delta f^{(k)} >= 0\f$ for all k. 00076 */ 00077 typedef struct 00078 { 00079 LIGOTimeGPS refTime; /**< SSB reference GPS-time at which spin-range is defined */ 00080 PulsarSpins fkdot; /**< Vector of spin-values \f$f^{(k)}\f$ */ 00081 PulsarSpins fkdotBand; /**< Vector of spin-bands \f$\Delta f^{(k)}\f$, MUST be same length as fkdot */ 00082 } PulsarSpinRange; 00083 00084 /** Type containing the 'Doppler-parameters' affecting the time-evolution of the phase */ 00085 typedef struct { 00086 LIGOTimeGPS refTime; /**< reference time of pulsar parameters (in SSB!) */ 00087 REAL8 Alpha; /**< skyposition: RA (longitude) in equatorial coords and radians */ 00088 REAL8 Delta; /**< skyposition: DEC (latitude) in equatorial coords and radians */ 00089 PulsarSpins fkdot; /**< intrinsic spins: [Freq, f1dot, f2dot, ... ] where fkdot = d^kFreq/dt^k */ 00090 BinaryOrbitParams *orbit; /**< binary orbital parameters (or NULL if isolated pulsar) */ 00091 } PulsarDopplerParams; 00092 00093 /** Type defining the parameters of a pulsar-source of Gravitational waves */ 00094 typedef struct { 00095 PulsarAmplitudeParams Amp; /**< 'Amplitude-parameters': h0, cosi, phi0, psi */ 00096 PulsarDopplerParams Doppler; /**< 'Doppler-parameters': {skypos, fkdot, orbital params } */ 00097 } PulsarParams; 00098 00099 /** Type containing a "candidate": parameter-space point with estimated errors and Fstat-value/significance */ 00100 typedef struct { 00101 PulsarAmplitudeParams Amp, dAmp; /**< amplitude-parameters and error-estimates */ 00102 PulsarDopplerParams Doppler, dDoppler;/**< Doppler-parameters and error-bars */ 00103 REAL8 significance; /**< a (user-chosen) measure of 'significance': Fstat, Hough-count,... */ 00104 gsl_matrix *AmpFisherMatrix; /**< Fisher-matrix of amplitude-subspace: has more info than dAmp! */ 00105 } PulsarCandidate; 00106 00107 00108 /** [DEPRECATED] Type defining the parameters of a pulsar-source of Gravitational waves. 00109 * NOTE: this type is obsolete and should no longer be used [==> use 'PulsarParams' instead] 00110 * however, it's too entrenched in the the GeneratePulsarSignal() functions and codes using it, 00111 * so we can't easily get rid of it any more, so we keep it for now.... 00112 */ 00113 typedef struct { 00114 LIGOTimeGPS refTime; /**< reference time of pulsar parameters (in SSB!) */ 00115 SkyPosition position; /**< source location (in radians) */ 00116 REAL4 psi; /**< polarization angle (radians) at tRef */ 00117 REAL4 aPlus; /**< plus-polarization amplitude at tRef */ 00118 REAL4 aCross; /**< cross-polarization amplitude at tRef */ 00119 REAL8 phi0; /**< initial phase (radians) at tRef */ 00120 REAL8 f0; /**< WAVE-frequency(!) at tRef (in Hz) */ 00121 REAL8Vector *spindown;/**< wave-frequency spindowns at tRef (NOT f0-normalized!) */ 00122 } PulsarSourceParams; 00123 00124 /*---------- Global variables ----------*/ 00125 /* empty init-structs for the types defined in here */ 00126 extern const BinaryOrbitParams empty_BinaryOrbitParams; 00127 extern const PulsarAmplitudeParams empty_PulsarAmplitudeParams; 00128 extern const PulsarSpinRange empty_PulsarSpinRange; 00129 extern const PulsarDopplerParams empty_PulsarDopplerParams; 00130 extern const PulsarParams empty_PulsarParams; 00131 extern const PulsarCandidate empty_PulsarCandidate; 00132 00133 /* initializers for frequently used non-pulsar types */ 00134 extern const LIGOTimeGPS empty_LIGOTimeGPS; 00135 extern const BarycenterInput empty_BarycenterInput; 00136 extern const EphemerisData empty_EphemerisData; 00137 extern const SkyPosition empty_SkyPosition; 00138 00139 #ifdef __cplusplus 00140 } 00141 #endif 00142 /* C++ protection. */ 00143 00144 #endif /* Double-include protection. */
1.5.2