There will be maintenance performed on git.ligo.org, chat.ligo.org, containers.lig.org, and docs.ligo.org starting at 9am PDT on Tuesday 18th August 2020. There will be an extremely small period of downtime at the start of the maintenance window as various services are restarted. Please address any comments, questions, or concerns to computing-help@igwn.org.

Commit ca67bd3d authored by Arunava Mukherjee's avatar Arunava Mukherjee Committed by Karl Wette

UniversalDopplerMetric: added new binary-orbital coordinates for quasi-flat metric

- added unit test comparing transformed old-coordinate metric against metric
  computed in these new coordinates
- refs #5438
Original: cc212027808ce4f379dde0fb8cde7a420644dd29
parent 14132770
/*
* Copyright (C) 2017 Arunava Mukherjee
* Copyright (C) 2012--2015 Karl Wette
* Copyright (C) 2008, 2009 Reinhard Prix
*
......@@ -136,8 +137,13 @@ static const struct {
[DOPPLERCOORD_ASINI] = {"asini", 1, "Projected semimajor axis of binary orbit in small-eccentricy limit (ELL1 model) [Units: light seconds]."},
[DOPPLERCOORD_TASC] = {"tasc", 1, "Time of ascension (neutron star crosses line of nodes moving away from observer) for binary orbit (ELL1 model) [Units: GPS seconds]."},
[DOPPLERCOORD_PORB] = {"porb", 1, "Period of binary orbit (ELL1 model) [Units: s]."},
[DOPPLERCOORD_KAPPA] = {"kappa", 1, "Lagrange parameter 'kappa = ecc * cos(argp)', ('ecc' = eccentricity, 'argp' = argument of periapse) of binary orbit (ELL1 model) [Units: none]."},
[DOPPLERCOORD_ETA] = {"eta", 1, "Lagrange parameter 'eta = ecc * sin(argp) of binary orbit (ELL1 model) [Units: none]."}
[DOPPLERCOORD_KAPPA] = {"kappa", 1, "Lagrange parameter 'kappa = ecc * cos(argp)', ('ecc' = eccentricity, 'argp' = argument of periapse) of binary orbit (ELL1 model) [Units: none]."},
[DOPPLERCOORD_ETA] = {"eta", 1, "Lagrange parameter 'eta = ecc * sin(argp) of binary orbit (ELL1 model) [Units: none]."},
[DOPPLERCOORD_DASC] = {"dasc", 1, "Distance traversed on the arc of binary orbit (ELL1 model) 'dasc = 2 * pi * (ap/porb) * tasc' [Units: light second]."},
[DOPPLERCOORD_VP] = {"vp", 1, "Rescaled (by asini) differential-coordinate 'dvp = asini * dOMEGA', ('OMEGA' = 2 * pi/'porb') of binary orbit (ELL1 model) [Units: (light second)/(GPS second)]."},
[DOPPLERCOORD_KAPPAP] = {"kappap", 1, "Rescaled (by asini) differential-coordinate 'dkappap = asini * dkappa' [Units: light seconds]."},
[DOPPLERCOORD_ETAP] = {"etap", 1, "Rescaled (by asini) differential-coordinate 'detap = asini * deta' [Units: light seconds]."}
};
......@@ -713,6 +719,23 @@ CW_Phi_i ( double tt, void *params )
ret = LAL_PI * Freq * orb_asini * cos2Psi;
break;
// --------- rescaled binary orbital parameters for (approximately) flat metric
case DOPPLERCOORD_DASC: /**< Distance traversed on the arc of binary orbit (ELL1 model) 'dasc = 2 * pi * (ap/porb) * tasc' [Units: light second]." */
ret = LAL_TWOPI * Freq * ( cosPsi + orb_kappa * cos2Psi + orb_eta * sin2Psi );
break;
case DOPPLERCOORD_VP: /**< Rescaled (by asini) differential-coordinate 'dvp = asini * dOMEGA', ('OMEGA' = 2 * pi/'porb') of binary orbit (ELL1 model) [Units: (light second)/(GPS second)]. */
ret = - LAL_TWOPI * Freq * ( orb_phase/orb_Omega ) * ( cosPsi + orb_kappa * cos2Psi + orb_eta * sin2Psi );
break;
case DOPPLERCOORD_KAPPAP: /**< Rescaled (by asini) differential-coordinate 'dkappap = asini * dkappa' [Units: light seconds]. */
ret = - LAL_PI * Freq * sin2Psi;
break;
case DOPPLERCOORD_ETAP: /**< Rescaled (by asini) differential-coordinate 'detap = asini * deta' [Units: light seconds]. */
ret = LAL_PI * Freq * cos2Psi;
break;
// ------------------------------------------------
default:
par->errnum = XLAL_EINVAL;
......
/*
* Copyright (C) 2017 Arunava Mukherjee
* Copyright (C) 2012--2015 Karl Wette
* Copyright (C) 2008, 2009 Reinhard Prix
*
......@@ -151,6 +152,12 @@ typedef enum tagDopplerCoordinateID {
DOPPLERCOORD_KAPPA, /**< Lagrange parameter 'kappa = ecc * cos(argp)', ('ecc' = eccentricity, 'argp' = argument of periapse) of binary orbit (ELL1 model) [Units: none] */
DOPPLERCOORD_ETA, /**< Lagrange parameter 'eta = ecc * sin(argp) of binary orbit (ELL1 model) [Units: none] */
DOPPLERCOORD_VP, /**< Rescaled (by asini) differential-coordinate 'dvp = asini * dOMEGA', ('OMEGA' = 2 * pi/'porb') of binary orbit (ELL1 model) [Units: (light second)/(GPS second)]. */
DOPPLERCOORD_DASC, /**< Distance traversed on the arc of binary orbit (ELL1 model) 'dasc = 2 * pi * (ap/porb) * tasc' [Units: light second]. */
DOPPLERCOORD_KAPPAP, /**< Rescaled (by asini) differential-coordinate 'dkappap = asini * dkappa' [Units: light seconds]. */
DOPPLERCOORD_ETAP, /**< Rescaled (by asini) differential-coordinate 'detap = asini * deta' [Units: light seconds]. */
DOPPLERCOORD_LAST
} DopplerCoordinateID;
......
/*
* Copyright (C) 2017 Arunava Mukherjee
* Copyright (C) 2015 Karl Wette
* Copyright (C) 2009 Reinhard Prix
*
......@@ -466,10 +467,43 @@ test_XLALComputeDopplerMetrics ( void )
XLAL_CHECK ( (diff = XLALCompareMetrics ( metric_ScoX1->g_ij, g0_ij )) < tolScoX1, XLAL_ETOL, "Error(gNum,gAn)= %g exceeds tolerance of %g\n", diff, tolScoX1 );
XLALPrintWarning ("diff_Num_An = %e\n", diff );
XLALPrintWarning("\n---------- ROUND 7: directed binary orbital metric -- comparison between 'old' and 'new' coords ----------\n");
// ----- 2nd part of the test: compare ScoX1 metric in new coordinates against old one
DopplerMetricParams pars_ScoX1_newCoords = pars_ScoX1;
const DopplerCoordinateSystem coordSysScoX1_newCoords = { 6, { DOPPLERCOORD_FREQ, DOPPLERCOORD_ASINI, DOPPLERCOORD_DASC, DOPPLERCOORD_VP, DOPPLERCOORD_KAPPAP, DOPPLERCOORD_ETAP } };
pars_ScoX1_newCoords.coordSys = coordSysScoX1_newCoords;
DopplerPhaseMetric *metric_ScoX1_newCoords;
XLAL_CHECK ( (metric_ScoX1_newCoords = XLALComputeDopplerPhaseMetric ( &pars_ScoX1_newCoords, edat )) != NULL, XLAL_EFUNC );
// apply coordinate transformation
gsl_matrix *Trnf_ij; /* This is the matrix for co-ordinate transformation from old to new */
XLAL_CHECK ( (Trnf_ij = gsl_matrix_calloc ( 6, 6 )) != NULL, XLAL_ENOMEM, "Failed to gsl_calloc a 6x6 matrix\n");
gsl_matrix_set ( Trnf_ij, 0, 0, 1.0 );
gsl_matrix_set ( Trnf_ij, 1, 1, 1.0 );
gsl_matrix_set ( Trnf_ij, 2, 2, asini * Omega );
gsl_matrix_set ( Trnf_ij, 3, 3, -1.0 * asini * pow ( Omega, 2 )/(2 * LAL_PI) );
gsl_matrix_set ( Trnf_ij, 4, 4, asini );
gsl_matrix_set ( Trnf_ij, 5, 5, asini );
XLAL_CHECK ( XLALInverseTransformMetric( &metric_ScoX1->g_ij, Trnf_ij, metric_ScoX1->g_ij) == XLAL_SUCCESS, XLAL_EFUNC );
// output metrics
GPMAT ( metric_ScoX1->g_ij, "%0.4e" );
GPMAT ( metric_ScoX1_newCoords->g_ij, "%0.4e" );
// compare metrics
REAL8 Coord_diff, tolCoordScoX1 = 1e-10; // should be purely numerical differences
XLAL_CHECK ( (Coord_diff = XLALCompareMetrics ( metric_ScoX1_newCoords->g_ij, metric_ScoX1->g_ij )) < tolCoordScoX1, XLAL_ETOL, "Error(gNum,gAn)= %g exceeds tolerance of %g\n", Coord_diff, tolCoordScoX1 );
XLALPrintWarning ("rel diff old vs new coords = %e\n", Coord_diff );
// free memory
gsl_matrix_free ( g0_ij );
XLALDestroyDopplerPhaseMetric ( metric_ScoX1 );
XLALDestroyDopplerPhaseMetric ( metric_ScoX1_newCoords );
XLALSegListClear ( &segListScoX1 );
}
} // end: Round 6 + 7 (binary orbital metrics)
// ----- clean up memory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment