Skip to content

Commit

Permalink
fixes suggested by Ian
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnitz committed Aug 9, 2023
1 parent 6b11fc5 commit efd12e9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
27 changes: 14 additions & 13 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ library and application suite.
:show_shadows:
:show_captions_below:

.. figure:: https://pycbc.org/pycbc/latest/html/_images/data.png
:height: 400px
:target: catalog.html

Working with gravitational wave data

.. figure::

.. figure:: https://pycbc.org/pycbc/latest/html/_images/plot_detwaveform.png
:height: 400px
:target: waveform.html

Your interface to generating gravitational wave signals

.. figure:: https://collincapano.com/wp-content/uploads/2020/02/posterior3d-gw150914_masses-e1581860222179.png
:height: 400px
:target: inference.html
Expand All @@ -35,19 +49,6 @@ library and application suite.

Fast Parameter Estimation with Advanced Marginalizations

.. figure:: https://pycbc.org/pycbc/latest/html/_images/plot_detwaveform.png
:height: 400px
:target: waveform.html

Your interface to generating gravitational wave signals

.. figure:: https://pycbc.org/pycbc/latest/html/_images/data.png
:height: 400px
:target: catalog.html

Working with gravitatoinal wave data

.. figure::

.. toctree::
:hidden:
Expand Down
2 changes: 0 additions & 2 deletions examples/detector/ant.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from pycbc.detector import Detector
from pycbc.waveform import get_td_waveform
from matplotlib import pyplot as plt
import numpy as np

# Time, orientation and location of the source in the sky
ra = 1.7
Expand Down
17 changes: 14 additions & 3 deletions examples/waveform/higher_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@
pp.figure()

# You can select sets of modes or individual modes using the 'mode_array'
for mode_select in [None, "22 33", "21", "22", "33", "32", "44",]:
# The standard format is to provide a list of (l, m) modes, however
# a string format is also provided to aid use in population from config files.
# e.g. "22 33" is also acceptable to select these two modes.
# "None" will result in the waveform return its default which is usually
# to return all implemented modes.
for mode_select in [None,
[(2, 2), (3, 3)], # Select two modes at once
[(2, 2)],
[(2, 1)],
[(3, 2)],
[(4, 4)],
]:
hp, hc = get_td_waveform(approximant="IMRPhenomXPHM",
mass1=7,
mass2=40,
Expand All @@ -20,11 +31,11 @@
label = 'Full Waveform'
a = hp.max()
else:
label = "l,m=" + mode_select
label = "l, m = " + ' '.join([f"{l}, {m}" for l, m in mode_select])

(hp / a).plot(label=label)

pp.xlim(-2, 0.3)
pp.xlim(-1, 0.05)
pp.legend()
pp.xlabel('Time [s]')
pp.ylabel('Relative Strain')
Expand Down

0 comments on commit efd12e9

Please sign in to comment.