Added test for bad pixel correction by interpolation in 2D input frame
@@ -179,12 +179,14 @@ def test_badpix_ann():
# test kernel correction
cy, cx = frame_center(cube)
+ frame_c_gau = cube_fix_badpix_interp(cube[0], bpm[0], mode='gauss', fwhm=1)
cube_c_gau = cube_fix_badpix_interp(cube, bpm, mode='gauss', fwhm=1)
cube_c_fft = cube_fix_badpix_interp(cube, bpm, mode='fft', nit=50)
r0 = dist(cy, cx, idx0, idx0)
ann = get_annulus_segments(cube_c[0], r0-1, 3, mode='val')
med_val_ann = np.median(ann)
+ assert (frame_c_gau[idx0, idx0]-med_val_ann) < 4*s0
assert (cube_c_gau[0, idx0, idx0]-med_val_ann) < 4*s0
assert (cube_c_fft[0, idx0, idx0]-med_val_ann) < 4*s0
