Beispiel #1
0
def add_signal (gui, graph_obj, aperture, site_file, source_file, spec_res):
    sig_list = sigtrans.signal(gui, aperture, site_file.file, source_file.file, spec_res)

    # build and return list of coordinates (freq, signal)
    crdlist = []
    for i, signal_val in enumerate(sig_list):
        if gui.signal_units == 1: # convert W -> photons/s
          signal_val /= const.h * gui.interp.freq_list[i]
        crdlist.append(graph.coord_obj(gui.interp.freq_list[i], signal_val))

    # build data set and add to graph
    data_set = new_dataset(
        "Signal ("+str(aperture)+" m, "+site_file.name+", "+source_file.name+")",
         gui.energy_form, "Signal", signal_units(gui), crdlist)
    graph_obj.dataset_list.append(data_set)
Beispiel #2
0
def add_integ (gui, graph_obj, label, atmos_site, galactic_file, mirror_temp, mirror_constant,
        zodiac_file, cib, cmb, aperture, site_file, source_file, snr, spec_res):

    # compute noise and signal and, with signal:noise ratio, integration time
    blingsq_tot = bling.noise_total(gui, atmos_site.file, galactic_file.file, mirror_temp,
        mirror_constant, zodiac_file.file, cib, cmb, spec_res)
    sig_list = sigtrans.signal(gui, aperture, site_file.file, source_file.file, spec_res)
    integ_time = cal.IT(blingsq_tot, snr, sig_list) # array of integration times

    # build and return list of coordinates
    crdlist = []
    for i, integ_val in enumerate(integ_time):
        crdlist.append(graph.coord_obj(gui.interp.freq_list[i], integ_val))

    # build data set and add to graph
    data_set = new_dataset("Integration Time ("+label+")", gui.energy_form, "Time", "s", crdlist)
    graph_obj.dataset_list.append(data_set)