CoincInspiralEllipsoid.h 3.54 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
*  Copyright (C) 2007 Alexander Dietz, Drew Keppel, Craig Robinson
*
*  This program is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with with program; see the file COPYING. If not, write to the
*  Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
*  MA  02111-1307  USA
*/
19 20 21 22 23 24
#ifndef _COINCINSPIRALELLIPSOID_H
#define _COINCINSPIRALELLIPSOID_H

#ifdef  __cplusplus
extern "C" {
#endif
25

26 27 28 29 30 31 32 33 34
/*-----------------------------------------------------------------------
 *
 * File Name: CoincInspiralEllipsoid.h
 *
 * Author: Robinson, C. A.
 *
 *-----------------------------------------------------------------------
 */

35
/**
36
 * \defgroup CoincInspiralEllipsoid_h Header CoincInspiralEllipsoid.h
37
 * \ingroup lalinspiral_UNCLASSIFIED
38
 * \author Robinson, C. A.
39 40 41 42
 *
 * \brief Provides function definitions for performing inspiral coincidence analysis
 * using error ellipsoids.
 *
43 44
 * ### Synopsis ###
 *
45 46 47 48 49
 * \code
 * #include <lal/CoincInspiralEllipsoid.h>
 * \endcode
 *
 */
50
/*@{*/
51

52
#include    <lal/LALAtomicDatatypes.h>
53
#include    <lal/LIGOMetadataTables.h>
54
#include    <lal/LIGOMetadataInspiralUtils.h>
55 56
#include    <lal/EllipsoidOverlapTools.h>

57

58 59 60
#include    <gsl/gsl_vector.h>
#include    <gsl/gsl_matrix.h>

61 62 63 64 65
/**
 * The \c TriggerErrorList is a linked list used within e-thinca. It
 * contains pointers to the \c SnglInspiralTable for a given trigger,
 * and its associated error matrix and position vector.
 */
66 67 68 69 70 71 72 73
typedef struct tagTriggerErrorList
{
  SnglInspiralTable          *trigger;
  gsl_matrix                 *err_matrix;
  gsl_vector                 *position;
  struct tagTriggerErrorList *next;
}
TriggerErrorList;
74

75 76 77 78 79 80 81 82 83 84

/* Functions for checking for coincidence between inspiral events */
INT2 XLALCompareInspiralsEllipsoid(
      TriggerErrorList              *aPtr,
      TriggerErrorList              *bPtr,
      fContactWorkSpace             *workSpace,
      InspiralAccuracyList          *params
      );

/* Functions for generating the error matrix and position vectors for triggers */
85 86 87 88
gsl_matrix * XLALGetErrorMatrixFromSnglInspiral(
     SnglInspiralTable *event,
     REAL8              eMatch
     );
89

90 91 92 93 94
int XLALSetErrorMatrixFromSnglInspiral(gsl_matrix        *shape,
                                       SnglInspiralTable *event,
                                       REAL8              eMatch
                                       );

95 96 97
gsl_vector * XLALGetPositionFromSnglInspiral( SnglInspiralTable *table );

int XLALSetTimeInPositionVector( gsl_vector *position,
98
                                 REAL8       timeShift
99 100
                               );

101 102 103
/* Function for calculating the e-thinca parameter between coincident events */
REAL8 XLALCalculateEThincaParameter(
          SnglInspiralTable *table1,
104 105 106
          SnglInspiralTable *table2,
          InspiralAccuracyList* accuracyParams
);
107

108 109 110 111 112
REAL8 XLALEThincaParameterForInjection(
                    SimInspiralTable  *injection,
                    SnglInspiralTable *trigger
                    );

113
/*@}*/ /* end:CoincInspiralEllipsoid_h */
114

115 116 117 118 119
#ifdef  __cplusplus
}
#endif

#endif   /* _COINCINSPIRALELLIPSOID_H */