38 #include <gsl/gsl_math.h>
39 #include <gsl/gsl_blas.h>
40 #include <gsl/gsl_linalg.h>
41 #include <gsl/gsl_eigen.h>
42 #include <gsl/gsl_roots.h>
44 #include <lal/TascPorbTiling.h>
45 #include <lal/LALConstants.h>
46 #include <lal/LogPrintf.h>
48 #include <lal/GSLHelpers.h>
53 #define UNUSED __attribute__ ((unused))
59 #define SQR(x) ((x)*(x))
62 #define RE_SQRT(x) sqrt(GSL_MAX(DBL_EPSILON, (x)))
78 const size_t dim UNUSED,
79 const gsl_matrix *
cache UNUSED,
80 const gsl_vector *point
88 const double Tasc = gsl_vector_get( point,
info->tasc_dim );
90 double Tscaled = ( Tasc -
info->T0p ) /
info->sigTp;
92 if ( !(
info->sheared ) ) {
93 Pscaled +=
info->norb *
info->sigP * Tscaled /
info->sigTp;
112 return info->P0 +
info->sigP * Pscaled;
117 LatticeTiling *tiling,
118 const size_t tasc_dimension,
119 const size_t porb_dimension,
141 info_lower.tasc_dim = info_upper.tasc_dim = tasc_dimension;
142 info_lower.norb = info_upper.norb = norb;
143 info_lower.T0p = info_upper.T0p =
T0 + norb * P0;
144 info_lower.P0 = info_upper.P0 = P0;
145 info_lower.sigTp = info_upper.sigTp = sqrt(
SQR( sigT ) +
SQR( norb ) *
SQR( sigP ) );
146 info_lower.pmsigT = -sigT;
147 info_upper.pmsigT = sigT;
148 info_lower.sigP = info_upper.sigP = sigP;
149 info_lower.ksq = info_upper.ksq =
SQR(
nsigma );
150 info_lower.sheared = info_upper.sheared = useShearedPeriod;
int XLALSetLatticeTilingPorbEllipticalBound(LatticeTiling *tiling, const size_t tasc_dimension, const size_t porb_dimension, const double P0, const double sigP, const double T0, const double sigT, const int norb, const double nsigma, const BOOLEAN useShearedPeriod)
Set an orbital period as a function of time of ascension.
static double PorbEllipticalBound(const void *data, const size_t dim UNUSED, const gsl_matrix *cache UNUSED, const gsl_vector *point)
#define XLAL_INIT_DECL(var,...)
int XLALSetLatticeTilingBound(LatticeTiling *tiling, const size_t dim, const LatticeTilingBound func, const size_t data_len, const void *data_lower, const void *data_upper)
Set a parameter-space bound on a dimension of the lattice tiling.
#define XLAL_CHECK(assertion,...)