There will be maintenance performed on git.ligo.org, chat.ligo.org, containers.lig.org, and docs.ligo.org starting at 9am PDT on Tuesday 18th August 2020. There will be an extremely small period of downtime at the start of the maintenance window as various services are restarted. Please address any comments, questions, or concerns to computing-help@igwn.org.

Commit c9d563e2 authored by Lee McCuller's avatar Lee McCuller

added displacement plot option (default False)

parent ac9a9d80
......@@ -54,6 +54,8 @@ parser.add_argument('--matlab', '-m', action='store_true',
help="use MATLAB gwinc engine to calculate noises")
parser.add_argument('--fom',
help="calculate inspiral range for resultant spectrum ('func:param=val,param=val')")
parser.add_argument('-D', '--displacement', action='store_true', default = False, dest='displacement',
help="supress adding displacement sensitivity axis")
group = parser.add_mutually_exclusive_group()
group.add_argument('--dump', '-d', dest='dump', action='store_true',
help="print IFO parameters to stdout and exit")
......@@ -155,6 +157,7 @@ You may interact with plot using "plt." methods, e.g.:
plot_noise(
noises,
ax = ax,
displacement = args.displacement,
)
ax.set_title(title)
fig.tight_layout()
......
......@@ -63,6 +63,7 @@ STYLE_MAP = {
def plot_noise(
noises,
ax = None,
displacement = True,
):
f = noises['Freq']
......@@ -70,6 +71,19 @@ def plot_noise(
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
if displacement:
ax_d = ax.twinx()
ax_d.set_yscale('log')
def convert_ax_h_to_d(ax):
"""
Update second axis according with first axis.
"""
y1, y2 = ax.get_ylim()
ax_d.set_ylim(y1 * 4000, y2 * 4000)
ax_d.figure.canvas.draw()
ax.callbacks.connect("ylim_changed", convert_ax_h_to_d)
ax_d.set_ylabel(u"Displacement [m/\u221AHz]")
def plot_dict(noises):
#use sorted to force a consistent ordering
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment