Skip to content

Commit 28cd602

Browse files
philbullnkern
authored andcommitted
Add a couple of extra tests to improve coverage
1 parent 0d8a529 commit 28cd602

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

hera_pspec/tests/test_plot.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,23 @@ def test_plot_average(self):
125125
elements = [(matplotlib.lines.Line2D, 1),]
126126
self.assertTrue( axes_contains(f4.axes[0], elements) )
127127
plt.close(f4)
128+
129+
# Plot imaginary part
130+
f4 = plot.delay_spectrum(self.uvp, [blps,], spw=0, pol='xx',
131+
average_blpairs=False, average_times=True,
132+
component='imag')
133+
elements = [(matplotlib.lines.Line2D, self.uvp.Nblpairs),]
134+
self.assertTrue( axes_contains(f4.axes[0], elements) )
135+
plt.close(f4)
136+
137+
# Plot abs
138+
f5 = plot.delay_spectrum(self.uvp, [blps,], spw=0, pol='xx',
139+
average_blpairs=False, average_times=True,
140+
component='abs')
141+
elements = [(matplotlib.lines.Line2D, self.uvp.Nblpairs),]
142+
self.assertTrue( axes_contains(f4.axes[0], elements) )
143+
plt.close(f5)
144+
128145

129146
def test_plot_cosmo(self):
130147
"""
@@ -179,7 +196,14 @@ def test_plot_waterfall(self):
179196
log=False, vmin=-1., vmax=3.,
180197
cmap='RdBu', fold=True, component='abs')
181198
plt.close(f3)
182-
199+
200+
# Try with imaginary component
201+
f4 = plot.delay_waterfall(self.uvp, [_blps,], spw=0, pol='xx',
202+
average_blpairs=False, delay=True,
203+
log=False, vmin=-1., vmax=3.,
204+
cmap='RdBu', fold=True, component='imag')
205+
plt.close(f4)
206+
183207
# Try some more arguments
184208
fig, axes = plt.subplots(1, len(blps))
185209
plot.delay_waterfall(self.uvp, [blps,], spw=0, pol='xx',

0 commit comments

Comments
 (0)