Skip to content

Commit

Permalink
move notebooks to investigations and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
md-arif-shaikh committed Feb 18, 2023
1 parent a3b09d3 commit ebaba22
Show file tree
Hide file tree
Showing 15 changed files with 106 additions and 5,926 deletions.
129 changes: 74 additions & 55 deletions examples/load_waveform_demo.ipynb

Large diffs are not rendered by default.

50 changes: 32 additions & 18 deletions gw_eccentricity/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,36 @@
from .utils import interpolate


def get_available_waveform_origins():
"""Get available origins of waveforms that could be loaded."""
return {
def get_available_waveform_origins(return_dict=False):
"""Get available origins of waveforms that could be loaded.
parameters:
-----------
return_dict: bool
If True, returns a dictionary of origins and corresponding loading
functions, otherwise just the list of origins.
Default is False.
"""
origin_dict = {
"LAL": load_LAL_waveform,
"SXSCatalog": load_sxs_catalogformat,
"LVCNR": load_lvcnr_waveform,
"LVCNR_hack": load_lvcnr_hack,
"EOB": load_EOB_waveform,
"EMRI": load_EMRI_waveform}

return origin_dict if return_dict else list(origin_dict.keys())


def get_load_waveform_docs(origin):
"""Get the docs for the loading function for given waveform origin."""
# check origin
origins = get_available_waveform_origins(return_dict=True)
if origin not in origins:
raise Exception(f"Unknown {origin}. Must be one of "
f"{list(origins.keys())}")
return help(origins[origin])


def get_load_waveform_defaults(origin="LAL"):
"""Get the dictionary of default kwargs.
Expand All @@ -40,13 +60,13 @@ def get_load_waveform_defaults(origin="LAL"):
# for waveforms using LALSimulation
if origin == "LAL":
return {
"approximant": "EccentricTD",
"q": 1.0,
"chi1": [0.0, 0.0, 0.0],
"chi2": [0.0, 0.0, 0.0],
"ecc": 1e-5,
"mean_ano": 0.0,
"Momega0": 0.01,
"approximant": None,
"q": None,
"chi1": None,
"chi2": None,
"ecc": None,
"mean_ano": None,
"Momega0": None,
"deltaTOverM": 0.1,
"physicalUnits": False,
"M": None,
Expand Down Expand Up @@ -99,7 +119,7 @@ def get_load_waveform_defaults(origin="LAL"):
"include_geodesic_ecc": False}
else:
raise Exception(f"Unknown origin {origin}. Must be one of "
f"{list(get_available_waveform_origins())}.")
f"{get_available_waveform_origins()}.")


def make_a_sub_dict(super_dict, sub_dict_keys):
Expand Down Expand Up @@ -155,7 +175,7 @@ def load_waveform(origin="LAL", **kwargs):
Dictionary of time, modes etc. For detailed structure of the returned
dataDict see gw_eccentricity.measure_eccentricity.
"""
available_origins = get_available_waveform_origins()
available_origins = get_available_waveform_origins(return_dict=True)
if origin in available_origins:
return available_origins[origin](**kwargs)
else:
Expand All @@ -174,22 +194,16 @@ def load_LAL_waveform(**kwargs):
default is "EccentricTD".
q: float
Mass ratio of the system.
default is 1.
chi1: 1d array of size 3
3-element 1d array of spin components of the 1st Black hole.
default is [0.0, 0.0, 0.0].
chi2: 1d array of size 3
3-element 1d array of spin components of the 1st Black hole.
default is [0.0, 0.0, 0.0].
ecc: float
Initial eccentricity of the binary at Momega0 (see below).
default is 1e-5.
mean_ano: float
Initial Mean anomaly of the bianry at Momega0 (see below).
default is 0.0.
Momega0: float
Starting orbital frequency in dimensionless units.
default is 0.01.
deltaTOverM: float
Time steps in dimensionless units. default is 0.1.
physicalUnits: bool
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
208 changes: 0 additions & 208 deletions notebook/compare_omega_averaging_methods.ipynb

This file was deleted.

2,077 changes: 0 additions & 2,077 deletions notebook/debugFrequencyFits.ipynb

This file was deleted.

208 changes: 0 additions & 208 deletions notebook/diagnostics-EOB.ipynb

This file was deleted.

461 changes: 0 additions & 461 deletions notebook/diagnostics-for-FrequencyFits.ipynb

This file was deleted.

355 changes: 0 additions & 355 deletions notebook/diagnostics.ipynb

This file was deleted.

616 changes: 0 additions & 616 deletions notebook/load_sxs.ipynb

This file was deleted.

271 changes: 0 additions & 271 deletions notebook/measure_eccentricity_at_ref_frequencies.ipynb

This file was deleted.

Loading

0 comments on commit ebaba22

Please sign in to comment.