Creates new blob entries for the given blob keys

def parse_corant(blob):
    """Creates new blob entries for the given blob keys"""

    if 'track_seamuon' in blob.keys():

        muon = blob['track_seamuon']

        blob['Muon'] = Table({
            'id': np.array(muon)[:, 0].astype(int),
            'pos_x': np.array(muon)[:, 1],
            'pos_y': np.array(muon)[:, 2],
            'pos_z': np.array(muon)[:, 3],
            'dir_x': np.array(muon)[:, 4],
            'dir_y': np.array(muon)[:, 5],
            'dir_z': np.array(muon)[:, 6],
            'energy': np.array(muon)[:, 7],
            'time': np.array(muon)[:, 8],
            'particle_id': np.array(muon)[:, 9].astype(int),
            'is_charm': np.array(muon)[:, 10].astype(int),
            'mother_pid': np.array(muon)[:, 11].astype(int),
            'grandmother_pid': np.array(muon)[:, 11].astype(int),
        },
                             h5loc='muon')

        blob['MuonMultiplicity'] = Table({
            'muon_multiplicity': len(np.array(muon)[:, 6])
        },
                                         h5loc='muon_multiplicity')

    if 'track_seaneutrino' in blob.keys():

        nu = blob['track_seaneutrino']

        blob['Neutrino'] = Table({
            'id': np.array(nu)[:, 0].astype(int),
            'pos_x': np.array(nu)[:, 1],
            'pos_y': np.array(nu)[:, 2],
            'pos_z': np.array(nu)[:, 3],
            'dir_x': np.array(nu)[:, 4],
            'dir_y': np.array(nu)[:, 5],
            'dir_z': np.array(nu)[:, 6],
            'energy': np.array(nu)[:, 7],
            'time': np.array(nu)[:, 8],
            'particle_id': np.array(nu)[:, 9].astype(int),
            'is_charm': np.array(nu)[:, 10].astype(int),
            'mother_pid': np.array(nu)[:, 11].astype(int),
            'grandmother_pid': np.array(nu)[:, 11].astype(int),
        },
                                 h5loc='nu')
        blob['NeutrinoMultiplicity'] = Table({
            'total': len(np.array(nu)[:, 6]),
            'nue': len(np.array(nu)[:, 6][np.array(nu)[:, 9] == 66]),
            'anue': len(np.array(nu)[:, 6][np.array(nu)[:, 9] == 67]),
            'numu': len(np.array(nu)[:, 6][np.array(nu)[:, 9] == 68]),
            'anumu': len(np.array(nu)[:, 6][np.array(nu)[:, 9] == 69]),
        },
                                             h5loc='nu_multiplicity')

    if ('track_seamuon' or 'track_seaneutrino') in blob.keys():

        blob['Weights'] = Table({
            'w1': blob['weights'][0][0],
            'w2': blob['weights'][0][1],
            'w3': blob['weights'][0][2],
        },
                                h5loc='weights')

    if 'track_primary' in blob.keys():

        primary = blob['track_primary']

        blob['Primary'] = Table({
            'id': np.array(primary)[:, 0].astype(int),
            'pos_x': np.array(primary)[:, 1],
            'pos_y': np.array(primary)[:, 2],
            'pos_z': np.array(primary)[:, 3],
            'dir_x': np.array(primary)[:, 4],
            'dir_y': np.array(primary)[:, 5],
            'dir_z': np.array(primary)[:, 6],
            'energy': np.array(primary)[:, 7],
            'time': np.array(primary)[:, 8],
            'particle_id': np.array(primary)[:, 9].astype(int)
        },
                                h5loc='primary')

    return blob