labels.append('$e$') # add omega to the list omega = np.arctan2(x[:, 3], x[:, 2]).reshape((len(x[:, 0]), 1))*180./np.pi x = np.concatenate((x, omega), axis=1) labels.append('$\omega$ (deg)') # if we want to get inferred value from the isochrones as well if inferredparams: # some important values FeH = x[:, 8] # convert to log(age) for the isochrone age = np.log10(x[:, 9] * 1e9) M = x[:, 7] # set up the output results = np.zeros((len(FeH), len(isointerp(M[0], FeH[0], age[0], isobundle)))) # get the isochrone values for each chain input # this is very time intensive for ii in np.arange(len(FeH)): results[ii, :] = isointerp(M[ii], FeH[ii], age[ii], isobundle) # add primary effective temperature Teff = (10.**results[:, -1]).reshape((len(x[:, 0]), 1)) x = np.concatenate((x, Teff), axis=1) labels.append('$T_{eff,1}$ (K)') # add log(g) logg = (results[:, -2]).reshape((len(x[:, 0]), 1)) x = np.concatenate((x, logg), axis=1) labels.append('log(g)') # add primary radius
# ========================================================================== # # 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] if mags[gind] - mags[rind] <= 0.3: kpmag1 = 0.25 * mags[gind] + 0.75 * mags[rind] else: kpmag1 = 0.3 * mags[gind] + 0.7 * mags[iind]