コード例 #1
0
def test_clip_edges():
    a = np.zeros(shape=(341, 156))
    yclip = [4, 0] * u.pix
    xclip = [1, 2] * u.pix
    new_a = clip_edges(a, yclip, xclip)
    assert (a.shape[0] - (yclip[0].value + yclip[1].value) == new_a.shape[0])
    assert (a.shape[1] - (xclip[0].value + xclip[1].value) == new_a.shape[1])
コード例 #2
0
def test_clip_edges():
    a = np.zeros(shape=(341, 156))
    yclip = [4, 0]
    xclip = [1, 2]
    new_a = clip_edges(a, yclip, xclip)
    assert (a.shape[0] - (yclip[0] + yclip[1]) == 337)
    assert (a.shape[1] - (xclip[0] + xclip[1]) == 153)
コード例 #3
0
ファイル: test_coalignment.py プロジェクト: Hypnus1803/sunpy
def test_clip_edges():
    a = np.zeros(shape=(341, 156))
    yclip = [4, 0] * u.pix
    xclip = [1, 2] * u.pix
    new_a = clip_edges(a, yclip, xclip)
    assert(a.shape[0] - (yclip[0].value + yclip[1].value) == new_a.shape[0])
    assert(a.shape[1] - (xclip[0].value + xclip[1].value) == new_a.shape[1])
コード例 #4
0
ファイル: test_coalignment.py プロジェクト: debugger22/sunpy
def test_clip_edges():
    a = np.zeros(shape=(341, 156))
    yclip = [4, 0]
    xclip = [1, 2]
    new_a = clip_edges(a, yclip, xclip)
    assert(a.shape[0] - (yclip[0] + yclip[1]) == 337)
    assert(a.shape[1] - (xclip[0] + xclip[1]) == 153)