for ii in magname: labels.append(ii) # predicted Kp magnitude of the primary star kpmag = np.zeros(len(results[:, 0])) blue = results[:, 0] - results[:, 1] <= 0.3 kpmag[blue] = 0.25 * results[blue, 0] + 0.75 * results[blue, 1] kpmag[~blue] = 0.3 * results[~blue, 0] + 0.7 * results[~blue, 2] # get the WD properties and flux ratio wdage = np.zeros(len(age)) msages = np.zeros(len(age)) wdmag = np.zeros(len(age)) F2F1 = np.zeros(len(age)) for ii in np.arange(len(age)): msages[ii] = msage(x[ii, 5], x[ii, 8], isobundle) wdage[ii] = np.log10(10.**age[ii] - 10.**(msages[ii])) wdmag[ii] = wdmagfunc(np.array([[x[ii, 6], wdage[ii]]]))[0] F2F1[ii] = 10.**((wdmag[ii] - kpmag[ii])/(-2.5)) # add the flux ratio F2F1 = F2F1.reshape((len(x[:, 0]), 1)) x = np.concatenate((x, F2F1), axis=1) labels.append('$F_2/F_1$') wdpreds = np.zeros((len(wdage), 2)) wdpreds[:, 0] = x[:, 6] wdpreds[:, 1] = wdage # get the WD temperature wdmodels = getwdmodels() wdtemp = interpolate.griddata(wdmodels[:, 0:2], wdmodels[:, 2], wdpreds)
rotation=90, fontsize=24) fig5.text(0.07, 0.5, 'Relative Flux', ha='center', va='center', rotation=90, fontsize=24) # ========================================================================== # # the rest is all to produce Figure S4 # most of this is copied from the light_curve_model function # set up a range of WD masses M2s = np.linspace(0.1, 1.453, 1000) (magobs, magerr, maglam, magname, interps, limits, fehs, ages, maxmasses, wdmagfunc) = isobundle # calculate their magnitudes based on the best model wdage = np.log10(10.**age - 10.**(msage(M2init, FeH, isobundle))) wdmag = wdmagfunc(np.array([[M2, wdage]]))[0] # get the magnitudes of the primary star in the best model mags = isointerp(M1, FeH, age, isobundle) # pull out the stellar radius R1 = mags[-3] # get the flux ratio between the two stars in the Kepler band F2F1 = 0. if np.isfinite(wdmag): # get the Kp magnitude of the main star gind = np.where(magname == 'g')[0][0] rind = np.where(magname == 'r')[0][0] iind = np.where(magname == 'i')[0][0]