In [8]:
import itertools
import h5py
import numpy
In [4]:
with h5py.File('../data/crowdastro.h5') as crowdastro_h5:
with h5py.File('../data/training.h5') as training_h5:
rgz_mv = training_h5['labels'].value
fan = crowdastro_h5['/wise/cdfs/fan_labels'].value
norris = crowdastro_h5['/wise/cdfs/norris_labels'].value
names = crowdastro_h5['/wise/cdfs/string'].value
In [5]:
assert len(norris) == len(fan) and len(fan) == len(rgz_mv) and len(rgz_mv) == len(names)
In [9]:
print('\\begin{tabular}{l|lll}')
print('\\hline\\hline')
for name, nl, fl, rl in itertools.islice(zip(names, norris, fan, rgz_mv), 10):
print('{} & {} & {} & {}\\\\'.format(
name.decode('ascii'),
bool(nl),
bool(fl),
bool(rl)))
print('\\end{tabular}')
In [ ]: