Esempio n. 1
0
def load_echelogram(ref_date, band):
    from echellogram import Echellogram

    echel_name = get_master_calib_abspath("fitted_echellogram_sky_%s_%s.json" % (band, ref_date))
    echel = Echellogram.from_json_fitted_echellogram_sky(echel_name)

    return echel
Esempio n. 2
0
    r = pickle.load(open("flat_info_%s_%s.pickle" % (igrins_log.date, band)))
    r2 = pickle.load(open("thar_%s_%s.pickle" % (igrins_log.date, band)))

    bpix_mask = r["flat_bpix_mask"]
    trace_sol = r["bottomup_solutions"]

    from apertures import Apertures
    apertures = Apertures(igrins_orders[band],
                          trace_sol)


    # load echellogram data
    from echellogram import Echellogram
    echel_name = "fitted_echellogram_sky_%s_%s.json" % (band, thar_init["ref_date"])
    echel = Echellogram.from_json_fitted_echellogram_sky(echel_name)


    th = np.genfromtxt("ThArlines.dat")
    wvl_thar = th[:,0]/1.e4
    s_thar = np.clip(th[:,1], a_min=20, a_max=np.inf)

    # line_list : dict of (order, (pixel coord list, wavelengths))
    wvl_list = {}
    pixel_list = {}
    for o, s in zip(igrins_orders[band], thar_init["match_list"]):
        lineid_list = s[0] # [s1[0] for s1 in s]
        wvl = wvl_thar[lineid_list]
        wvl_list[o] = wvl
        x = [s1[0] for s1 in s[1]]
        pixel_list[o] = x
Esempio n. 3
0
    igrins_orders["K"] = range(72, 94)

    r = pickle.load(open("flat_info_%s_%s.pickle" % (igrins_log.date, band)))
    r2 = pickle.load(open("thar_%s_%s.pickle" % (igrins_log.date, band)))

    bpix_mask = r["flat_bpix_mask"]
    trace_sol = r["bottomup_solutions"]

    from apertures import Apertures
    apertures = Apertures(igrins_orders[band], trace_sol)

    # load echellogram data
    from echellogram import Echellogram
    echel_name = "fitted_echellogram_sky_%s_%s.json" % (band,
                                                        thar_init["ref_date"])
    echel = Echellogram.from_json_fitted_echellogram_sky(echel_name)

    th = np.genfromtxt("ThArlines.dat")
    wvl_thar = th[:, 0] / 1.e4
    s_thar = np.clip(th[:, 1], a_min=20, a_max=np.inf)

    # line_list : dict of (order, (pixel coord list, wavelengths))
    wvl_list = {}
    pixel_list = {}
    for o, s in zip(igrins_orders[band], thar_init["match_list"]):
        lineid_list = s[0]  # [s1[0] for s1 in s]
        wvl = wvl_thar[lineid_list]
        wvl_list[o] = wvl
        x = [s1[0] for s1 in s[1]]
        pixel_list[o] = x