ascl_id stringclasses 752
values | repo_url stringclasses 737
values | file_path stringlengths 4 194 | content large_stringlengths 1 1M | language stringclasses 29
values | license_type stringclasses 24
values | size int64 1 1M |
|---|---|---|---|---|---|---|
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/subroutines.f90 | !General numerical routines and global accuracy. Includes modified dverk for CAMB.
!cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine splder(y,dy,n, g)
use Precision
! Splder fits a cubic spline to y and returns the first derivatives at
! the grid points in dy.... | Fortran | null | 53,970 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/SeparableBispectrum.F90 | !First version AL October 2010
!Calculates local fnl and CMB lensing bispectra
!CMB lensing bispectra are calculated in the approximation in which the first-order
!result is used replacing the unlensed with the lensing power spectra
!This is non-perturbatively correct to about 1%
!Note the lens... | Fortran | null | 59,791 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/constants.f90 |
module Precision
implicit none
integer, parameter :: dl = KIND(1.d0)
integer, parameter :: sp = KIND(1.0)
end module Precision
module constants
use precision
implicit none
real(dl), parameter :: const_pi = 3.1415926535897932384626433832795_dl
real(dl), parameter :: const_tw... | Fortran | null | 3,509 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/power_tilt.f90 | !This module provides the initial power spectra, parameterized as an expansion in ln k
!
! ln P_s = ln A_s + (n_s -1)*ln(k/k_0_scalar) + n_{run}/2 * ln(k/k_0_scalar)^2 + n_{runrun}/6 * ln(k/k_0_scalar)^3
!
! so if n_{run} = 0, n_{runrun}=0
!
! P_s = A_s (k/k_0_scalar)^(n_s-1)
!
!for ... | Fortran | null | 9,415 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/reionization.f90 |
module Reionization
use Precision
use AMLutils
implicit none
!This module puts smooth tanh reionization of specified mid-point (z_{re}) and width
!The tanh function is in the variable (1+z)**Rionization_zexp
!Rionization_zexp=1.5 has the property that for the same z_{re}
!the optical ... | Fortran | null | 12,825 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/halofit_ppf.f90 | !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
! The `halofit' code models the nonlinear evolution of cold matter
! cosmological power spectra. The full details of the way in which
! this is done are presented in Smith et al. (2002), MNRAS, ?, ?.
!
! The code `halofit' was written by R... | Fortran | null | 95,961 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/modules.f90 | ! Modules used by cmbmain and other routines.
! Code for Anisotropies in the Microwave Background
! by Antony Lewis (http://cosmologist.info) and Anthony Challinor
! See readme.html for documentation.
!
! Based on CMBFAST by Uros Seljak and Matias Zaldarriaga, itself based
... | Fortran | null | 109,992 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/README.rst | ===================
CAMB
===================
:CAMB: Code for Anisotropies in the Microwave Background, Fortran 95 code and python module
:Homepage: http://camb.info/
.. image:: http://img.shields.io/pypi/v/camb.svg?style=flat
:target: https://pypi.python.org/pypi/camb/
Description and installation
========... | reStructuredText | null | 1,596 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/equations.f90 | ! Equations module for dark energy with constant equation of state parameter w
! allowing for perturbations based on a quintessence model
! by Antony Lewis (http://cosmologist.info/)
! Dec 2003, fixed (fatal) bug in tensor neutrino setup
! Changes to tight coupling approximation
! June 2004, fi... | Fortran | null | 91,778 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/bessels.f90 | !CAMB spherical and hyperspherical Bessel function routines
!This version May 2006 - minor changes to bjl (http://cosmocoffee.info/viewtopic.php?t=530)
!Feb 2007: fixed for high l, uses Ranges
!Feb 2009: minor fix for non-flat compiled with non-smart IF evaluation
!Dec 2011: minor tweak to DoRecurs ... | Fortran | null | 45,291 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/params_base.ini | #Parameters for CAMB
#output_root is prefixed to output file names
#What to do
get_scalar_cls = F
get_vector_cls = F
get_tensor_cls = F
get_transfer = T
#if do_lensing then lens_potential_output_file contains the unlensed CMB and lensing potential power spectra
#and lensed CMB Cls (without tensors) are in lensed_... | Config | null | 10,984 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/.travis.yml | language: python
python:
- 2.7
dist: trusty
sudo: false
branches:
except:
- CAMB_sources
- rayleigh
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gfortran-5
#before_install:
# - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
# - sudo apt-get updat... | YAML | null | 2,303 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/writefits.f90 | !subroutine to export Cls in FITS format for HEALPix 1.2
!Antony Lewis July 2003
subroutine WriteFitsCls(Clsfile, lmx)
use CAMB
use head_fits, ONLY : add_card
use fitstools, only : write_asctab
implicit none
character(LEN=*), INTENT(IN) :: Clsfile
integer, INTENT(IN) :: lmx
CHARACTER(LEN=80), DIMENSI... | Fortran | null | 4,753 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/lensing.f90 | !Lensing the C_l using the deflection angle from the computed lensing potential
!power spectrum.
!lensing_method=1: using an accurate curved-sky correlation function method
!lensing_method=2: using the flat-sky lower order result of astro-ph/9505109
! and astro-ph/9803150 as in CMBF... | Fortran | null | 37,172 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/equations_ppf.f90 | ! Equations module for dark energy with constant equation of state parameter w
! allowing for perturbations based on a quintessence model
! by Antony Lewis (http://cosmologist.info/)
! Dec 2003, fixed (fatal) bug in tensor neutrino setup
! Changes to tight coupling approximation
! June 2004, fi... | Fortran | null | 98,208 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/Matrix_utils.F90 | !Matrix utility routines. Uses BLAS/LAPACK. Mostly wrapper routines.
!Generally (but not always) assumes that all matrix arrays are defined at exactly correct size
!Not complete
!Antony Lewis May 2003-2007
!http://cosmologist.info/utils/
module MatrixUtils
use AMLutils
implicit none
... | Fortran | null | 66,070 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/camb_python.f90 | module handles
use CAMB
use Precision
use ModelParams
use Transfer
use iso_c_binding
implicit none
Type c_MatterTransferData
integer :: num_q_trans ! number of steps in k for transfer calculation
type(c_ptr) :: q_trans, sigma_8, sigma2_vdelta_8, TransferData
... | Fortran | null | 17,047 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/tests/run_tests.sh |
set -e
pushd pycamb
source activate py2-environment
python --version
python setup.py install
python -c "import camb; print(camb.__version__)"
python setup.py test
pip uninstall -y camb
rm -Rf dist/*
rm -Rf build/*
rm -f camb/*.so
if [[ $TRAVIS_REPO_SLUG == "cmbant/CAMB" && "$TRAVIS_PULL_REQUEST" == "false" ]]
then... | Shell | null | 1,641 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/tests/upload_tests.sh | git clone -b ${TRAVIS_BRANCH}_travis --depth 1 "https://$GH_TOKEN@github.com/cmbant/CAMB_test_outputs" > /dev/null 2>&1
if [ $? -ne 0 ]; then
mkdir CAMB_test_outputs
cd CAMB_test_outputs
git init
git checkout -b ${TRAVIS_BRANCH}_travis
git remote add origin https://$GH_TOKEN@github.com/cmbant/CAMB_test_outputs
els... | Shell | null | 891 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/setup.py | #!/usr/bin/env python
import sys
import platform
import subprocess
import io
import re
import os
from distutils.command.build import build
from distutils.command.install import install
from distutils.command.sdist import sdist
import struct
try:
from setuptools import setup
except ImportError:
from distutils.... | Python | null | 7,227 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/README.rst | ===================
CAMB
===================
:CAMB: Code for Anisotropies in the Microwave Background
:Author: Antony Lewis and Anthony Challinor
:Homepage: https://camb.info/
.. image:: http://img.shields.io/pypi/v/camb.svg?style=flat
:target: https://pypi.python.org/pypi/camb/
.. image:: https://readthedocs.... | reStructuredText | null | 1,205 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/requirements.txt | numpy
matplotlib
six
mock
sympy>=1.0
scipy
| Text | null | 43 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/baseconfig.py | import os.path as osp
import sys
import os
import six
import platform
BASEDIR = osp.abspath(osp.dirname(__file__))
if platform.system() == "Windows":
DLLNAME = 'cambdll.dll'
else:
DLLNAME = 'camblib.so'
CAMBL = osp.join(BASEDIR, DLLNAME)
mock_load = os.environ.get('READTHEDOCS', None)
if not mock_load:
i... | Python | null | 3,206 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/constants.py | from .baseconfig import dll_import
from ctypes import c_int
global_error_flag = dll_import(c_int, "errors", "global_error_flag")
const_pi = 3.1415926535897932384626433832795
const_twopi = 2. * const_pi
const_fourpi = 4. * const_pi
const_sqrt6 = 2.4494897427831780981972840747059
c = 2.99792458e8
h_p = 6.62606896e-34
... | Python | null | 1,414 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/postborn.py | from . import camb, model
import numpy as np
from .baseconfig import mock_load
if not mock_load:
from scipy.interpolate import RectBivariateSpline, UnivariateSpline
def cl_kappa_limber(results, PK, ls, nz, chi_source, chi_source2=None):
chi_source = np.float64(chi_source)
if chi_source2 is None:
... | Python | null | 9,365 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/lensing.py | from ctypes import c_int, c_double, c_bool
from .baseconfig import dll_import
# ---Variables in modules.f90
# To set the value please just put
# variable_name.value = new_value
lensing_method_curv_corr = 1
lensing_method_flat_corr = 2
lensing_method_harmonic = 3
lensing_method = dll_import(c_int, "lensing", "lensin... | Python | null | 654 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/bbn.py | # Classes to produce BBN predictions for helium mass fraction and D/H given other parameters
# Fitting formula for Parthenelope via Julien Lesourges Dec 2014
# General interpolation tables, with defaults from Parthenope May 2017 (thanks Ofelia Pesanti)
import numpy as np
import os
import io
from .baseconfig import moc... | Python | null | 6,625 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/reionization.py | from .baseconfig import CAMB_Structure, dll_import
from ctypes import c_bool, c_int, c_double
# ---Variables in reionization.f90
# To set the value please just put
# variablename.value = newvalue
# logical
include_helium_fullreion = dll_import(c_bool, "reionization", "include_helium_fullreion")
# include_helium_fullr... | Python | null | 1,900 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/bispectrum.py | from ctypes import c_int, c_double, c_char, POINTER
from .baseconfig import camblib
from numpy.ctypeslib import ndpointer
import numpy as np
# ---Parameters
Ini_max_string_len = 1024
max_bispectrum_deltas = 5
class TBispectrumParams:
_fields_ = [
("do_lensing_bispectrum", c_int), # logical
("do_... | Python | null | 1,505 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/correlations.py | """
Functions to transform CMB angular power spectra into correlation functions (cl2corr)
and vice versa (corr2cl), and calculate lensed power spectra from unlensed ones.
The lensed power spectrum functions are not intended to replace those calculated by default when getting CAMB results,
but may be useful for tests, ... | Python | null | 31,406 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/camb.py | from .baseconfig import camblib, CAMBError, CAMB_Structure, dll_import, mock_load
import ctypes
from ctypes import c_float, c_int, c_double, c_bool, POINTER, byref
from . import model, constants, initialpower, lensing
import numpy as np
from numpy import ctypeslib as nplib
from numpy.ctypeslib import ndpointer
import l... | Python | null | 60,581 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/symbolic.py | """
This module defines the scalar linear perturbation equations for standard LCDM cosmology, using sympy.
It uses the covariant perturbation notation, but includes functions to project into the
Newtonian or synchronous gauge, as well as constructing general gauge invariant quantities.
It uses "t" as the conformal tim... | Python | null | 37,200 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/model.py | from .baseconfig import camblib, CAMB_Structure, CAMBError, CAMBParamRangeError, dll_import
from ctypes import c_bool, c_int, c_double, c_float, byref, POINTER
from . import reionization as ion
from . import recombination as recomb
from . import initialpower as ipow
from . import constants
import numpy as np
from . imp... | Python | null | 24,706 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/recombination.py | from .baseconfig import CAMB_Structure, dll_import
from ctypes import c_bool, c_int, c_double
# logical
Do21cm = dll_import(c_double, "recombination", "do21cm")
# Do21cm.value = False
# logical
doTmatTspin = dll_import(c_bool, "recombination", "dotmattspin")
# doTmatTspin.value = False
recombination_saha_z = dll_imp... | Python | null | 806 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/__init__.py | # coding: utf8
"""
Python CAMB interface (http://camb.info)
"""
__author__ = "Antony Lewis"
__contact__ = "antony at cosmologist dot info"
__status__ = "beta"
__version__ = "0.1.6.1"
from .baseconfig import dll_import
from .camb import CAMBdata, MatterTransferData, get_results, get_transfer_functions, get_background... | Python | null | 1,223 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/initialpower.py | # Initial power spectrum parameters
from .baseconfig import CAMB_Structure, CAMBError, camblib
from ctypes import c_int, c_double, c_bool, POINTER, byref
import numpy as np
nnmax = 5
tensor_param_indeptilt = 1
tensor_param_rpivot = 2
tensor_param_AT = 3
class InitialPowerParams(CAMB_Structure):
"""
Object ... | Python | null | 3,335 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/emission_angle.py | """
This module calculates the corrections to the standard lensed CMB power spectra results due to time delay and
emission angle, following `arXiv:1706.02673 <http://arxiv.org/abs/1706.02673>`_. This can be combined with the result
from the postborn module to estimate the leading corrections to the standard lensing B m... | Python | null | 9,689 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb/nonlinear.py | from .baseconfig import dll_import
from ctypes import c_int
# ---Parameters in halofit_ppf.f90
halofit_original = 1
halofit_bird = 2
halofit_peacock = 3
halofit_takahashi = 4
halofit_mead = 5
halofit_halomodel = 6
halofit_casarini = 7
halofit_default = halofit_takahashi
halofit_version_names = ['original','bird','p... | Python | null | 1,276 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/.idea/modules.xml | <?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/pycamb.iml" filepath="$PROJECT_DIR$/.idea/pycamb.iml" />
</modules>
</component>
</project> | XML | null | 264 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/.idea/encodings.xml | <?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project> | XML | null | 159 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/.idea/vcs.xml | <?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project> | XML | null | 183 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/ScalEqs.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CAMB: 0.1.5 Sympy: 1.0\n"
]
}
],
"source": [
"# Notebook demonstrating the use of quantities defined incamb.symbolic... | Jupyter Notebook | null | 657,789 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/CAMBdemo.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using CAMB installed at c:\\work\\dist\\git\\camb\\pycamb\n"
]
}
],
"source": [
"%matplotlib inline\n",
"import sy... | Jupyter Notebook | null | 825,505 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/conf.py | # -*- coding: utf-8 -*-
#
# MyProj documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 18 20:57:49 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | Python | null | 9,706 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/postborn.rst | camb.postborn
==================================
.. automodule:: camb.postborn
:members:
| reStructuredText | null | 96 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/emission_angle.rst | camb.emission_angle
==================================
.. automodule:: camb.emission_angle
:members:
| reStructuredText | null | 108 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/bbn.rst | camb.bbn
==================================
.. automodule:: camb.bbn
:members:
| reStructuredText | null | 87 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/symbolic.rst | camb.symbolic
==================================
.. automodule:: camb.symbolic
:members:
| reStructuredText | null | 100 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/index.rst | CAMB Python
==================================
CAMB is Code for Anisotropies in the Microwave Background, a cosmology code for calculating CMB and matter power spectra,
as well as general utility function for cosmological calculations. The main code is written in Fortran, which this
Python package encapulates for conv... | reStructuredText | null | 1,155 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/camb.rst | camb
==================================
.. automodule:: camb
:members: get_results, get_transfer_functions, get_matter_power_interpolator, get_age, get_zre_from_tau, set_z_outputs, set_feedback_level, set_params, set_halofit_version, set_custom_scalar_sources, clear_custom_scalar_sources
.. autoclass:: camb.CAMB... | reStructuredText | null | 439 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/reionization.rst | camb.reionization
==================================
.. autoclass:: camb.reionization.ReionizationParams
:members:
:inherited-members:
| reStructuredText | null | 147 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/model.rst | camb.model
==================================
.. autoclass:: camb.model.CAMBparams
:members:
:inherited-members:
.. autoclass:: camb.model.TransferParams
:members:
:inherited-members:
| reStructuredText | null | 205 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/initialpower.rst | camb.initialpower
==================================
.. autoclass:: camb.initialpower.InitialPowerParams
:members:
:inherited-members:
| reStructuredText | null | 147 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/correlations.rst | camb.correlations
==================================
.. automodule:: camb.correlations
:members:
| reStructuredText | null | 104 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/docs/source/recombination.rst | camb.recombination
==================================
.. autoclass:: camb.recombination.RecombinationParams
:members:
:inherited-members:
| reStructuredText | null | 150 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/pycamb/camb_tests/camb_test.py | from __future__ import absolute_import
import os
import sys
import unittest
import numpy as np
import logging
try:
import camb
except ImportError:
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../')))
import camb
from camb import model, correlations, bbn
from camb.baseconfig i... | Python | null | 11,024 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/out_2/_params.ini | output_root = out_2/
get_scalar_cls = T
get_vector_cls = F
get_tensor_cls = F
CMB_outputscale = 7.42835025e12
get_transfer = T
accuracy_boost = 1
l_accuracy_boost = 1
high_accuracy_default = T
do_nonlinear = 0
l_max_scalar = 2200
k_eta_max_scalar = 4400.0000000000000
do_lensing = T
lensing_method = 1
w = -1
cs2_lam = 1... | Config | null | 2,116 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/python/cambPlots.py | # Handy routines from plotting CAMB/CAMB_sources outputs
# See covCompare.py for sample script to plot outs
from pylab import *
import numpy as np
def_colors = ['b', 'r', 'm', 'c', 'g', 'k', 'y', '0.25', '0.75']
def saveCls(f, ls, vecs):
np.savetxt(f, hstack([ls.reshape(-1, 1) ] + [x.reshape(-1, 1) for x in vecs... | Python | null | 11,035 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/python/CLCompare.py | # sample script to compare two standard _lensedCl results
# ncl=1 does just TT, ncl=3,4 does more
# see camPlots.py for function declaration
from cambPlots import *
from pylab import *
root = r'../test_lensedCls.dat'
root2 = r'../test2_lensedCls.dat'
plot_compare([root, root2], ncl=4, x='sqrt')
show()
| Python | null | 311 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/python/CAMB_test_files.py | from __future__ import print_function
import os
import subprocess
import argparse
import fnmatch
import time
import sys
import shutil
import copy
from iniFile import iniFile
parser = argparse.ArgumentParser(description='Run CAMB tests')
parser.add_argument('ini_dir', help='ini file directory')
parser.add_argument('--m... | Python | null | 30,821 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/python/covCompare.py | # sample script to compare two different sets of cross-correlation spectra from scalar_covariance_output_file output
# e.g. use PyDev in Eclipse to easily edit and result run python scripts
from cambPlots import *
from pylab import *
root = r'../test_lensing_scalCovCls.dat'
root2 = r'../test_lensing2_scalCovCls.dat'... | Python | null | 894 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CAMB_Current/python/iniFile.py | # AL Apr 11,Jun13
import os
class iniFile:
def __init__(self, filename=None, keep_includes=False):
self.params = dict()
self.readOrder = []
self.defaults = []
self.includes = []
if filename is not None and filename!='': self.readFile(filename, keep_includes)
def rea... | Python | null | 4,784 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/plot_CLASS_output.m | function plot_CLASS_output(datafiles,varargin)
% plot_CLASS_output(datafiles,selection,options)
% plot_CLASS_output(datafiles,selection)
% plot_CLASS_output(datafiles,options)
% plot_CLASS_output(datafiles)
% Thomas Tram, 12th of March 2014. thomas.tram@epfl.ch
% Small plot utility for plotting background, thermo... | MATLAB/Octave | null | 5,559 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/README.md | CLASS: Cosmic Linear Anisotropy Solving System {#mainpage}
==============================================
Authors: Julien Lesgourgues and Thomas Tram
with several major inputs from other people, especially Benjamin
Audren, Simon Prunet, Jesus Torrado, Miguel Zumalacarregui, Francesco
Montanari, etc.
For download an... | Markdown | null | 4,347 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/explanatory_base.ini | *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
* CLASS input parameter file *
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
> This example of input file, intended for CLASS beginners, lists all
> possibilities with detailed comments. You can use a more concise version, in
> which only the arguments in which you are interested would appear. ... | Config | null | 35,427 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/CPU.py | #!/usr/bin/env python
"""
.. module:: CPU
:synopsis: CPU, a CLASS Plotting Utility
.. moduleauthor:: Benjamin Audren <benjamin.audren@gmail.com>
.. credits:: Benjamin Audren, Jesus Torrado
.. version:: 2.0
This is a small python program aimed to gain time when comparing two spectra,
e.g. from CAMB and CLASS, or a ... | Python | null | 22,565 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/external_Pk/README.md | The `external_Pk` mode
======================
* Author: Jesus Torrado (torradocacho [@] lorentz.leidenuniv.nl)
* Date: 2013-12-20
Introduction
------------
This mode allows for an arbitrary primordial spectrum `P(k)` to be calculated by an external command and passed to CLASS. That external command may be anythin... | Markdown | null | 6,098 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/external_Pk/generate_Pk_example.py | #!/usr/bin/python
from __future__ import print_function
import sys
from math import exp
# README:
#
# This is an example python script for the external_Pk mode of Class.
# It generates the primordial spectrum of LambdaCDM.
# It can be edited and used directly, though keeping a copy of it is recommended.
#
# Two (maybe... | Python | null | 1,662 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/external_Pk/generate_Pk_example_w_tensors.py | #!/usr/bin/python
from __future__ import print_function
import sys
from math import exp
# README:
#
# This is an example python script for the external_Pk mode of Class.
# It generates the primordial spectrum of LambdaCDM.
# It can be edited and used directly, though keeping a copy of it is recommended.
#
# Two (maybe... | Python | null | 1,792 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/custom_lensing.c | /** @file custom_lensing.c
* Julien Lesgourgues, 21.06.2011
*/
/* purpose: compute lensed Cl's, assuming lensing power spectrum from
another model.
--------------------------------------------------------
usage (if you compute the lensing potential with CLASS):
------------------------------------... | C | null | 7,652 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_background.c | /** @file class.c
* Julien Lesgourgues, 17.04.2011
*/
#include "class.h"
/* this main runs only the background part */
int main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological background */
struct thermo th; ... | C | null | 1,809 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_nonlinear.c | /** @file class.c
* Julien Lesgourgues, 07.03.2014
*/
/* this main only runs the modules up to the nonlinear one */
#include "class.h"
int main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological background */
struct thermo th; ... | C | null | 4,443 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/chi2.c | /** @file class.c
* Julien Lesgourgues, 20.04.2010
*/
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "string.h"
#include "float.h"
#define _PI_ 3.14159
int chi2_simple(
double ** cl1,
double ** cl2,
int lmax,
double * chi2);
int chi2_planck(
double ** cl1,
double ** cl2,
doub... | C | null | 7,317 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_spectra.c | /** @file test_spectra.c
*
* Julien Lesgourgues, 26.08.2010
*
* main intended for computing power spectra, not using the output module.
*
*/
#include "class.h"
main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological bac... | C | null | 4,422 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_transfer.c | /** @file class.c
* Julien Lesgourgues, 17.04.2011
*/
/* this main only runs the modules up to the transfer one */
#include "class.h"
int main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological background */
struct thermo th; ... | C | null | 5,369 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_perturbations.c | /** @file class.c
* Julien Lesgourgues, 17.04.2011
*/
/* this main runs only the background, thermodynamics and perturbation part */
#include "class.h"
int main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological background */
s... | C | null | 3,196 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_bessel.c | /** @file class.c
* Julien Lesgourgues, 18.04.2010
*/
#include "class.h"
main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological background */
struct thermo th; /* for thermodynamics */
struct perturbs pt; ... | C | null | 2,520 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_trg.c | /** @file test_trg.c
*
*/
#include "precision.h"
#include "background.h"
#include "thermodynamics.h"
#include "perturbations.h"
#include "bessel.h"
#include "transfer.h"
#include "primordial.h"
#include "spectra.h"
#include "output.h"
#include "trg.h"
main(int argc, char **argv) {
struct precision pr; ... | C | null | 3,436 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_degeneracy.c | /** @file class.c
* Julien Lesgourgues, 20.04.2010
*/
#include "class.h"
#include <math.h>
#include <time.h>
#define TINy 1.0e-1
#define NMAX 100000
#define GET_PSUM \
for (j=0;j<ndim;j++){\
for (sum=0.0,i=0;i<mpts;i++) sum += p[i][j];\
psum[j] = sum;}
#define SWAP(a,b) {swap=(a);(a)=(b);(b)=swap;}
#d... | C | null | 21,408 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_pbc.c | /** @file class.c
* Julien Lesgourgues, 20.04.2010
*/
#include "class.h"
int main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological background */
struct thermo th; /* for thermodynamics */
struct perturbs pt; ... | C | null | 5,290 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_loops.c | /** @file class.c
* Julien Lesgourgues, 17.04.2011
*/
/* this main calls CLASS several times in a loop, with different input
parameters. It illustrates how the code could be interfaced with a
parameter extraction code. */
#include "class.h"
int class(
struct file_content *pfc,
struct prec... | C | null | 5,652 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_optimize.c | /** @file class.c
* Julien Lesgourgues, 20.04.2010
*/
#include "class.h"
int class(
struct precision * ppr,
struct background * pba,
struct thermo * pth,
struct perturbs * ppt,
struct bessels * pbs,
struct transfers * ptr,
struct primordial * ppm,
struct spectra * psp,
struct nonlin... | C | null | 16,539 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_loops_omp.c | /** @file class.c
* Julien Lesgourgues, 17.04.2011
*/
/* this main calls CLASS several times in a loop, with different input
parameters. It illustrates how the code could be interfaced with a
parameter extraction code. */
/* JL 17.03.2016: implemented here nested openMP loops. The user
chooses how many ins... | C | null | 9,492 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_optimize_1D.c | /** @file class.c
* Julien Lesgourgues, 20.04.2010
*/
#include "class.h"
int class(
struct precision * ppr,
struct background * pba,
struct thermo * pth,
struct perturbs * ppt,
struct bessels * pbs,
struct transfers * ptr,
struct primordial * ppm,
struct spectra * psp,
struct lensin... | C | null | 15,577 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_timing.c | /** @file class.c
* Julien Lesgourgues, 20.04.2010
*/
#include "class.h"
#include <time.h>
int main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological background */
struct thermo th; /* for thermodynamics */
st... | C | null | 4,514 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_thermodynamics.c | /** @file class.c
* Julien Lesgourgues, 17.04.2011
*/
/* th main runs only the background and thermodynamics parts */
#include "class.h"
int main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological background */
struct the... | C | null | 4,730 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_2D_quadrature.c | #include "common.h"
#include "quadrature.h"
int main(){
double I,fxy;
int i,n;
double *x,*y,*w;
ErrorMsg error_message;
n=2;
class_call(quadrature_in_rectangle(-2.0,2.0,1.0,4.0,&n,&x,&y,&w,error_message),
error_message,
error_message);
for(i=0,I=0.0; i<n; i++){
// f(x,y) = -x^5+y^8-x^... | C | null | 566 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/test/test_hyperspherical.c | #include "common.h"
#include "hyperspherical.h"
int main(){
int sgnK;
double nu;
int *lvec;
int l_size;
int index_l, index_x, index_nu;
double xmax, sampling, supersampling;
double *xvec, *Phi, *nuvec;
int nu_size;
double dx;
double Inum;
double Iexact, l;
FILE * outnum, *outexact, *out;
do... | C | null | 3,948 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/helium.h | /*************************************************************************************************/
/* HYREC: Hydrogen and Helium Recombination Code */
/* Written by Yacine Ali-Haimoud and Chris Hirata (Caltech) */
/* ... | C/C++ Header | null | 1,194 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/history.h | /*************************************************************************************************/
/* HYREC: Hydrogen and Helium Recombination Code */
/* Written by Yacine Ali-Haimoud and Chris Hirata (Caltech) */
/* ... | C/C++ Header | null | 5,023 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/hyrectools.h | /*************************** HYRECTOOLS.H ********************************
Multidimensional array creation and freeing functions.
Also, function to make linear arrays and interpolation routines.
Version: January 2011 (identical to November 2010)
**************************************************************************... | C/C++ Header | null | 892 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/hyrectools.c | /*************************** HYRECTOOLS.C ********************************
Multidimensional array creation and freeing functions.
Also, function to make linear arrays and interpolation routines.
Version: January 2011 (unchanged from November 2010 version)
***************************************************************... | C | null | 5,552 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/history.c | /*************************************************************************************************/
/* HYREC: Hydrogen and Helium Recombination Code */
/* Written by Yacine Ali-Haimoud and Chris Hirata (Caltech) */
/* ... | C | null | 22,709 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/hyrec.c | /*************************************************************************************************/
/* HYREC: Hydrogen and Helium Recombination Code */
/* Written by Yacine Ali-Haimoud and Chris Hirata (Caltech) */
/* ... | C | null | 3,186 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/hydrogen.c | /*************************************************************************************************/
/* HYREC: Hydrogen and Helium Recombination Code */
/* Written by Yacine Ali-Haimoud and Chris Hirata (Caltech) */
/* ... | C | null | 33,846 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/helium.c | /*************************************************************************************************/
/* HYREC: Hydrogen and Helium Recombination Code */
/* Written by Yacine Ali-Haimoud and Chris Hirata (Caltech) */
/* ... | C | null | 7,433 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/hyrec.h | /*************************************************************************************************/
/* HYREC: Hydrogen and Helium Recombination Code */
/* Written by Yacine Ali-Haimoud and Chris Hirata (Caltech) */
/* ... | C/C++ Header | null | 821 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/hyrec/hydrogen.h | /*************************************************************************************************/
/* HYREC: Hydrogen and Helium Recombination Code */
/* Written by Yacine Ali-Haimoud and Chris Hirata (Caltech) */
/* ... | C/C++ Header | null | 6,260 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/main/class.c | /** @file class.c
* Julien Lesgourgues, 17.04.2011
*/
#include "class.h"
int main(int argc, char **argv) {
struct precision pr; /* for precision parameters */
struct background ba; /* for cosmological background */
struct thermo th; /* for thermodynamics */
struct perturbs pt; ... | C | null | 3,532 |
[ascl:2307.003] | https://github.com/JulianBMunoz/RelicFast | CLASS_Current/source/transfer.c | /** @file transfer.c Documented transfer module.
*
* Julien Lesgourgues, 28.07.2013
*
* This module has two purposes:
*
* - at the beginning, to compute the transfer functions \f$
* \Delta_l^{X} (q) \f$, and store them in tables used for
* interpolation in other modules.
*
* - at any time in the code, to ... | C | null | 192,741 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.