Since there are several loops over all neutrino from- and to- flavours in this code, it might make sense to define something upfront like:

    from_flavours = ['nue','numu','nue_bar','numu_bar']
    to_flavours = ['nue','numu','nue_bar','numu_bar','nutau','nutau_bar']