示例#1
0
# from interactions.four_particle.integral import Dpy
from interactions.four_particle.cpp.integral import D as Dpy
from common import LogSpacedGrid

# process ν_μ + e ⟶ ν_μ + e
m = (0, 0.5, 0, 0.5)
K213 = 0.00000000000000000000104249
K114 = 0.000000000000000000000896662
K112 = 0.00000000000000000000121202
sides = (-1, -1, 1, 1)

cwd = os.path.split(__file__)[0]


GRID = LogSpacedGrid(MOMENTUM_SAMPLES=20)


def grid_iterator(dimension=4, grid=GRID):
    value = numpy.zeros(dimension, dtype=numpy.int)

    dim = dimension - 1
    while dim >= 0:
        # print(value)
        value[dim] += 1
        if value[dim] >= grid.MOMENTUM_SAMPLES:
            while dim >= 0 and value[dim] >= grid.MOMENTUM_SAMPLES:
                value[dim] = 0
                value[dim-1] += 1
                dim -= 1
            if dim > -1:
示例#2
0
import numpy as np

from common import UNITS, LogSpacedGrid

GRID = LogSpacedGrid(MOMENTUM_SAMPLES=30, MAX_MOMENTUM=20)

masses = np.linspace(0, 20, 4)


def grid_iterator(dimension=None, grid=GRID):
    value = np.zeros(dimension, dtype=np.int)

    dim = dimension - 1
    while dim >= 0:
        yield list(map(lambda i: grid.TEMPLATE[i], value))
        value[dim] += 1
        if value[dim] >= grid.MOMENTUM_SAMPLES:
            while dim >= 0 and value[dim] >= grid.MOMENTUM_SAMPLES:
                value[dim] = 0
                value[dim - 1] += 1
                dim -= 1
            if dim > -1:
                dim = dimension - 1


def mass_iterator(dimension=None, mass=masses):
    value = np.zeros(dimension, dtype=np.int)

    dim = dimension - 1
    while dim >= 0:
        yield list(map(lambda i: mass[i], value))
示例#3
0
T_interactions_freeze_out = 0.005 * UNITS.MeV
T_final = 0.0008 * UNITS.MeV
params = Params(T=T_initial, dy=0.003125)

universe = Universe(params=params, folder=folder)

photon = Particle(**SMP.photon)
electron = Particle(**SMP.leptons.electron)
muon = Particle(**SMP.leptons.muon)
neutrino_e = Particle(**SMP.leptons.neutrino_e)
neutrino_mu = Particle(**SMP.leptons.neutrino_mu)
neutrino_tau = Particle(**SMP.leptons.neutrino_tau)
sterile = Particle(**NuP.dirac_sterile_neutrino(mass))

from common import LogSpacedGrid
linear_grid = LogSpacedGrid()

sterile.decoupling_temperature = T_initial
for neutrino in [neutrino_e, neutrino_mu, neutrino_tau]:
    neutrino.decoupling_temperature = 10 * UNITS.MeV

universe.add_particles([
    photon,
    electron,
    muon,
    neutrino_e,
    neutrino_mu,
    neutrino_tau,
    sterile,
])
示例#4
0
photon = Particle(**SMP.photon)
electron = Particle(**SMP.leptons.electron)
muon = Particle(**SMP.leptons.muon)


active_grid = LinearSpacedGrid(MOMENTUM_SAMPLES=201,
                               MAX_MOMENTUM=mass / T_washout * 1.5 * UNITS.MeV)
neutrino_e = Particle(**SMP.leptons.neutrino_e,
                      grid=active_grid)
neutrino_mu = Particle(**SMP.leptons.neutrino_mu,
                       grid=active_grid)
neutrino_tau = Particle(**SMP.leptons.neutrino_tau,
                        grid=active_grid)

sterile_grid = LogSpacedGrid(MOMENTUM_SAMPLES=51, MAX_MOMENTUM=20 * UNITS.MeV)
sterile = Particle(**NuP.dirac_sterile_neutrino(mass),
                   grid=sterile_grid)
sterile.decoupling_temperature = Tdec


universe.add_particles([
    photon,
    electron,
    muon,
    neutrino_e,
    neutrino_mu,
    neutrino_tau,
    sterile,
])
示例#5
0
photon = Particle(**SMP.photon)

electron = Particle(**SMP.leptons.electron)
muon = Particle(**SMP.leptons.muon)
tau = Particle(**SMP.leptons.tau)

neutrino_e = Particle(**SMP.leptons.neutrino_e)
neutrino_mu = Particle(**SMP.leptons.neutrino_mu)
neutrino_tau = Particle(**SMP.leptons.neutrino_tau)

neutral_pion = Particle(**SMP.hadrons.neutral_pion)
charged_pion = Particle(**SMP.hadrons.charged_pion)

sterile = Particle(**NuP.dirac_sterile_neutrino(mass))
sterile_grid = LogSpacedGrid(10, T_initial * 5)
sterile.set_grid(sterile_grid)
sterile.decoupling_temperature = T_initial

grid = HeuristicGrid(mass, lifetime)
for neutrino in [neutrino_e, neutrino_mu, neutrino_tau]:
    neutrino.decoupling_temperature = 0 * UNITS.MeV
    neutrino.set_grid(grid)

universe.add_particles([
    photon,
    electron,
    muon,
    tau,
    neutrino_e,
    neutrino_mu,
示例#6
0
folder = os.path.join(os.path.split(__file__)[0], "output", args.tau)

T_initial = T_dec
T_washout = 0.1 * UNITS.MeV
T_final = 0.0008 * UNITS.MeV
params = Params(T=T_initial,
                dy=0.003125 * 4)

universe = Universe(params=params, folder=folder)

photon = Particle(**SMP.photon)
electron = Particle(**SMP.leptons.electron)
muon = Particle(**SMP.leptons.muon)

from common import LogSpacedGrid
active_grid = LogSpacedGrid(MOMENTUM_SAMPLES=201, MAX_MOMENTUM=1.5 * mass / (T_washout / UNITS.MeV))
sterile_grid = LogSpacedGrid(MOMENTUM_SAMPLES=51, MAX_MOMENTUM=mass)

neutrino_e = Particle(**SMP.leptons.neutrino_e, grid=active_grid)
neutrino_mu = Particle(**SMP.leptons.neutrino_mu, grid=active_grid)
neutrino_tau = Particle(**SMP.leptons.neutrino_tau, grid=active_grid)
sterile = Particle(**NuP.dirac_sterile_neutrino(mass), grid=sterile_grid)

sterile.decoupling_temperature = T_initial

universe.add_particles([
    photon,
    electron,
    muon,
    neutrino_e,
    neutrino_mu,