コード例 #1
0
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)
コード例 #2
0
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
コード例 #3
0
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
コード例 #4
0
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)
コード例 #5
0
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)
コード例 #6
0
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
コード例 #7
0
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)