Ejemplo n.º 1
0
def add_cib (gui, graph_obj, spec_res):
    data_name = "Cosmic Infrared Bkgd"

    # TODO: convert to equation fit
    if gui.noise_what == 0: # BLING
        bling_list = graph_list(gui, bling.generic(gui,
                "data/Backgrounds/CIB/cib.xlsx", spec_res))
        data_set = new_dataset(data_name, gui.energy_form,
                               "BLING", bling_units(gui), bling_list)

    elif gui.noise_what == 1: # flux
        flux_list = graph_list(gui,
            flux_convert(cal.intensity(gui.interp.freq_array,
                         temp.generic(gui, "data/Backgrounds/CIB/cib.xlsx"))))
        data_set = new_dataset(data_name, gui.energy_form,
                               "Flux", flux_units(gui), flux_list)

    elif gui.noise_what == 2: # temperature
        temp_list = graph_list(gui,
            temp.generic(gui, "data/Backgrounds/CIB/cib.xlsx"))
        data_set = new_dataset(data_name, gui.energy_form,
                               "Temperature", "K", temp_list)

    else: # diffraction limited flux
        intensity = cal.intensity(gui.interp.freq_array,
                         temp.generic(gui, "data/Backgrounds/CIB/cib.xlsx"))
        data_set = new_dataset(data_name, gui.energy_form,
            "Flux", signal_units(gui), flux_dl(gui, intensity, spec_res))

    graph_obj.dataset_list.append(data_set)
Ejemplo n.º 2
0
def add_zodiac (gui, graph_obj, zodiac_file, spec_res):
    data_name = "Zodiacal Emission ("+zodiac_file.name+")"

    if gui.noise_what == 0: # BLING
        bling_list = graph_list(gui, bling.generic(gui, zodiac_file.file, spec_res))
        data_set = new_dataset(data_name,
                gui.energy_form, "BLING", bling_units(gui), bling_list)

    elif gui.noise_what == 1: # flux
        flux_list = graph_list(gui,
            flux_convert(gui, cal.intensity(gui.interp.freq_array,
                              temp.generic(gui, zodiac_file.file))))
        data_set = new_dataset(data_name, gui.energy_form,
                               "Flux", flux_units(gui), flux_list)

    elif gui.noise_what == 2: # temperature
        temp_list = graph_list(gui, temp.generic(gui, zodiac_file.file))
        data_set = new_dataset(data_name,
                gui.energy_form, "Temperature", "K", temp_list)

    else: # diffraction limited flux
        intensity = cal.intensity(gui.interp.freq_array,
                              temp.generic(gui, zodiac_file.file))
        data_set = new_dataset(data_name, gui.energy_form,
            "Flux", signal_units(gui), flux_dl(gui, intensity, spec_res))

    graph_obj.dataset_list.append(data_set)