""" import os from astropy.table import Table, join import matplotlib.pyplot as plt try: unrave, dr4 except NameError: from rave_io import get_cannon_dr1, get_rave_kordopatis_dr4 clusters = Table.read("RAVEDR4_OC.fits") unrave = join(get_cannon_dr1(), clusters, keys=("Name",)) dr4 = join(get_rave_kordopatis_dr4(), clusters, keys=("Name",)) else: print("Warning: Using pre-loaded data") # QC and labels for DR4 dr4_ok = np.ones(len(dr4), dtype=bool) dr4_teff, dr4_logg, dr4_feh, dr4_e_teff, dr4_e_logg, dr4_e_feh \ = ("TeffK_1", "loggK_1", "c_M_H_K_1", "e_TeffK_1", "e_loggK_1", "e__M_H_K_1") unrave_ok = unrave["QC"] unrave_teff, unrave_logg, unrave_feh, unrave_e_teff, unrave_e_logg, unrave_e_feh \ = ("TEFF", "LOGG", "FE_H", "E_TEFF", "E_LOGG", "E_FE_H")
""" import os from astropy.table import Table, join import matplotlib.pyplot as plt try: unrave, dr4 except NameError: from rave_io import get_cannon_dr1, get_rave_kordopatis_dr4 clusters = Table.read("../../RAVEDR4_OC.fits") unrave = join(get_cannon_dr1(), clusters, keys=("Name",)) dr4 = join(get_rave_kordopatis_dr4(), clusters, keys=("Name",)) else: print("Warning: Using pre-loaded data") # QC and labels for DR4 dr4_ok = np.ones(len(dr4), dtype=bool) dr4_teff, dr4_logg, dr4_feh, dr4_e_teff, dr4_e_logg, dr4_e_feh \ = ("TeffK_1", "loggK_1", "c_M_H_K_1", "e_TeffK_1", "e_loggK_1", "e__M_H_K_1") unrave_ok = unrave["QC"] unrave_teff, unrave_logg, unrave_feh, unrave_e_teff, unrave_e_logg, unrave_e_feh \ = ("TEFF", "LOGG", "FE_H", "E_TEFF", "E_LOGG", "E_FE_H")
import matplotlib.pyplot as plt import numpy as np from matplotlib.colors import LogNorm from matplotlib.ticker import MaxNLocator try: combined_table except NameError: from rave_io import (get_rave_kordopatis_dr4, get_cannon_dr1) from astropy.table import join combined_table = join(get_cannon_dr1(), get_rave_kordopatis_dr4(), keys=("Name", )) else: print("Warning: Using pre-loaded data!") QC = (combined_table["QC"]) \ * (combined_table["TeffK"] > 4000) * (combined_table["c1_1"] == "n") * (combined_table["c2_1"] == "n") \ * (combined_table["c3_1"] == "n") * (combined_table["e_HRV"] < 8) N_bins = 50 all_columns = [ # RAVE label, DR4 label ("TEFF", "TeffK"), ("LOGG", "loggK"), ("FE_H", "c_M_H_K"),
from mpl_toolkits.axes_grid1 import make_axes_locatable try: rave_cannon_dr1 except NameError: # Do you know who I am? That's Jeff Vader! from rave_io import get_cannon_dr1, get_ges_idr4, get_rave_kordopatis_dr4 rave_cannon_dr1 = get_cannon_dr1() assert "Name" in rave_cannon_dr1.dtype.names #rave_cannon_dr1["Name"] = [each.split("/")[-2] + "_" + each.split("/")[-1].split(".rvsun.")[0] + "_" + each.split(".rvsun.")[1].split("-")[0] for each in rave_cannon_dr1["FILENAME"]] from astropy.table import join rave_cannon_dr1 = join(rave_cannon_dr1, get_rave_kordopatis_dr4(), keys=("Name", )) rave_cannon_dr1 = join(rave_cannon_dr1, get_ges_idr4(), keys=("Name", )) asplund_2009_solar_abundances = { "O": 8.69, "Al": 6.45, "Mg": 7.6, "Ca": 6.34, "Si": 7.51, "Fe": 7.5, "Ni": 6.22, } ges_species = ("O_1", "AL_1", "MG_1", "CA_1", "SI_1", "NI_1")
import matplotlib.pyplot as plt import numpy as np from matplotlib.colors import LogNorm from matplotlib.ticker import MaxNLocator try: combined_table except NameError: from rave_io import (get_rave_kordopatis_dr4, get_cannon_dr1) from astropy.table import join combined_table = join(get_cannon_dr1(), get_rave_kordopatis_dr4(), keys=("Name", )) else: print("Warning: Using pre-loaded data!") QC = (combined_table["QC"]) \ * (combined_table["TeffK"] > 4000) * (combined_table["c1_1"] == "n") * (combined_table["c2_1"] == "n") \ * (combined_table["c3_1"] == "n") * (combined_table["e_HRV"] < 8) N_bins = 50 all_columns = [ # RAVE label, DR4 label ("TEFF", "TeffK"), ("LOGG", "loggK"), ("FE_H", "c_M_H_K"),
from mpl_toolkits.axes_grid1 import make_axes_locatable try: rave_cannon_dr1 except NameError: # Do you know who I am? That's Jeff Vader! from rave_io import get_cannon_dr1, get_ges_idr4, get_rave_kordopatis_dr4 rave_cannon_dr1 = get_cannon_dr1() assert "Name" in rave_cannon_dr1.dtype.names #rave_cannon_dr1["Name"] = [each.split("/")[-2] + "_" + each.split("/")[-1].split(".rvsun.")[0] + "_" + each.split(".rvsun.")[1].split("-")[0] for each in rave_cannon_dr1["FILENAME"]] from astropy.table import join rave_cannon_dr1 = join(rave_cannon_dr1, get_rave_kordopatis_dr4(), keys=("Name", )) rave_cannon_dr1 = join(rave_cannon_dr1, get_ges_idr4(), keys=("Name", )) asplund_2009_solar_abundances = { "O": 8.69, "Al": 6.45, "Mg": 7.6, "Ca": 6.34, "Si": 7.51, "Fe": 7.5, "Ni": 6.22, } ges_species = ("O_1", "AL_1", "MG_1", "CA_1", "SI_1", "NI_1")