Skip to content

Commit

Permalink
Add a couple of extra tests to improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
philbull committed Jul 19, 2018
1 parent 22428f2 commit 81c40e3
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion hera_pspec/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,23 @@ def test_plot_average(self):
elements = [(matplotlib.lines.Line2D, 1),]
self.assertTrue( axes_contains(f4.axes[0], elements) )
plt.close(f4)

# Plot imaginary part
f4 = plot.delay_spectrum(self.uvp, [blps,], spw=0, pol='xx',
average_blpairs=False, average_times=True,
component='imag')
elements = [(matplotlib.lines.Line2D, self.uvp.Nblpairs),]
self.assertTrue( axes_contains(f4.axes[0], elements) )
plt.close(f4)

# Plot abs
f5 = plot.delay_spectrum(self.uvp, [blps,], spw=0, pol='xx',
average_blpairs=False, average_times=True,
component='abs')
elements = [(matplotlib.lines.Line2D, self.uvp.Nblpairs),]
self.assertTrue( axes_contains(f4.axes[0], elements) )
plt.close(f5)


def test_plot_cosmo(self):
"""
Expand Down Expand Up @@ -179,7 +196,14 @@ def test_plot_waterfall(self):
log=False, vmin=-1., vmax=3.,
cmap='RdBu', fold=True, component='abs')
plt.close(f3)


# Try with imaginary component
f4 = plot.delay_waterfall(self.uvp, [_blps,], spw=0, pol='xx',
average_blpairs=False, delay=True,
log=False, vmin=-1., vmax=3.,
cmap='RdBu', fold=True, component='imag')
plt.close(f4)

# Try some more arguments
fig, axes = plt.subplots(1, len(blps))
plot.delay_waterfall(self.uvp, [blps,], spw=0, pol='xx',
Expand Down

0 comments on commit 81c40e3

Please sign in to comment.