<jupyter_start><jupyter_text>Compare with Spada & Lanzafame (2019) Didn't get very far because Spada & Lanzafame models don't seem to be available in bprp?<jupyter_code>%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import pickle
class GP_model(object):

    def __init__(self):
        gp_model = pkg_resources.resource_filename(__name__, "gp_model_01.22.21.pkl")
        with open(gp_model, "rb") as f:
            model, map_soln = pickle.load(f)

        with model:
            self.func = xo.get_theano_function_for_var(model.y_test)
            self.args = xo.utils.get_args_for_theano_function(map_soln)
            self.ind1 = model.vars.index(model.x1_test)
            self.ind2 = model.vars.index(model.x2_test)

    def pred_at(self, log10age, teff):
        """
        teff in K, log age in ln(age [Gyr]).
        """
        lnage = np.log((10**(log10age))*1e-9)
        self.args[self.ind1][0] = teff
        self.args[self.ind2][0] = lnage
        return np.exp(self.func(*self.args))
import kinematics_and_rotation as kr

sl = pd.read_csv("../data/spada_lanzafame_models.csv")
sl.head()
# sl["teff"] = tb.bv
for c in sl.columns[2:]:
    plt.plot(sl["(B−V)"], sl["{}".format(c)], "k")
plt.plot(sl["Mass"], sl["p0.50"], "k", lw="4")
plt.plot(sl["Mass"], sl["p0.50"], "w", lw="2")
plt.plot(sl["Mass"], sl["p1.00"], "k", lw="4")
plt.plot(sl["Mass"], sl["p1.00"], "w", lw="2")
plt.plot(sl["Mass"], sl["p1.50"], "k", lw="4")
plt.plot(sl["Mass"], sl["p1.50"], "w", lw="2")
plt.plot(sl["Mass"], sl["p2.00"], "k", lw="4")
plt.plot(sl["Mass"], sl["p2.00"], "w", lw="2")
plt.plot(sl["Mass"], sl["p2.50"], "k", lw="4")
plt.plot(sl["Mass"], sl["p2.50"], "w", lw="2")
plt.plot(sl["Mass"], sl["p4.00"], "k", lw="4")
plt.plot(sl["Mass"], sl["p4.00"], "w", lw="2")
plt.plot(sl["Mass"], sl["p4.57"], "k", lw="4")
plt.plot(sl["Mass"], sl["p4.57"], "w", lw="2")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.23435075012933265, 'fraction_numerical': 0.0429384376616658, 'mean_word_length': 3.921119592875318, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '454313', 'license': 'MIT', 'n_tokens_mistral': 856, 'n_tokens_neox': 805, 'n_words': 152, 'path': 'notebooks/Comparison_with_Spada.ipynb', 'repo_name': 'RuthAngus/aviary', 'size': '1933'}