示例#1
0
def test_plotting():
    """ Some basic plotting tests

    TODO: Improve these tests (and the functions for that matter!
    """
    filename_fil = os.path.join(HERE, 'Voyager1.single_coarse.fine_res.h5')
    fil = bl.Waterfall(filename_fil)

    # Test make_waterfall_plots -- needs 6x files
    filenames_list = [filename_fil] * 6
    target  = 'Voyager'
    drates  = [-0.392226]
    fvals   = [8419.274785]
    f_start = 8419.274374 - 600e-6
    f_stop  = 8419.274374 + 600e-6
    node_string = 'test'
    filter_level = 1
    plot_event.make_waterfall_plots(filenames_list, target, drates, fvals, f_start, f_stop, node_string, filter_level)
    plt.show()
示例#2
0
def _NOT_YET_test_plotting(): # see issue #52
    """ Some basic plotting tests

    TODO: Improve these tests (and the functions for that matter!
    """
    print("\n===== test_plotting =====")
    filename_fil = os.path.join(HERE, VOYAH5)

    # Test make_waterfall_plots -- needs 6x files
    filenames_list = [filename_fil] * 6
    target  = 'Voyager'
    drates  = [-0.392226]
    fvals   = [8419.274785]
    f_start = 8419.274374 - 600e-6
    f_stop  = 8419.274374 + 600e-6
    node_string = 'test'
    filter_level = 1
    plot_event.make_waterfall_plots(filenames_list, target, drates, fvals, f_start, f_stop, node_string, filter_level)
    plt.show()
示例#3
0
def test_make_waterfall_plots():
    r""" Some basic plotting tests

    TODO: Improve these tests (and the functions for that matter!
    """
    print("\n===== test_plotting =====")
    filename_fil = os.path.join(TESTDIR, VOYAH5)

    # Test make_waterfall_plots -- needs 6x files
    filenames_list = [filename_fil] * 6
    target = 'Voyager'
    drate = -0.392226
    fmid = 8419.274785
    f_start = 8419.274374 - 600e-6
    f_stop = 8419.274374 + 600e-6
    source_name_list = ['test_make_waterfall_plots'] * 6
    filter_level = "1"
    plot_event.make_waterfall_plots(filenames_list, target, f_start, f_stop,
                                    drate, fmid, filter_level,
                                    source_name_list)
filenames = [
    path + 'OUMUAMUA_0011.gpuspec.0002.fil',
    path + 'OUMUAMUA_OFF_0012.gpuspec.0002.fil',
    path + 'OUMUAMUA_0013.gpuspec.0002.fil',
    path + 'OUMUAMUA_OFF_0014.gpuspec.0002.fil',
    path + 'OUMUAMUA_0015.gpuspec.0002.fil',
    path + 'OUMUAMUA_OFF_0016.gpuspec.0002.fil'
]

fig = plt.figure(figsize=(12, 8))

plot_event.make_waterfall_plots(filenames,
                                target='Oumuamua',
                                drates,
                                fvals,
                                f_start=3076.8,
                                f_stop=3078.2,
                                node_string=None,
                                filter_level=None,
                                ion=False,
                                epoch=None,
                                bw=250.0,
                                local_host='',
                                plot_name=png_path + 'test',
                                save_pdf_plot=True,
                                saving_fig=True,
                                offset=50,
                                dedoppler=False)

plt.savefig(png_path + 'test.py')