예제 #1
0
파일: test_ndcube.py 프로젝트: sunpy/ndcube
def test_slicing_third_axis(test_input, expected, mask, wcs, uncertainty,
                            dimensions, world_axis_physical_types, extra_coords):
    assert isinstance(test_input, expected)
    assert np.all(test_input.mask == mask)
    helpers.assert_wcs_are_equal(test_input.wcs, wcs[0])
    assert test_input.missing_axes == wcs[1]
    assert test_input.uncertainty.array.shape == uncertainty.shape
    assert np.all(test_input.dimensions.value == dimensions.value)
    assert test_input.dimensions.unit == dimensions.unit
    assert test_input.world_axis_physical_types == world_axis_physical_types
    helpers.assert_extra_coords_equal(test_input.extra_coords, extra_coords)
예제 #2
0
def test_slicing_third_axis(test_input, expected, mask, wcs, uncertainty,
                            dimensions, world_axis_physical_types, extra_coords):
    assert isinstance(test_input, expected)
    assert np.all(test_input.mask == mask)
    helpers.assert_wcs_are_equal(test_input.wcs, wcs[0])
    assert test_input.missing_axis == wcs[1]
    assert test_input.uncertainty.array.shape == uncertainty.shape
    assert np.all(test_input.dimensions.value == dimensions.value)
    assert test_input.dimensions.unit == dimensions.unit
    assert test_input.world_axis_physical_types == world_axis_physical_types
    helpers.assert_extra_coords_equal(test_input.extra_coords, extra_coords)
예제 #3
0
def test_reindex_wcs(test_input, expected):
    print(utils.wcs.reindex_wcs(*test_input))
    print(expected)
    helpers.assert_wcs_are_equal(utils.wcs.reindex_wcs(*test_input), expected)
예제 #4
0
def test_reindex_wcs(test_input, expected):
    print(utils.wcs.reindex_wcs(*test_input))
    print(expected)
    helpers.assert_wcs_are_equal(utils.wcs.reindex_wcs(*test_input), expected)