Skip to content

Fix bug when adding template to strain plot

Charlie Hoy requested to merge strain_fix into master

The purpose of this MR is to fix a bug found by @philip.relton introduced in !594 (merged) (v0.13.0). This bug causes a ValueError when running this example, see traceback below,

Traceback (most recent call last):
    template={"L1": maxL}, bandpass_frequencies=[40., 300.]
  File "... /python3.7/site-packages/pesummary/gw/file/strain.py", line 187, in plot
    return self.plotting_map[type](self.strain_dict, *args, **kwargs)
  File "... /python3.7/site-packages/pesummary/gw/file/strain.py", line 201, in _time_domain_plot
    return time_domain_strain_data(*args, **kwargs)[self.IFO]
  File "... /python3.7/site-packages/pesummary/gw/plots/detchar.py", line 167, in time_domain_strain_data
    label="Template"
  File "... /python3.7/site-packages/matplotlib/axes/_axes.py", line 1605, in plot
    lines = [*self._get_lines(*args, data=data, **kwargs)]
  File "... /python3.7/site-packages/matplotlib/axes/_base.py", line 315, in __call__
    yield from self._plot_args(this, kwargs)
  File "... /python3.7/site-packages/matplotlib/axes/_base.py", line 501, in _plot_args
    raise ValueError(f"x and y must have same first dimension, but "
ValueError: x and y must have same first dimension, but have shapes (3264,) and (1,)
Edited by Charlie Hoy

Merge request reports

Loading