Skip to content

Commit

Permalink
Add IMR property to SimulationsDataFrame
Browse files Browse the repository at this point in the history
  • Loading branch information
moble committed Oct 24, 2024
1 parent 563a9a0 commit cd6e205
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions sxs/simulations/simulations.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Container interface to the catalog of SXS simulations"""

import functools
import collections
import numpy as np
import pandas as pd

class SimulationsDataFrame(pd.DataFrame):
Expand All @@ -26,12 +26,12 @@ def NSNS(self):
@property
def noneccentric(self):
"""Restrict dataframe to just non-eccentric systems (e<1e-3)"""
return type(self)(self[self["reference_eccentricity"] < 1e-3])
return type(self)(self[self["reference_eccentricity_bound"] < 1e-3])

@property
def eccentric(self):
"""Restrict dataframe to just eccentric systems (e>=1e-3)"""
return type(self)(self[self["reference_eccentricity"] >= 1e-3])
return type(self)(self[self["reference_eccentricity_bound"] >= 1e-3])

@property
def nonprecessing(self):
Expand All @@ -54,6 +54,21 @@ def precessing(self):
return type(self)(self[
(self["reference_chi1_perp"] + self["reference_chi2_perp"]) >= 1e-3
])

@property
def IMR(self):
"""Restrict dataframe to just BBH systems with inspiral, merger, and ringdown
The criteria used here are just that the reference
eccentricity and remnant mass are actual (finite)
numbers. Currently, at least, the existence of a
measured eccentricity means that the system is not
hyperbolic or head-on.
"""
return type(self)(self[
np.isfinite(self["reference_eccentricity"])
& np.isfinite(self["remnant_mass"])
])


class Simulations(collections.OrderedDict):
Expand Down

0 comments on commit cd6e205

Please sign in to comment.