Galaxy Classification Table

This notebook generates a LaTeX of galaxy classifications, combining classifications from Norris et al. (2006), Fan et al. (2015), and unweighted Radio Galaxy Zoo majority votes. We will want to add some machine learning predictions, too.


In [8]:
import itertools

import h5py
import numpy

Norris, Fan, RGZ majority vote

In this section, we load the Norris, Fan, and RGZ majority vote (MV) labels.


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}')


\begin{tabular}{l|lll}
\hline\hline
J032559.17-284724.3 & False & False & False\\
J032559.98-284730.8 & False & False & False\\
J032600.16-284637.7 & False & False & False\\
J032600.18-284715.8 & False & False & False\\
J032601.01-284709.8 & False & False & False\\
J032601.28-284144.7 & False & False & False\\
J032601.63-284130.7 & False & False & False\\
J032601.78-284614.5 & False & False & False\\
J032601.94-284734.7 & False & False & False\\
J032602.02-284657.0 & False & False & False\\
\end{tabular}

In [ ]: