Esempio n. 1
0
def test_scalebar_showhide():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.hide()
    f.scalebar.show(0.1)
    f.close()
Esempio n. 2
0
def test_beam_pad():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    f.beam.set_pad(0.1)
    f.beam.set_pad(0.3)
    f.close()
Esempio n. 3
0
def test_scalebar_length():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_length(0.01)
    f.scalebar.set_length(0.1)
    f.close()
Esempio n. 4
0
def test_frame_linewidth():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.frame.set_linewidth(0)
    f.frame.set_linewidth(1)
    f.frame.set_linewidth(10)
    f.close()
Esempio n. 5
0
def test_beam_hatch():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    for hatch in ['/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*']:
        f.beam.set_hatch(hatch)
    f.close()
Esempio n. 6
0
def test_grid_showhide():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_grid()
    f.grid.hide()
    f.grid.show()
    f.close()
Esempio n. 7
0
def test_scalebar_showhide():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.hide()
    f.scalebar.show(0.1)
    f.close()
Esempio n. 8
0
def test_scalebar_addremove():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.remove_scalebar()
    f.add_scalebar(0.1)
    f.close()
Esempio n. 9
0
def test_scalebar_length():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_length(0.01)
    f.scalebar.set_length(0.1)
    f.close()
Esempio n. 10
0
def test_grid_addremove():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_grid()
    f.remove_grid()
    f.add_grid()
    f.close()
Esempio n. 11
0
def test_scalebar_addremove():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.remove_scalebar()
    f.add_scalebar(0.1)
    f.close()
Esempio n. 12
0
def test_ticks_minor_frequency():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.ticks.set_minor_frequency(1)
    f.ticks.set_minor_frequency(5)
    f.ticks.set_minor_frequency(10)
    f.close()
Esempio n. 13
0
def test_scalebar_frame():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_frame(True)
    f.scalebar.set_frame(False)
    f.close()
Esempio n. 14
0
def test_ticks_color():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.ticks.set_color('black')
    f.ticks.set_color('#003344')
    f.ticks.set_color((1.0, 0.4, 0.3))
    f.close()
Esempio n. 15
0
def test_beam_frame():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    f.beam.set_frame(True)
    f.beam.set_frame(False)
    f.close()
Esempio n. 16
0
def test_scalebar_font():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_font(size='small', weight='bold', stretch='normal',
                        family='serif', style='normal', variant='normal')
    f.close()
Esempio n. 17
0
def test_scalebar_frame():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_frame(True)
    f.scalebar.set_frame(False)
    f.close()
Esempio n. 18
0
def test_ticks_linewidth():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.ticks.set_linewidth(1)
    f.ticks.set_linewidth(3)
    f.ticks.set_linewidth(10)
    f.close()
Esempio n. 19
0
def test_grid_linewidth():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_grid()
    f.grid.set_linewidth(0)
    f.grid.set_linewidth(2)
    f.grid.set_linewidth(5)
    f.close()
Esempio n. 20
0
def test_ticks_spacing():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.ticks.set_xspacing(0.5)
    f.ticks.set_xspacing(1.)
    f.ticks.set_yspacing(0.5)
    f.ticks.set_yspacing(1.)
    f.close()
Esempio n. 21
0
def test_colorbar_showhide():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.show_grayscale()
    f.add_colorbar()
    f.colorbar.hide()
    f.colorbar.show()
    f.close()
Esempio n. 22
0
def test_colorbar_addremove():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.show_grayscale()
    f.add_colorbar()
    f.remove_colorbar()
    f.add_colorbar()
    f.close()
Esempio n. 23
0
def test_scalebar_alpha():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_alpha(0.1)
    f.scalebar.set_alpha(0.2)
    f.scalebar.set_alpha(0.5)
    f.close()
Esempio n. 24
0
def test_scalebar_color():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_color('black')
    f.scalebar.set_color('#003344')
    f.scalebar.set_color((1.0, 0.4, 0.3))
    f.close()
Esempio n. 25
0
def test_scalebar_corner():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    for corner in ['top', 'bottom', 'left', 'right', 'top left', 'top right',
                   'bottom left', 'bottom right']:
        f.scalebar.set_corner(corner)
    f.close()
Esempio n. 26
0
def test_beam_linewidth():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    f.beam.set_linewidth(0)
    f.beam.set_linewidth(1)
    f.beam.set_linewidth(5)
    f.close()
Esempio n. 27
0
def test_beam_edgecolor():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    f.beam.set_edgecolor('black')
    f.beam.set_edgecolor('#003344')
    f.beam.set_edgecolor((1.0, 0.4, 0.3))
    f.close()
Esempio n. 28
0
def test_axis_labels_position():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.axis_labels.set_xposition('top')
    f.axis_labels.set_xposition('bottom')
    f.axis_labels.set_yposition('right')
    f.axis_labels.set_yposition('left')
    f.close()
Esempio n. 29
0
def test_scalebar_alpha():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_alpha(0.1)
    f.scalebar.set_alpha(0.2)
    f.scalebar.set_alpha(0.5)
    f.close()
Esempio n. 30
0
def test_scalebar_color():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_color('black')
    f.scalebar.set_color('#003344')
    f.scalebar.set_color((1.0, 0.4, 0.3))
    f.close()
Esempio n. 31
0
def test_grid_alpha():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_grid()
    f.grid.set_alpha(0.0)
    f.grid.set_alpha(0.3)
    f.grid.set_alpha(1.0)
    f.close()
Esempio n. 32
0
def test_scalebar_label():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_label('1 pc')
    f.scalebar.set_label('5 AU')
    f.scalebar.set_label('2"')
    f.close()
Esempio n. 33
0
def test_beam_linestyle():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    f.beam.set_linestyle('solid')
    f.beam.set_linestyle('dotted')
    f.beam.set_linestyle('dashed')
    f.close()
Esempio n. 34
0
def test_beam_angle():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.show_grayscale()
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    f.beam.set_angle(0.)
    f.beam.set_angle(55.)
    f.close()
Esempio n. 35
0
def test_colorbar_showhide():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.show_grayscale()
    f.add_colorbar()
    f.colorbar.hide()
    f.colorbar.show()
    f.close()
Esempio n. 36
0
def test_grid_linestyle():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_grid()
    f.grid.set_linestyle('solid')
    f.grid.set_linestyle('dashed')
    f.grid.set_linestyle('dotted')
    f.close()
Esempio n. 37
0
def test_beam_corner():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    for corner in ['top', 'bottom', 'left', 'right', 'top left', 'top right',
                   'bottom left', 'bottom right']:
        f.beam.set_corner(corner)
    f.close()
Esempio n. 38
0
def test_scalebar_label():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_scalebar(0.1)
    f.scalebar.set_label('1 pc')
    f.scalebar.set_label('5 AU')
    f.scalebar.set_label('2"')
    f.close()
Esempio n. 39
0
def test_tick_labels_position():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.tick_labels.set_xposition('top')
    f.tick_labels.set_xposition('bottom')
    f.tick_labels.set_yposition('right')
    f.tick_labels.set_yposition('left')
    f.close()
Esempio n. 40
0
def test_grid_color():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.add_grid()
    f.grid.set_color('black')
    f.grid.set_color('#003344')
    f.grid.set_color((1.0, 0.4, 0.3))
    f.close()
Esempio n. 41
0
def test_beam_addremove():
    data = np.zeros((16, 16))
    f = FITSFigure(data)
    f.show_grayscale()
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    f.remove_beam()
    f.add_beam(major=0.1, minor=0.04, angle=10.)
    f.remove_beam()
    f.close()