Here we show sample CMDs generated by MATCH at a range of ages and metallicities.
import pandas as pd
import holoviews as hv
hv.notebook_extension('bokeh')
ages = ['9p3','9p5','9p7','9p9','10p0','10p1']
fehs = ['_2p2','_1p3','_0p5','0p0']
path = '../run_match/MIST_allfilt/WFIRST_{}/dist4/logSolMass7/logYr{}/dex{}/fake.out'
def make_holomap(filt, ages, fehs):
cmd_dict = {}
for a in ages:
for feh in fehs:
d = pd.read_csv(path.format(filt, a, feh), na_values=99.999,
delim_whitespace=True, names=['blue','red']).dropna()
color = '{} - H158'.format(filt)
d[color] = d.blue - d.red
d[filt] = d.blue - 28 # absolute magnitude
if d.shape[0] > 3000:
d = d.sample(3000)
points = hv.Points(d[[color, filt]], extents=(-1,-4,6,1))
cmd_dict[(float(a.replace('p','.')), float(feh.replace('p','.').replace('_','-')))] = points
return hv.HoloMap(cmd_dict, kdims=['Input age (log yr)', 'Input [Fe/H]'])
cmd_dict = {filt : make_holomap(filt,ages,fehs) for filt in ['X625','Z087']}
%opts NdLayout [transpose=True show_title=False]
%opts Points [show_title=False invert_yaxis=True width=500 height=300 color_index=0] (cmap='coolwarm')
hv.NdLayout(cmd_dict, kdims=['Filter'])