示例#1
0
def test_init_extensive_wcs(header, dimensions):
    hdu = generate_hdu(header)
    if 'CAR' in header:
        f = FITSFigure(hdu, dimensions=dimensions, convention='calabretta')
    else:
        f = FITSFigure(hdu, dimensions=dimensions)
    f.show_grayscale()
    f.add_grid()
    f.close()
示例#2
0
def test_init_extensive_wcs(header, dimensions):
    hdu = generate_hdu(header)
    if 'CAR' in header:
        f = FITSFigure(hdu, dimensions=dimensions, convention='calabretta')
    else:
        f = FITSFigure(hdu, dimensions=dimensions)
    f.show_grayscale()
    f.add_grid()
    f.close()
示例#3
0
def test_init_dimensions_valid(dimensions):
    hdu = generate_hdu(REFERENCE)
    f = FITSFigure(hdu, dimensions=dimensions, slices=[5])
    f.show_grayscale()
    f.close()
示例#4
0
def test_hdu_noslices():
    hdu = generate_hdu(REFERENCE)
    with pytest.raises(Exception):
        FITSFigure(hdu)
示例#5
0
def test_hdu_init():
    hdu = generate_hdu(REFERENCE)
    f = FITSFigure(hdu, slices=[5])
    f.show_grayscale()
    f.close()
示例#6
0
def test_init_dimensions_invalid(dimensions):
    hdu = generate_hdu(REFERENCE)
    with pytest.raises(ValueError):
        FITSFigure(hdu, dimensions=dimensions, slices=[5])
示例#7
0
def test_init_dimensions_invalid(dimensions):
    hdu = generate_hdu(REFERENCE)
    with pytest.raises(ValueError):
        FITSFigure(hdu, dimensions=dimensions, slices=[5])
示例#8
0
def test_init_dimensions_valid(dimensions):
    hdu = generate_hdu(REFERENCE)
    f = FITSFigure(hdu, dimensions=dimensions, slices=[5])
    f.show_grayscale()
    f.close()
示例#9
0
def test_hdu_noslices():
    hdu = generate_hdu(REFERENCE)
    with pytest.raises(Exception):
        FITSFigure(hdu)
示例#10
0
def test_hdu_init():
    hdu = generate_hdu(REFERENCE)
    f = FITSFigure(hdu, slices=[5])
    f.show_grayscale()
    f.close()
示例#11
0
def test_init_car_invalid(dimensions):
    hdu = generate_hdu(CAR_REFERENCE)
    with pytest.raises(Exception):
        FITSFigure(hdu, dimensions=dimensions)
示例#12
0
def test_init_car_invalid(dimensions):
    hdu = generate_hdu(CAR_REFERENCE)
    with pytest.raises(Exception):
        FITSFigure(hdu, dimensions=dimensions)