def test_bad_mask_list(): bad_mask, _ = util.create_bad_pixel_mask(dummy_image_none) healed_image = util.bfixpix(dummy_image, bad_mask, retdat=True) assert np.sum(healed_image) == np.size(dummy_image_none)
def test_bad_mask_does_nothing(): bad_mask, _ = util.create_bad_pixel_mask(dummy_image) healed_image = util.bfixpix(dummy_image, bad_mask, retdat=True) assert np.sum(healed_image) == dummy_sum
def test_cutoff_mask_does_nothing_grow(): cutoff_mask, _ = util.create_cutoff_mask( dummy_image, cutoff=65500, grow=True ) healed_image = util.bfixpix(dummy_image, cutoff_mask, retdat=True) assert np.sum(healed_image) == dummy_sum
def test_cutoff_mask_list_grow(): cutoff_mask, _ = util.create_cutoff_mask( dummy_image, cutoff=[0, 1000], grow=True ) healed_image = util.bfixpix(dummy_image, cutoff_mask, retdat=True) assert np.sum(healed_image) == np.size(dummy_image)
def test_cutoff_mask(): cutoff_mask, _ = util.create_cutoff_mask(dummy_image, cutoff=60000) healed_image = util.bfixpix(dummy_image, cutoff_mask, retdat=True) assert np.sum(healed_image) == np.size(dummy_image)
def test_bad_mask_does_nothing_grow_none(): bad_mask, _ = util.create_bad_pixel_mask( dummy_image, grow=True, diagonal=True ) healed_image = util.bfixpix(dummy_image, bad_mask, retdat=False) assert np.sum(healed_image) is None
def test_bad_mask_grow(): bad_mask, _ = util.create_bad_pixel_mask( dummy_image_nan, grow=True, diagonal=True ) healed_image = util.bfixpix(dummy_image, bad_mask, retdat=True) assert np.sum(healed_image) == np.size(dummy_image)