bilby.gw.eos.eos.SpectralDecompositionEOS

class bilby.gw.eos.eos.SpectralDecompositionEOS(gammas, p0=3.01e+33, e0=203000000000000.0, xmax=None, npts=100, sampling_flag=False, warning_flag=False)[source]

Bases: TabularEOS

Parameterized EOS using a spectral decomposition per Lindblom arXiv: 1009.0738v2. Inherits from TabularEOS.

Parameters:
gammas: list

List of adiabatic expansion parameters used to construct the equation of state in various spaces.

p0: float

The starting point in pressure of the high-density EoS. This is stitched to the low-density portion of the SLY EoS model. The default value chosen is set to a sufficiently low pressure so that the high-density EoS will never be overconstrained.

e0/c**2: float

The starting point in energy-density of the high-density EoS. This is stitched to the low-density portion of the SLY EoS model. The default value chosen is set to a sufficiently low energy density so that the high-density EoS will never be overconstrained.

xmax: float

highest dimensionless pressure value in EoS

npts: float (optional)

number of points in pressure-energy density data.

__init__(gammas, p0=3.01e+33, e0=203000000000000.0, xmax=None, npts=100, sampling_flag=False, warning_flag=False)[source]
__call__(*args, **kwargs)

Call self as a function.

Methods

__init__(gammas[, p0, e0, xmax, npts, ...])

check_causality()

Checks to see if the equation of state is causal i.e. the speed of sound in the star is less than the speed of light.

check_monotonicity()

Checks to see if the equation of state is monotonically increasing in energy density-pressure space.

dedh(pseudo_enthalpy[, rel_dh, interp_type])

Value of [depsilon/dh](p)

dedp(pressure[, rel_dp, interp_type])

Find value of [depsilon/dp](p)

energy_density(x, eps0)

energy_density_from_pseudo_enthalpy(...[, ...])

Find energy_density_from_pseudo_enthalpy(pseudo_enthalpy) as in lalsimulation, return e = K * h**(3./2.) below min enthalpy

energy_from_pressure(pressure[, interp_type])

Find value of energy_from_pressure as in lalsimulation, return e = K * p**(3./5.) below min pressure

mu(x)

plot(rep[, xlim, ylim, units])

Given a representation in the form 'energy_density-pressure', plot the EoS in that space.

pressure_from_pseudo_enthalpy(pseudo_enthalpy)

Find p(h) as in lalsimulation, return p = K * h**(5./2.) below min enthalpy

pseudo_enthalpy_from_energy_density(...[, ...])

Find h(epsilon) as in lalsimulation, return h = K * e**(2./3.) below min enthalpy

velocity_from_pseudo_enthalpy(pseudo_enthalpy)

Returns the speed of sound in geometerized units in the neutron star at the specified pressure.

check_causality()[source]

Checks to see if the equation of state is causal i.e. the speed of sound in the star is less than the speed of light. Returns True if causal, False if not.

check_monotonicity()[source]

Checks to see if the equation of state is monotonically increasing in energy density-pressure space. Returns True if monotonic, False if not.

dedh(pseudo_enthalpy, rel_dh=1e-05, interp_type='CubicSpline')[source]

Value of [depsilon/dh](p)

Parameters:
  • (float) (rel_dh) – Dimensionless pseudo-enthalpy.

  • (str) (interp_type) – String specifying interpolation type. Current implementations are ‘CubicSpline’, ‘linear’.

  • (float) – Relative step size in pseudo-enthalpy space.

Return dedh (float)float):

Derivative of energy-density with respect to pseudo-enthalpy evaluated at pseudo_enthalpy in geometerized units.

dedp(pressure, rel_dp=1e-05, interp_type='CubicSpline')[source]

Find value of [depsilon/dp](p)

Parameters:
  • (float) (interp_type) – pressure in geometerized units.

  • (float) – Relative step size in pressure space.

  • (float) – String specifying interpolation type. Current implementations are ‘CubicSpline’, ‘linear’.

Return dedp (float)float):

Derivative of energy-density with respect to pressure evaluated at pressure.

energy_density_from_pseudo_enthalpy(pseudo_enthalpy, interp_type='CubicSpline')[source]

Find energy_density_from_pseudo_enthalpy(pseudo_enthalpy) as in lalsimulation, return e = K * h**(3./2.) below min enthalpy

Parameters:
  • (float) (pseudo_enthalpy) – Dimensionless pseudo-enthalpy.

  • (str) (interp_type) – String specifying interpolation type. Current implementations are ‘CubicSpline’, ‘linear’.

Return energy_density (float)float):

energy-density in geometerized units.

energy_from_pressure(pressure, interp_type='CubicSpline')[source]

Find value of energy_from_pressure as in lalsimulation, return e = K * p**(3./5.) below min pressure

Parameters:
pressure: float

pressure in geometerized units.

interp_type: str

String specifying which interpolation type to use. Currently implemented: ‘CubicSpline’, ‘linear’.

energy_density: float

energy-density in geometerized units.

plot(rep, xlim=None, ylim=None, units=None)[source]

Given a representation in the form ‘energy_density-pressure’, plot the EoS in that space.

Parameters:
rep: str

Representation to plot. For example, plotting in energy_density-pressure space, specify ‘energy_density-pressure’

xlim: list

Plotting bounds for x-axis in the form [low, high]. Defaults to ‘None’ which will plot from 10% below min x value to 10% above max x value

ylim: list

Plotting bounds for y-axis in the form [low, high]. Defaults to ‘None’ which will plot from 10% below min y value to 10% above max y value

units: str

Specifies unit system to plot. Currently can plot in CGS:’cgs’, SI:’si’, or geometerized:’geom’

Returns:
fig: matplotlib.figure.Figure

EOS plot.

pressure_from_pseudo_enthalpy(pseudo_enthalpy, interp_type='CubicSpline')[source]

Find p(h) as in lalsimulation, return p = K * h**(5./2.) below min enthalpy

Parameters:

(float) (pseudo_enthalpy) – Dimensionless pseudo-enthalpy.

Interp_type (str)str):

String specifying interpolation type. Current implementations are ‘CubicSpline’, ‘linear’.

Return pressure (float)float):

pressure in geometerized units.

pseudo_enthalpy_from_energy_density(energy_density, interp_type='CubicSpline')[source]

Find h(epsilon) as in lalsimulation, return h = K * e**(2./3.) below min enthalpy

Parameters:
  • (float) (energy_density) – energy-density in geometerized units.

  • (str) (interp_type) – String specifying interpolation type. Current implementations are ‘CubicSpline’, ‘linear’.

Return pseudo_enthalpy (float)float):

Dimensionless pseudo-enthalpy.

velocity_from_pseudo_enthalpy(pseudo_enthalpy, interp_type='CubicSpline')[source]

Returns the speed of sound in geometerized units in the neutron star at the specified pressure.

Assumes the equation vs = c (de/dp)^{-1/2}

Parameters:
  • (float) (pseudo_enthalpy) – Dimensionless pseudo-enthalpy.

  • (str) (interp_type) – String specifying interpolation type. Current implementations are ‘CubicSpline’, ‘linear’.

Return v_s (float)float):

Speed of sound at pseudo-enthalpy in geometerized units.