Esempio n. 1
0
    # vie isospin symmetries)
    primary_particle = 2212
    # The parameter delta for finite differences computation
    delta = 0.001
    # Energy grid will be truncated below this value (saves some
    # memory and interpolation speed, but not really needed, I think)
    E_tr = 1e5

    # Set density/atmosphere model:
    # For a yearly average of the global atmosphere, the US Std.
    # atmosphere is sufficiently accurate. It would be wrong to
    # choose here anything related to South Pole, since stuff
    # comes from/from below horizon.
    atm_model = "CORSIKA"  #TODO Try varying this...
    atm_model_config = ('BK_USStd', None)
    mceq_run.set_density_model((atm_model, atm_model_config))

    # Define equidistant grid in cos(theta) for 2D interpolation
    # (Can be increased to 20 after debugging is done)
    # The flux without propagation effects and atmospheric variations
    # is up/down symmetric.
    cos_theta = np.linspace(0, 1, 21)
    angles = np.arccos(cos_theta) / np.pi * 180.

    # Report settings
    print("Running with :")
    print("  Interaction model : %s" % interaction_model)
    print("  Primary cosmic ray spectrum model : %s" % args.cosmic_ray_model)

    # Some technical shortcuts
    solution = {}
    # Primary proton projectile (neutron is included automatically
    # vie isosping symmetries)
    p = 2212
    # The parameter delta for finite differences computation
    delta = 0.001
    # Energy grid will be truncated below this value (saves some
    # memory and interpolation speed, but not really needed, I think)
    E_tr = 1e5

    # Set density/atmosphere model:
    # For a yearly average of the global atmosphere, the US Std.
    # atmosphere is sufficiently accurate. It would be wrong to
    # choose here anything related to South Pole, since stuff
    # comes from/from below horizon.
    mceq_run.set_density_model(('CORSIKA', ('BK_USStd', None)))

    # Define equidistant grid in cos(theta) for 2D interpolation
    # (Can be increased to 20 after debugging is done)
    # The flux without propagation effects and atmospheric variations
    # is up/down symmetric.
    cos_theta = np.linspace(0, 1, 21)
    angles = np.arccos(cos_theta) / np.pi * 180.

    # Some technical shortcuts
    solution = {}
    gs = mceq_run.get_solution
    pidx = mceq_run.pdg2pref[2212].lidx()
    nidx = mceq_run.pdg2pref[2112].lidx()
    mag = 0.
    tr = np.where(mceq_run.e_grid < 1e5)