Skip to content
Snippets Groups Projects

Resolve "parameterized eos sampling"

Merged Matthew Carney requested to merge matthew.carney/bilby:369-eos-sampling into master
Compare and Show latest version
3 files
+ 27
6
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 3
3
@@ -378,7 +378,7 @@ class SpectralDecompositionEOS(TabularEOS):
p0: float
lowest pressure value in EoS in cgs units. Default is p0 for SLy from Lindblom paper
e0/c**2: float
lowest energy density value in EoS. FIXME: the input param is actually e0/c**2
lowest energy density value in EoS. FIXME: the input param is actually e0/c**2
xmax: float
highest dimensionless pressure value in EoS
npts: float (optional)
@@ -499,7 +499,7 @@ class SpectralDecompositionEOS(TabularEOS):
class PiecewisePolytropeEOS(TabularEOS):
def __init__(self, gamma1, gamma2, gamma3, p1, npts=100):
def __init__(self, gamma1, gamma2, gamma3, p1, npts=100, sampling_flag=False):
self.gamma1 = gamma1
self.gamma2 = gamma2
self.gamma3 = gamma3
@@ -507,7 +507,7 @@ class PiecewisePolytropeEOS(TabularEOS):
self.npts = npts
self.e_pdat = self.__construct_eos_from_polytrope()
super().__init__(self.e_pdat, from_array=True)
super().__init__(self.e_pdat, from_array=True, sampling_flag=sampling_flag)
def __construct_eos_from_polytrope(self):
"""
Loading